-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add FixedOrientation (Omni) and Sideward orientation modes #89
Conversation
std::fabs(angles::normalize_angle(rotation_to_path - M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal - M_PI_2)) < | ||
std::fabs(angles::normalize_angle(rotation_to_path + M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal + M_PI_2)); |
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.
F: I think the second time, the sign of the half rotation needs to be inverted, no? I.e.
std::fabs(angles::normalize_angle(rotation_to_path - M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal - M_PI_2)) < | |
std::fabs(angles::normalize_angle(rotation_to_path + M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal + M_PI_2)); | |
std::fabs(angles::normalize_angle(rotation_to_path - M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal + M_PI_2)) < | |
std::fabs(angles::normalize_angle(rotation_to_path + M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal - M_PI_2)); |
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.
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.
nice picture. Is that the plot of
std::fabs(angles::normalize_angle(rotation_to_path - M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal + M_PI_2)) <
std::fabs(angles::normalize_angle(rotation_to_path + M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal - M_PI_2));
I suppose? Is there some intuitive way to see that this is indeed the correct result?
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.
yes. that is the plot of the function:
std::fabs(angles::normalize_angle(rotation_to_path - M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal + M_PI_2)) <
std::fabs(angles::normalize_angle(rotation_to_path + M_PI_2)) + std::fabs(angles::normalize_angle(rotation_to_goal - M_PI_2));
hm, I think the best way to understand is by visualizing the start/goal in circle quadrant:
The cases we want leftward/rightward (figures on the left), we can see that the solution is the correct one.
The other cases (when we switch orientation by a lot) it doesn't matter much which one we should choose since the "cost" is basically the same (for both leftward or rightward), and that is why we have this "frog" graph.
My concern is with the switching part, which can lead to some oscillation, maybe
0017323
to
011d0c4
Compare
Description
wrike: https://www.wrike.com/open.htm?id=1243708620
In Taisei project, customer requires Takumi robot to prefer to move sideways after picking the payload.
It is safer to move sideways after picking, because robot grows a lot in y-axis (image below). It is safer to move in the direction of the minimal sweep for collision avoidance.
There are different ways to address that:
base_link
frame; or velocities / odom, etcThe (1) solution is a bit hacky and I think it would cause some issues. Since everything (perception, localization and navigation nodes) relies in
base_link
frame, changing it dynamically seems dangerous. And rotating the velocities may cause other issues too.The (3) seems to be the easiest one, but it did not work as expected (as explained below).
The (2) solution was implemented.
We attempted to change
TEB
to prefer moving sideways without changing global planner:global_plan_overwrite_orientation
toTrue
so TEB can choose the best orientation for minimal timemax_vel_x
to0.06
andmax_vel_y
to0.5
so that vel_y is chosenHowever, TEB does not rotate the robot and moves sideways. It continues to move forwards/backward in a very small speed.
After changing the
GlobalPlanner
logic by adding a new mode (LeftRightWard
), TEB manages to use the correct orientation.leftrightward-2023-11-06_13.09.05.mp4