-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use the new declare_or_get_parameter API for nav2_waypoint_follower #5742
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
base: main
Are you sure you want to change the base?
Use the new declare_or_get_parameter API for nav2_waypoint_follower #5742
Conversation
Signed-off-by: csy100886 <csy100886@gmail.com>
Signed-off-by: csy100886 <csy100886@gmail.com>
497bdfc to
1a79cc1
Compare
mini-1235
left a comment
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.
@csy100886 Please address the following items :)
Signed-off-by: csy100886 <csy100886@gmail.com>
abb2856 to
ab28ec2
Compare
Signed-off-by: csy100886 <csy100886@gmail.com>
|
Thank you so much for your review! |
| rclcpp::ParameterValue(std::string("nav2_waypoint_follower::WaitAtWaypoint"))); | ||
| } | ||
|
|
||
| } // namespace nav2_waypoint_follower |
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.
Why are we moving namespaces?
| loop_rate_ = get_parameter("loop_rate").as_int(); | ||
| waypoint_task_executor_id_ = get_parameter("waypoint_task_executor_plugin").as_string(); | ||
| global_frame_id_ = get_parameter("global_frame_id").as_string(); | ||
| stop_on_failure_ = nav2::declare_or_get_parameter<bool>( |
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.
Use the node->declare_or_get_parameter version. You also shouldn't need to explicitly provide the template, it should be deduced by the default argument.
Please see other PRs which have implemented this already
| global_frame_ = this->declare_or_get_parameter("global_frame", std::string("map")); |
|
Also see CI. This doesn't compile https://app.circleci.com/pipelines/github/ros-navigation/navigation2/16944/workflows/78157566-43fd-4856-975b-e51bd3f7ded5/jobs/49747 How did you test this? |
|
@csy100886 any updates? Also, please pull in / rebase main |
Basic Info
Description of contribution in a few bullet points
Update declare_parameter_if_not_declared and get_parameter fields to use the new declare_or_get_parameter API for nav2_waypoint_follower
Description of documentation updates required from your changes
N/A
Description of how this change was tested
Performed linting validation using pre-commit run --all or colcon test
Future work that may be required in bullet points
For Maintainers:
backport-*.