intel / ros2_intel_realsense

This project is deprecated and no more maintained. Please visit https://github.com/IntelRealSense/realsense-ros for ROS2 wrapper.
Apache License 2.0
140 stars 96 forks source link

Colcon build error Ubuntu 18.04 ROS2 Dashing #174

Closed AndreaEirale closed 3 years ago

AndreaEirale commented 3 years ago

Ok, I think this does not work anymore on Dashing. I've already tried on three different systems running Ubuntu 18.04 Bionic and ROS2 Dashing but I received always the same error:

Starting >>> realsense_msgs
Finished <<< realsense_msgs [0.59s]                       
Starting >>> realsense_ros
--- stderr: realsense_ros                   
In file included from /opt/ros/dashing/include/librealsense2/hpp/rs_sensor.hpp:8:0,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_device.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_record_playback.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_context.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/rs.hpp:9,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:21:
/opt/ros/dashing/include/librealsense2/hpp/rs_frame.hpp: In lambda function:
/opt/ros/dashing/include/librealsense2/hpp/rs_frame.hpp:932:120: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     if (frame.get_profile().stream_type() == RS2_STREAM_INFRARED && frame.get_profile().stream_index() == index)
                                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /opt/ros/dashing/include/librealsense2/hpp/rs_sensor.hpp:8:0,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_device.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_record_playback.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_context.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/rs.hpp:9,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_t265.hpp:19,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_t265.cpp:24:
/opt/ros/dashing/include/librealsense2/hpp/rs_frame.hpp: In lambda function:
/opt/ros/dashing/include/librealsense2/hpp/rs_frame.hpp:932:120: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                     if (frame.get_profile().stream_type() == RS2_STREAM_INFRARED && frame.get_profile().stream_index() == index)
                                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /opt/ros/dashing/include/librealsense2/hpp/rs_context.hpp:9:0,
                 from /opt/ros/dashing/include/librealsense2/rs.hpp:9,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:21:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp: In constructor ‘rs2::processing_block::processing_block(std::shared_ptr<rs2_processing_block>)’:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:295:47: warning: ‘rs2::processing_block::_block’ will be initialized after [-Wreorder]
         std::shared_ptr<rs2_processing_block> _block;
                                               ^~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:265:63: warning:   base ‘rs2::options’ [-Wreorder]
             : _block(block), options((rs2_options*)block.get())
                                                               ^
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:264:9: warning:   when initialized here [-Wreorder]
         processing_block(std::shared_ptr<rs2_processing_block> block)
         ^~~~~~~~~~~~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp: In constructor ‘rs2::processing_block::processing_block(std::shared_ptr<rs2_processing_block>, int)’:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:296:21: warning: ‘rs2::processing_block::_queue’ will be initialized after [-Wreorder]
         frame_queue _queue;
                     ^~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:290:83: warning:   base ‘rs2::options’ [-Wreorder]
             : _block(block), _queue(queue_size), options((rs2_options*)block.get())
                                                                                   ^
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:289:9: warning:   when initialized here [-Wreorder]
         processing_block(std::shared_ptr<rs2_processing_block> block, int queue_size)
         ^~~~~~~~~~~~~~~~
In file included from /opt/ros/dashing/include/librealsense2/hpp/rs_context.hpp:9:0,
                 from /opt/ros/dashing/include/librealsense2/rs.hpp:9,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_t265.hpp:19,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_t265.cpp:24:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp: In constructor ‘rs2::processing_block::processing_block(std::shared_ptr<rs2_processing_block>)’:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:295:47: warning: ‘rs2::processing_block::_block’ will be initialized after [-Wreorder]
         std::shared_ptr<rs2_processing_block> _block;
                                               ^~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:265:63: warning:   base ‘rs2::options’ [-Wreorder]
             : _block(block), options((rs2_options*)block.get())
                                                               ^
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:264:9: warning:   when initialized here [-Wreorder]
         processing_block(std::shared_ptr<rs2_processing_block> block)
         ^~~~~~~~~~~~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp: In constructor ‘rs2::processing_block::processing_block(std::shared_ptr<rs2_processing_block>, int)’:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:296:21: warning: ‘rs2::processing_block::_queue’ will be initialized after [-Wreorder]
         frame_queue _queue;```
                     ^~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:290:83: warning:   base ‘rs2::options’ [-Wreorder]
             : _block(block), _queue(queue_size), options((rs2_options*)block.get())
                                                                                   ^
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:289:9: warning:   when initialized here [-Wreorder]
         processing_block(std::shared_ptr<rs2_processing_block> block, int queue_size)
         ^~~~~~~~~~~~~~~~
In file included from /opt/ros/dashing/include/librealsense2/hpp/rs_sensor.hpp:8:0,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_device.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_record_playback.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/hpp/rs_context.hpp:8,
                 from /opt/ros/dashing/include/librealsense2/rs.hpp:9,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_factory.hpp:21,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_factory.cpp:18:
/opt/ros/dashing/include/librealsense2/hpp/rs_frame.hpp: In lambda function:
/opt/ros/dashing/include/librealsense2/hpp/rs_frame.hpp:932:120: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 m_type() == RS2_STREAM_INFRARED && frame.get_profile().stream_index() == index)
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /opt/ros/dashing/include/librealsense2/hpp/rs_context.hpp:9:0,
                 from /opt/ros/dashing/include/librealsense2/rs.hpp:9,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_factory.hpp:21,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_factory.cpp:18:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp: In constructor ‘rs2::processing_block::processing_block(std::shared_ptr<rs2_processing_block>)’:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:295:47: warning: ‘rs2::processing_block::_block’ will be initialized after [-Wreorder]
         std::shared_ptr<rs2_processing_block> _block;
                                               ^~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:265:63: warning:   base ‘rs2::options’ [-Wreorder]
             : _block(block), options((rs2_options*)block.get())
                                                               ^
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:264:9: warning:   when initialized here [-Wreorder]
         processing_block(std::shared_ptr<rs2_processing_block> block)
         ^~~~~~~~~~~~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp: In constructor ‘rs2::processing_block::processing_block(std::shared_ptr<rs2_processing_block>, int)’:
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:296:21: warning: ‘rs2::processing_block::_queue’ will be initialized after [-Wreorder]
         frame_queue _queue;
                     ^~~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:290:83: warning:   base ‘rs2::options’ [-Wreorder]
         : _block(block), _queue(queue_size), options((rs2_options*)block.get())
                                                                               ^
/opt/ros/dashing/include/librealsense2/hpp/rs_processing.hpp:289:9: warning:   when initialized here [-Wreorder]
         processing_block(std::shared_ptr<rs2_processing_block> block, int queue_size)
         ^~~~~~~~~~~~~~~~
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp: In member function ‘void realsense::RealSenseBase::startPipeline()’:
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:94:35: error: no matching function for call to ‘rs2::pipeline::start(rs2::config&, rs2::frame_queue&)’
   pipeline_.start(cfg_, frame_data);
                                   ^
In file included from /opt/ros/dashing/include/librealsense2/rs.hpp:15:0,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:21:
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start()
         pipeline_profile start()
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note:   candidate expects 0 arguments, 2 provided
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start(const rs2::config&)
         pipeline_profile start(const config& config)
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note:   candidate expects 1 argument, 2 provided
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_t265.cpp: In member function ‘virtual void realsense::RealSenseT265::publishTopicsCallback(const rs2::frame&)’:
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_t265.cpp:49:29: error: ‘class rs2::frameset’ has no member named ‘get_fisheye_frame’; did you mean ‘get_depth_frame’?
       auto frame = frameset.get_fisheye_frame(1);
                             ^~~~~~~~~~~~~~~~~
                             get_depth_frame
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_t265.cpp:56:29: error: ‘class rs2::frameset’ has no member named ‘get_fisheye_frame’; did you mean ‘get_depth_frame’?
       auto frame = frameset.get_fisheye_frame(2);
                             ^~~~~~~~~~~~~~~~~
                             get_depth_frame
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp: In member function ‘realsense::Result realsense::RealSenseBase::toggleStream(const stream_index_pair&, const rclcpp::Parameter&)’:
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:432:84: error: no matching function for call to ‘rs2::pipeline::start(rs2::config&, std::_Bind_helper<false, void (realsense::RealSenseBase::*)(const rs2::frame&), realsense::RealSenseBase*, const std::_Placeholder<1>&>::type)’
       std::bind(&RealSenseBase::publishTopicsCallback, this, std::placeholders::_1));
                                                                                    ^
In file included from /opt/ros/dashing/include/librealsense2/rs.hpp:15:0,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:21:
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start()
         pipeline_profile start()
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note:   candidate expects 0 arguments, 2 provided
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start(const rs2::config&)
         pipeline_profile start(const config& config)
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note:   candidate expects 1 argument, 2 provided
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp: In member function ‘realsense::Result realsense::RealSenseBase::changeResolution(const stream_index_pair&, const rclcpp::Parameter&)’:
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:479:86: error: no matching function for call to ‘rs2::pipeline::start(rs2::config&, std::_Bind_helper<false, void (realsense::RealSenseBase::*)(const rs2::frame&), realsense::RealSenseBase*, const std::_Placeholder<1>&>::type)’
         std::bind(&RealSenseBase::publishTopicsCallback, this, std::placeholders::_1));
                                                                                      ^
In file included from /opt/ros/dashing/include/librealsense2/rs.hpp:15:0,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:21:
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start()
         pipeline_profile start()
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note:   candidate expects 0 arguments, 2 provided
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start(const rs2::config&)
         pipeline_profile start(const config& config)
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note:   candidate expects 1 argument, 2 provided
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp: In member function ‘realsense::Result realsense::RealSenseBase::changeFPS(const stream_index_pair&, const rclcpp::Parameter&)’:
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:508:86: error: no matching function for call to ‘rs2::pipeline::start(rs2::config&, std::_Bind_helper<false, void (realsense::RealSenseBase::*)(const rs2::frame&), realsense::RealSenseBase*, const std::_Placeholder<1>&>::type)’
         std::bind(&RealSenseBase::publishTopicsCallback, this, std::placeholders::_1));
                                                                                      ^
In file included from /opt/ros/dashing/include/librealsense2/rs.hpp:15:0,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/include/realsense/rs_base.hpp:31,
                 from /home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_base.cpp:21:
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start()
         pipeline_profile start()
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:366:26: note:   candidate expects 0 arguments, 2 provided
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note: candidate: rs2::pipeline_profile rs2::pipeline::start(const rs2::config&)
         pipeline_profile start(const config& config)
                          ^~~~~
/opt/ros/dashing/include/librealsense2/hpp/rs_pipeline.hpp:395:26: note:   candidate expects 1 argument, 2 provided
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_factory.cpp: In member function ‘void realsense::RealSenseNodeFactory::getDevice(rs2::device_list&)’:
/home/andrea/ros2_ws/src/ros2_intel_realsense/realsense_ros/src/rs_factory.cpp:157:12: error: ‘class rs2::context’ has no member named ‘unload_tracking_module’
       ctx_.unload_tracking_module();
            ^~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/realsense_ros.dir/src/rs_t265.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/realsense_ros.dir/src/rs_factory.cpp.o] Error 1
make[2]: *** [CMakeFiles/realsense_ros.dir/src/rs_base.cpp.o] Error 1
make[1]: *** [CMakeFiles/realsense_ros.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< realsense_ros [3.08s, exited with code 2]

Summary: 1 package finished [3.78s]
  1 package failed: realsense_ros
  1 package had stderr output: realsense_ros
  2 packages not processed

Is there no solution to this problem?

AndreaEirale commented 3 years ago

No one has a solution for this problem?

AndreaEirale commented 3 years ago

If everyone encounters this problem, the solution is to NOT follow the guide of the readme, which means do not install ros-dashing-librealsense2, which is outdated. The updated version is already installed with SDK. Uninstall it if you have installed it with: sudo apt-get purge ros-dashing-librealsense2

Now a new problem raised, but I'm opening a new issue for this.