Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision fixing #44

Merged
merged 15 commits into from
Feb 7, 2025
Merged

Collision fixing #44

merged 15 commits into from
Feb 7, 2025

Conversation

JosephBye
Copy link
Contributor

Collision detection added, ready for merge

@JosephBye
Copy link
Contributor Author

for merge, keep all constants from main

@JosephBye
Copy link
Contributor Author

Also, Alexis, if you're reading this I just realized that the home command sometimes almost swings the elbow around 360 degrees instead of directly going back, i.e. if the target angle is 0 and the robot is at 330 degrees, it'll spin 330 degrees instead of 30.

@allengregoryiv
Copy link
Member

allengregoryiv commented Feb 5, 2025

for merge, keep all constants from main

You need to do this on your branch when you merge main into your branch before doing the PR. Don't make PRs that can't be just directly merged to the best of your ability.

@JosephBye
Copy link
Contributor Author

Fixed 👍

@JosephBye
Copy link
Contributor Author

JosephBye commented Feb 6, 2025

@cycIes elbow collision added/fixed

() ->
(ElevatorStates.getPosition().getAsDouble() > 1.0)
|| ElbowStates.getPosition().getAsDouble()
< percent.getAsDouble())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this part, I'm assuming you're saying the elbow can move if it's just trying to go higher? Would you have to account for negative angles as well? (the 0 for the elbow is pointing up)
edited: oops i meant for this to be a simple comment

Copy link
Contributor

@cycIes cycIes Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I realize now that checking elbow against elevator position is tricky because depending on where the shoulder is, the elbow vertical displacement is different

@JosephBye
Copy link
Contributor Author

I gave weights to elbows and shoulders based on real length to get a percent of total height, then using that to check for elevator.
Elbow constraints off of Elevator being high enough in comparison to shoulder+elbow, right now we're assuming a 1 to 1 ratio between elevator and shoulder+elbow, which means that for basically every percent of max height I allow elevator to go up, shoulder+elbow's total position is able to increase by that percent. This can be changed in future for optimization.

@cycIes cycIes merged commit ee4bb7b into main Feb 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants