agilexrobotics / ranger_ros

ranger_ros
BSD 3-Clause "New" or "Revised" License
29 stars 11 forks source link

Compilation issue #20

Open Saksham-Bhadani opened 5 months ago

Saksham-Bhadani commented 5 months ago

When running catkin build command i get the following error:


Errors     << ranger_base:make /home/dev_pc/agilex_ws/logs/ranger_base/build.make.003.log          
In file included from /home/dev_pc/agilex_ws/src/ugv_sdk/include/ugv_sdk/details/robot_base/agilex_base.hpp:21,
                 from /home/dev_pc/agilex_ws/src/ugv_sdk/include/ugv_sdk/details/robot_base/ranger_base.hpp:19,
                 from /home/dev_pc/agilex_ws/src/ugv_sdk/include/ugv_sdk/mobile_robot/ranger_robot.hpp:15,
                 from /home/dev_pc/agilex_ws/src/ranger_ros/ranger_base/include/ranger_base/ranger_messenger.hpp:34,
                 from /home/dev_pc/agilex_ws/src/ranger_ros/ranger_base/src/ranger_messenger.cpp:10:
/home/dev_pc/agilex_ws/src/ugv_sdk/include/ugv_sdk/details/async_port/async_can.hpp:61:16: error: ‘basic_stream_descriptor’ in namespace ‘asio::posix’ does not name a template type; did you mean ‘stream_descriptor’?
   61 |   asio::posix::basic_stream_descriptor<> socketcan_stream_;
      |                ^~~~~~~~~~~~~~~~~~~~~~~
      |                stream_descriptor
/home/dev_pc/agilex_ws/src/ugv_sdk/include/ugv_sdk/details/async_port/async_can.hpp:68:34: error: ‘asio::posix::basic_stream_descriptor’ has not been declared
   68 |                     asio::posix::basic_stream_descriptor<> &stream);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~
/home/dev_pc/agilex_ws/src/ugv_sdk/include/ugv_sdk/details/async_port/async_can.hpp:68:57: error: expected ‘,’ or ‘...’ before ‘<’ token
   68 |                     asio::posix::basic_stream_descriptor<> &stream);
      |    
```                                                     ^
Saksham-Bhadani commented 5 months ago

Found another issue on the scout_ros, which is pretty much the same. scout_ros/issue/5

The recommended solution: adding this to scout_base/CMakeLists.txt

target_compile_definitions(scout_base_node PUBLIC ASIO_ENABLE_OLD_SERVICES)

results in another issue in compilation:


Errors     << ranger_base:check /home/dev_pc/agilex_ws/logs/ranger_base/build.check.007.log        
CMake Error at /home/dev_pc/agilex_ws/src/ranger_ros/ranger_base/CMakeLists.txt:148 (target_compile_definitions):
  Cannot specify compile definitions for target "ranger_base" which is not
  built by this project.