-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[RotationShimController] Rotate to goal heading #4332
[RotationShimController] Rotate to goal heading #4332
Conversation
bf25e80
to
20917ee
Compare
@gennartan please see #4290 (comment) if you hadn't already |
nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp
Outdated
Show resolved
Hide resolved
nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp
Outdated
Show resolved
Hide resolved
Please also make sure to sign off your commits. See the DCO failed job for details |
When arriving in the goal xy tolerance, the rotation shim controller takes back the control and perform the necessary rotation to be in the correct goal orientation. This can be useful when the final orientaion of the robot matters. It can also simplify the configuration of the primary controller since it would not have to be configured to be able to reach the target orientation.
3aabd4a
to
4095c29
Compare
nav2_rotation_shim_controller/src/nav2_rotation_shim_controller.cpp
Outdated
Show resolved
Hide resolved
Essentially done though, this looks good to me. Did you test this out? |
4095c29
to
549e591
Compare
Yes I tested it in simulation. It works fine.
I missed this comment the other day. Now it is fixed (and tested) 😄 |
@gennartan see my new review comments, some are outstanding still. Then I think the last thing left if just adding the new parameter to the configuration guide for this plugin + add to the migration guide that this is a new available feature! |
5c13988
to
54c1b34
Compare
I think just docs left now! |
When arriving in the goal xy tolerance, the rotation shim controller takes back the control to command the robot to rotate in the goal heading orientation. The initial goal of the rotationShimController was to rotate the robot at the beginning of a navigation towards the paths orientation because some controllers are not good at performing in place rotations. For the same reason, the rotationShimController should be able to rotate the robot towards the goal heading. Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com>
54c1b34
to
16e1bd7
Compare
here is the PR: ros-navigation/docs.nav2.org#561 |
Thanks @gennartan ! |
When arriving in the goal xy tolerance, the rotation shim controller takes back the control to command the robot to rotate in the goal heading orientation. The initial goal of the rotationShimController was to rotate the robot at the beginning of a navigation towards the paths orientation because some controllers are not good at performing in place rotations. For the same reason, the rotationShimController should be able to rotate the robot towards the goal heading. Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com>
* Add configure and cleanup transitions to lifecycle manager and client (#4371) Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi> * [RotationShimController] Rotate to goal heading (#4332) When arriving in the goal xy tolerance, the rotation shim controller takes back the control to command the robot to rotate in the goal heading orientation. The initial goal of the rotationShimController was to rotate the robot at the beginning of a navigation towards the paths orientation because some controllers are not good at performing in place rotations. For the same reason, the rotationShimController should be able to rotate the robot towards the goal heading. Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com> * bump to 1.2.9 for release --------- Signed-off-by: Joni Pöllänen <joni.pollanen@karelics.fi> Signed-off-by: Antoine Gennart <gennart.antoine@gmail.com> Co-authored-by: Joni Pöllänen <jonipol@users.noreply.github.com> Co-authored-by: Saitama <gennartan@users.noreply.github.com>
@gennartan your PR has a failing test now! https://app.circleci.com/pipelines/github/ros-navigation/navigation2/11752/workflows/7593ca53-120e-481f-9fba-326f26f6e32e/jobs/36042/tests Can you take a look and fix the issue? |
// of the goal. The rotation shim controller should rotate toward the goal heading | ||
// then it will throw an exception because the costmap is bogus | ||
controller->setPlan(path); | ||
EXPECT_THROW(controller->computeVelocityCommands(pose, velocity, &checker), std::runtime_error); |
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.
This test consistently fails for me on rolling. @gennartan would it be possible for you to check it out? It failed on CI too . No idea how it passed for the PR
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.
Ah sorry, just saw Steve commented already
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.
I fixed the error related to the EXPECT_THROW
and implemented real tests for this feature.
But I am still getting error while testing and I cannot figure out what is causing it. Could you help me @tonynajjar or @SteveMacenski ?
build/nav2_rotation_shim_controller/test_results/nav2_rotation_shim_controller/flake8.xunit.xml: 3 tests, 0 errors, 3 failures, 0 skipped
- nav2_rotation_shim_controller.flake8 E501 (./install/_local_setup_util_sh.py:14:100)
<<< failure message
line too long (109 > 99 characters):
FORMAT_STR_INVOKE_SCRIPT = 'COLCON_CURRENT_PREFIX="{prefix}" _colcon_prefix_sh_source_script "{script_path}"'
>>>
- nav2_rotation_shim_controller.flake8 E501 (./install/_local_setup_util_sh.py:15:100)
<<< failure message
line too long (124 > 99 characters):
FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi'
>>>
- nav2_rotation_shim_controller.flake8 E501 (./install/_local_setup_util_sh.py:16:100)
<<< failure message
line too long (125 > 99 characters):
FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi'
>>>
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.
It seems that I am only getting these test error locally, I created a PR and this error doesn't show up.
See the PR: #4391
However the release tests still fails, but not for the rotationShimController
When arriving in the goal xy tolerance, the rotation shim controller takes back the control to command the robot to rotate in the goal heading orientation.
The initial goal of the rotationShimController was to rotate the robot at the beginning of a navigation towards the paths orientation because some controllers are not good at performing in place rotations. For the same reason, the rotationShimController should be able to rotate the robot towards the goal heading.
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: