koide3 / direct_visual_lidar_calibration

A toolbox for target-less LiDAR-camera calibration [ROS1/ROS2]
https://koide3.github.io/direct_visual_lidar_calibration/
657 stars 91 forks source link

Ros2 Support for Foxy Distro #79

Closed jeychandar closed 3 months ago

jeychandar commented 3 months ago

I follow the installation and tried to build for ros2 foxy but it throws error. Can you help me out to resolve this issue. Thanks in advance /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate expects 1 argument, 0 provided /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp: In instantiation of ‘std::shared_ptr<_Tp> vlcal::PreprocessROS2::get_first_message(const string&, const string&) const [with T = sensormsgs::msg::Image<std::allocator >; std::string = std::cxx11::basic_string]’: /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:108:98: required from here /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:54:25: error: no matching function for call to ‘rosbag2_cpp::Reader::Reader()’ 54 | rosbag2_cpp::Reader reader; | ^~ In file included from /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:4: /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate: ‘rosbag2_cpp::Reader::Reader(std::unique_ptr)’ 53 | explicit Reader(std::unique_ptr reader_impl); | ^~ /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate expects 1 argument, 0 provided /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp: In instantiation of ‘std::shared_ptr<_Tp> vlcal::PreprocessROS2::get_first_message(const string&, const string&) const [with T = sensormsgs::msg::CompressedImage<std::allocator >; std::string = std::cxx11::basic_string]’: /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:112:106: required from here /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:54:25: error: no matching function for call to ‘rosbag2_cpp::Reader::Reader()’ 54 | rosbag2_cpp::Reader reader; | ^~ In file included from /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:4: /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate: ‘rosbag2_cpp::Reader::Reader(std::unique_ptr)’ 53 | explicit Reader(std::unique_ptr reader_impl); | ^~ /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate expects 1 argument, 0 provided /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp: In instantiation of ‘std::shared_ptr<_Tp> vlcal::PreprocessROS2::get_first_message(const string&, const string&) const [with T = sensormsgs::msg::CameraInfo<std::allocator >; std::string = std::__cxx11::basic_string]’: /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:117:113: required from here /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:54:25: error: no matching function for call to ‘rosbag2_cpp::Reader::Reader()’ 54 | rosbag2_cpp::Reader reader; | ^~ In file included from /home/praveen/Lidar_camera_fusion/src/direct_visual_lidar_calibration/src/preprocess_ros2.cpp:4: /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate: ‘rosbag2_cpp::Reader::Reader(std::unique_ptr)’ 53 | explicit Reader(std::unique_ptr reader_impl); | ^~ /opt/ros/foxy/include/rosbag2_cpp/reader.hpp:53:12: note: candidate expects 1 argument, 0 provided make[2]: [CMakeFiles/preprocess.dir/build.make:76: CMakeFiles/preprocess.dir/src/preprocess_ros2.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:256: CMakeFiles/preprocess.dir/all] Error 2 make: *** [Makefile:146: all] Error 2

Failed <<< direct_visual_lidar_calibration [7.06s, exited with code 2]

Summary: 2 packages finished [7.43s] 1 package failed: direct_visual_lidar_calibration 1 package had stderr output: direct_visual_lidar_calibration

Environment:

image

koide3 commented 3 months ago

Sorry, we have no plan to support ROS2 foxy. But you can still use the humble docker image on Ubuntu 20.04.

jeychandar commented 3 months ago

Thanks for your prompt reply :)