Ask Your Question
1

compilation error master branch navigation2

asked 2020-12-17 04:30:30 -0500

prince gravatar image

ROS Foxy, Ubuntu 20.04

I am failing to successfully compile the source code of Navigation2 master branch. The following errors are reported:

/home/user/code/nav2_ws/src/navigation2/nav2_util/include/nav2_util/lifecycle_node.hpp:25:10: fatal error: bondcpp/bond.hpp: No such file or directory
   25 | #include "bondcpp/bond.hpp"
      |          ^~~~~~~~~~~~~~~~~~

I have tried downloading and compiling ros2 branch of bond_core. But it also results in compilation error:

/home/user/code/nav2_ws/src/bond_core-ros2/bondcpp/src/bond.cpp:188:43: error: ‘from_nanoseconds’ is not a member of ‘rclcpp::Duration’
  188 |   rclcpp::Duration dur1(rclcpp::Duration::from_nanoseconds(connect_timeout_));

It appear that I am combining incompatible versions of the navigation2 stack with bond_core. Please share the correct configuration of nav2 library and dependencies.

Thanks a lot.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
0

answered 2020-12-17 12:04:56 -0500

You must work with ROS2 master or rolling to use Nav2 main branch. Sometimes it will be compatible with released distributions, but rclcpp has changed too much from Foxy to support it on our master branch anymore.

edit flag offensive delete link more
1

answered 2021-01-01 04:55:02 -0500

HomalozoaX gravatar image

Hey. You can use git checkout afa3b15fdf902396d009fb5de0f3d2139753d1d9 to revert the changes of "rclcpp::Duration::from_nanoseconds".

edit flag offensive delete link more
0

answered 2021-05-20 15:36:27 -0500

charlie92 gravatar image

The hack that worked for me was to use @neptuilock commit hash suggestion for compiling https://github.com/ros/bond_core. to be compatible with rclcpp::Duration API change. Also currently the main branch of navigation2 is not compatible.

A commit where it is easy to fix is https://github.com/ros-planning/navig.... In that commit you only need to change nav2_recoveries/plugins/wait.cpp, nav2_lifecycle_manager/src/lifecycle_manager.cpp from "rclcpp::Duration::from_nanoseconds(...) to just "rclcpp::Duration(...).

Also in nav2_waypoint_follower/src/waypoint_follower.cpp the method goalResponseCallbackneeds to be changed, I used foxy's branch implementation https://github.com/ros-planning/navig...

That's it. I don't know if this last change will brake something, but I tested the navigation stack and it is working for me.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-12-17 04:30:30 -0500

Seen: 375 times

Last updated: May 20