Lidar Build Failing

asked 2022-08-14 21:13:24 -0500

jpabla gravatar image

I have a Slamtec RPLidar A1 that I am attempting to set up with ROS2 on Ubuntu on a Raspberry Pi 4.

I first attempted setting up ROS2 Foxy on Ubuntu 20.04. I then tried setting up ROS2 Rolling on Ubuntu 22.04.

In both cases, I followed the instructions on this repository:

https://github.com/Slamtec/sllidar_ros2

I installed ROS2, configured my environment, and created a workspace before cloning the repository and building the package.

For the Foxy on 20.04 build, the colcon build gets stuck at 85%.

For the Rolling on 22.04 build, I received a very extensive error message.

After this, I was guided to try Slamtec's other repository and checkout the ros2 branch. This once again failed on galactic and humble builds. https://github.com/Slamtec/rplidar_ros

Here is what I did for this repository:

  1. Set up a Raspberry Pi 4 with Ubuntu 20.04
  2. Installed ROS2 Galactic according to these instructions: https://docs.ros.org/en/galactic/Inst...
  3. On top of this, I configured my environment with these instructions and a domain ID of 0: https://docs.ros.org/en/galactic/Tuto...

  4. I created a workspace with these instructions: https://docs.ros.org/en/galactic/Tuto...

  5. I cloned the repository that you provided and ran git checkout ros2 to switch to the ros2 branch.

  6. I then went to the root of the workspace and ran colcon build --symlink-install

Here's what the beginning of the error message for the galactic build looks like: ubuntu@ubuntu:~/ros2/slamtec$ colcon build --symlink-install Starting >>> rplidar_ros2 [Processing: rplidar_ros2] --- stderr: rplidar_ros2 In file included from /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/include/rplidar.h:39, from /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/src/sdkcommon.h:48, from /home/ubuntu/ros2/slamtec/src/rplidar_ros/sdk/src/arch/linux/net_socket.cpp:10: /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/include/rplidar_protocol.h:59:14: warning: ISO C++ forbids zero-size array ‘data’ [-Wpedantic] 59 | _u8 data[0]; | ^ In file included from /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/include/rplidar.h:40, from /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/src/sdkcommon.h:48, from /home/ubuntu/ros2/slamtec/src/rplidar_ros/sdk/src/arch/linux/net_socket.cpp:10: /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/include/rplidar_cmd.h:260:18: warning: ISO C++ forbids zero-size array ‘payload’ [-Wpedantic] 260 | _u8 payload[0]; | ^ In file included from /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/include/rplidar.h:39, from /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/src/sdkcommon.h:48, from /home/ubuntu/ros2/slamtec/src/rplidar_ros/sdk/src/hal/thread.cpp:35: /home/ubuntu/ros2/slamtec/src/rplidar_ros/./sdk/include/rplidar_protocol.h:59:14: warning: ISO C++ forbids zero-size array ‘data’ [-Wpedantic] 59 | _u8 data[0]; | ^

I would appreciate tips to make this work. Is there anything I'm missing or can do differently? Do I need to do anything with the SDK?

edit retag flag offensive close merge delete