-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
realsense-ros/realsense2_rgbd_plugin/src/ros_image_texture.cpp
realsense-ros/realsense2_rgbd_plugin/src/ros_image_texture.cpp
In the above two files, cv_bridge is imported using #include <cv_bridge/cv_bridge.h>. From my understanding, it should be #include <cv_bridge/cv_bridge.hpp>.
If I leave it as is, i.e. #include <cv_bridge/cv_bridge.h> and run this colcon build command colcon build --packages-select realsense2_rviz_plugin --cmake-args -DRVIZ_RGBD_PLUGIN=ON then I get the following error message.
ashik@ashik-Legion-S7-15ACH6:~/throw_and_catch/throw_and_catch/throw_and_catch_ws$ dpkg -l | grep -i cv-bridge
ii ros-jazzy-cv-bridge 4.1.0-1noble.20260126.175659 amd64 This contains CvBridge, which converts between ROS2 Image messages and OpenCV images.
ashik@ashik-Legion-S7-15ACH6:~/throw_and_catch/throw_and_catch/throw_and_catch_ws$ colcon build --packages-select realsense2_rviz_plugin --cmake-args -DRVIZ_RGBD_PLUGIN=ON
Starting >>> realsense2_rviz_plugin
--- stderr: realsense2_rviz_plugin
/home/ashik/throw_and_catch/throw_and_catch/throw_and_catch_ws/src/realsense-ros/realsense2_rgbd_plugin/src/ros_image_texture.cpp:20:10: fatal error: cv_bridge/cv_bridge.h: No such file or directory
20 | #include <cv_bridge/cv_bridge.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/realsense_rviz_plugin.dir/build.make:114: CMakeFiles/realsense_rviz_plugin.dir/src/ros_image_texture.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/home/ashik/throw_and_catch/throw_and_catch/throw_and_catch_ws/src/realsense-ros/realsense2_rgbd_plugin/src/realsense_rviz_plugin.cpp:22:10: fatal error: cv_bridge/cv_bridge.h: No such file or directory
22 | #include <cv_bridge/cv_bridge.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/realsense_rviz_plugin.dir/build.make:100: CMakeFiles/realsense_rviz_plugin.dir/src/realsense_rviz_plugin.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:140: CMakeFiles/realsense_rviz_plugin.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< realsense2_rviz_plugin [8.22s, exited with code 2]
Summary: 0 packages finished [8.49s]
1 package failed: realsense2_rviz_plugin
1 package had stderr output: realsense2_rviz_plugin
ashik@ashik-Legion-S7-15ACH6:~/throw_and_catch/throw_and_catch/throw_and_catch_ws$ dpkg -L ros-jazzy-cv-bridge | grep cv_bridge
/opt/ros/jazzy/include/cv_bridge
/opt/ros/jazzy/include/cv_bridge/cv_bridge
/opt/ros/jazzy/include/cv_bridge/cv_bridge/cv_bridge.hpp
/opt/ros/jazzy/include/cv_bridge/cv_bridge/cv_bridge_export.h
/opt/ros/jazzy/include/cv_bridge/cv_bridge/cv_mat_sensor_msgs_image_type_adapter.hpp
/opt/ros/jazzy/include/cv_bridge/cv_bridge/rgb_colors.hpp
/opt/ros/jazzy/include/cv_bridge/cv_bridge/visibility_control.h
/opt/ros/jazzy/lib/libcv_bridge.so
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge/__init__.py
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge/boost
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge/boost/cv_bridge_boost.so
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge/core.py
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge-4.1.0-py3.12.egg-info
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge-4.1.0-py3.12.egg-info/PKG-INFO
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge-4.1.0-py3.12.egg-info/SOURCES.txt
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge-4.1.0-py3.12.egg-info/dependency_links.txt
/opt/ros/jazzy/lib/python3.12/site-packages/cv_bridge-4.1.0-py3.12.egg-info/top_level.txt
/opt/ros/jazzy/share/ament_index/resource_index/package_run_dependencies/cv_bridge
/opt/ros/jazzy/share/ament_index/resource_index/packages/cv_bridge
/opt/ros/jazzy/share/ament_index/resource_index/parent_prefix_path/cv_bridge
/opt/ros/jazzy/share/cv_bridge
/opt/ros/jazzy/share/cv_bridge/cmake
/opt/ros/jazzy/share/cv_bridge/cmake/ament_cmake_export_dependencies-extras.cmake
/opt/ros/jazzy/share/cv_bridge/cmake/ament_cmake_export_targets-extras.cmake
/opt/ros/jazzy/share/cv_bridge/cmake/cv_bridge-extras.cmake
/opt/ros/jazzy/share/cv_bridge/cmake/cv_bridgeConfig-version.cmake
/opt/ros/jazzy/share/cv_bridge/cmake/cv_bridgeConfig.cmake
/opt/ros/jazzy/share/cv_bridge/cmake/export_cv_bridgeExport-none.cmake
/opt/ros/jazzy/share/cv_bridge/cmake/export_cv_bridgeExport.cmake
/opt/ros/jazzy/share/cv_bridge/environment
/opt/ros/jazzy/share/cv_bridge/environment/ament_prefix_path.dsv
/opt/ros/jazzy/share/cv_bridge/environment/ament_prefix_path.sh
/opt/ros/jazzy/share/cv_bridge/environment/path.dsv
/opt/ros/jazzy/share/cv_bridge/environment/path.sh
/opt/ros/jazzy/share/cv_bridge/environment/pythonpath.dsv
/opt/ros/jazzy/share/cv_bridge/environment/pythonpath.sh
/opt/ros/jazzy/share/cv_bridge/local_setup.bash
/opt/ros/jazzy/share/cv_bridge/local_setup.dsv
/opt/ros/jazzy/share/cv_bridge/local_setup.sh
/opt/ros/jazzy/share/cv_bridge/local_setup.zsh
/opt/ros/jazzy/share/cv_bridge/package.dsv
/opt/ros/jazzy/share/cv_bridge/package.xml
Making this changes resulted in a successful build. I'm running this a laptop with the following specs:
Operating System: Ubuntu 24.04.3 LTS
Kernel: Linux 6.8.0-100-generic
Architecture: x86-64
Hardware Vendor: Lenovo
Hardware Model: Legion S7 15ACH6
Firmware Version: HACN46WW
I hope this helps! My apologies if this is not an actual issue. Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels