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

Building vector_pursuit_controller with ros2 rolling #9

Closed
chanhhoang99 opened this issue Jan 10, 2025 · 4 comments
Closed

Building vector_pursuit_controller with ros2 rolling #9

chanhhoang99 opened this issue Jan 10, 2025 · 4 comments

Comments

@chanhhoang99
Copy link

chanhhoang99 commented Jan 10, 2025

Thanks for the nice controller plugin.
Currently I am building this controller from source on ros2 rolling and nav2 rolling and got below error:

/root/vector_ws/src/vector_pursuit_controller/src/vector_pursuit_controller.cpp: In lambda function:
/root/vector_ws/src/vector_pursuit_controller/src/vector_pursuit_controller.cpp:883:22: error: declaration of ‘const auto:49& pose’ shadows a parameter [-Werror=shadow]
883 | [&](const auto & pose) {
| ~~~~~~~~~~~~~^~~~
/root/vector_ws/src/vector_pursuit_controller/src/vector_pursuit_controller.cpp:851:43: note: shadowed declaration is here
851 | const geometry_msgs::msg::PoseStamped & pose)

Below is my change:

  auto transformation_end = std::find_if(
    transformation_begin, global_plan_.poses.end(),
    [&](const auto & plan_pose) {
      return euclidean_distance(plan_pose, robot_pose) > max_costmap_extent;
    });

Would that fix the problem and still persist the idea of the original code ?

@exMachina316
Copy link
Collaborator

Could you point me to the nav2 repository you cloned for this build?

@chanhhoang99
Copy link
Author

chanhhoang99 commented Jan 10, 2025

Hi @exMachina316 ,
I use nav2 main branch at commit 43d7f7e309e782f1e277191ff414c98b9ac4f51c
https://github.com/ros-navigation/navigation2

@exMachina316
Copy link
Collaborator

@chanhhoang99 We currently do not support ros rolling but I looked into your suggestions and logically your fix is sound. One thing to be added here is #include "nav2_core/exceptions.hpp" needs to be replaced with #include "nav2_core/planner_exceptions.hpp" in the files vector_pursuit_controller.cpp and test_vector_pursuit.cpp

P.S.You can expect a new official release soon!! Stay tuned!

@chanhhoang99
Copy link
Author

Thanks @exMachina316 for reviewing.
I also did change the exception part.

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

No branches or pull requests

2 participants