Skip to content

Compile problems with ROS2 #521

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

Open
sssarana opened this issue May 8, 2025 · 0 comments
Open

Compile problems with ROS2 #521

sssarana opened this issue May 8, 2025 · 0 comments

Comments

@sssarana
Copy link

sssarana commented May 8, 2025

Hello,
When building for ROS2 from both ros2 and rolling branch, I faced several issues with header includes and timestamp usage. See below.

/home/ros2_ws/src/grid_map/grid_map_cv/include/grid_map_cv/GridMapCvProcessing.hpp:15:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   15 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/ros2_ws/src/grid_map/grid_map_cv/include/grid_map_cv/GridMapCvConverter.hpp:15:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   15 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

Finished <<< grid_map_costmap_2d [0.15s]                                                               
--- stderr: grid_map_cv                             
/home/ros2_ws/src/grid_map/grid_map_cv/test/GridMapCvTest.cpp:13:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   13 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/ros2_ws/src/grid_map/grid_map_cv/test/GridMapCvProcessingTest.cpp:12:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   12 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~


/home/ros2_ws/src/grid_map/grid_map_demos/src/opencv_demo_node.cpp:4:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
    4 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

--- stderr: grid_map_ros                              
In file included from /home/ros2_ws/src/grid_map/grid_map_ros/src/GridMapRosConverter.cpp:34:
/home/ros2_ws/src/grid_map/grid_map_ros/include/grid_map_ros/GridMapRosConverter.hpp:26:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   26 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

Starting >>> grid_map_ros
--- stderr: grid_map_ros                             
/home/ros2_ws/src/grid_map/grid_map_ros/src/GridMapRosConverter.cpp: In static member function ‘static bool grid_map::GridMapRosConverter::saveToBag(const grid_map::GridMap&, const string&, const string&)’:
/home/ros2_ws/src/grid_map/grid_map_ros/src/GridMapRosConverter.cpp:691:52: error: ‘using element_type = struct rosbag2_storage::SerializedBagMessage’ {aka ‘struct rosbag2_storage::SerializedBagMessage’} has no member named ‘send_timestamp’
  691 |   auto ret = rcutils_system_time_now(&bag_message->send_timestamp);
      |                                                    ^~~~~~~~~~~~~~


--- stderr: grid_map_ros                             
/home/ros2_ws/src/grid_map/grid_map_ros/test/GridMapRosTest.cpp:17:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   17 | #include <cv_bridge/cv_bridge.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~

I already created a pull request which fixes all these problems and adds some updates to CMake files: #520
I would appreciate it if you could review and merge.
Thank you.

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

1 participant