-
Notifications
You must be signed in to change notification settings - Fork 55
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
This looks wrong #1453
base: main
Are you sure you want to change the base?
This looks wrong #1453
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm at it... What is this * 1.0
about?
hulk/crates/control/src/motion/step_planner.rs
Lines 96 to 99 in dd430bf
Pose2::from_parts( | |
arc.start + direction * 1.0, | |
Orientation2::from_vector(direction), | |
) |
This is just a few lines further down in the same file
I think the simplification is correct, but the correctness of the direction calculation depends on interpretation, though in practice it won"t make much of a difference. The point is, we are essentially skipping short segments because using the direction of a short and thus likely jittery segment isn't great. The original implementation uses the orientation of the path that is taken by the robot, with your change it would use the orientation of the originally planned path. If the first line segment in the path is longer than the max step size, there is no difference. Not sure why the |
I guess at least in Ground coordinates is kind of makes sense... But it still looks wrong to write |
Fair point about the arc. This also basically doesn't matter since the max step size is tiny compared to the minimum obstacle radius, which means that if the arc is shorter than the step size, the line segments before and after the arc segment are close to colinear anyway. |
As far as I understand it, this makes the code more understandable and consistent. |
Why? What?
The first commit "fixes" a line I thought looked wrong. Before merging, I'd like to confirm this assumption.
The second commit is a simplification which should not change the functionality.
Orientation2::from_vector
does pretty much exactly what stood there before.ToDo / Known Issues
How to Test
stare at the code