Myzhar / ldrobot-lidar-ros2

ROS2 package for LDRobot lidar. Based on ROS2 Lifecycle nodes
Apache License 2.0
64 stars 24 forks source link

Trying to build on Iron fails - workaround possible? #15

Open Ennar1991 opened 1 year ago

Ennar1991 commented 1 year ago

Describe the bug I was trying to get into ROS2 for a bit and had an LDLidar LD19 lying around, trying to make it work in ROS2 Iron. I chose Iron as that was what the website suggested to use, as other versions are officially marked as EOL.

On compiling I got the following error:


ubuntu@raspi-ROS2:~/ros2_ws$ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release

Starting >>> ldlidar_component
--- stderr: ldlidar_component
CMake Error at CMakeLists.txt:71 (message):
  ROS2 iron is not officially supported by this package.  Correct working is
  not guarantee.

---
Failed   <<< ldlidar_component [2.66s, exited with code 1]

Summary: 0 packages finished [4.14s]
  1 package failed: ldlidar_component
  1 package had stderr output: ldlidar_component
  2 packages not processed

Desktop (please complete the following information):

Is there a workaround method to get the code to compile anyway? Afaik the data coming out of the Lidar is a stream of bytes being piped in through a USB/TTY interface.

Myzhar commented 1 year ago

@Ennar1991 Iron is not LTS, I'm not sure I will make my package compatible with it.

You can try to remove the DISTRO check in CMakeFiles.txt, maybe it already compile and works correctly