CygLiDAR-ROS / cyglidar_d1

CygLiDAR D1 - ROS(SDK) Package (ROS1 / ROS2)
https://www.cygbot.com/
BSD 3-Clause "New" or "Revised" License
21 stars 25 forks source link

Segfault in PCL conversion (ROS Noetic) #16

Open mangtronix opened 3 years ago

mangtronix commented 3 years ago

When I run the publisher it segfaults. Sometimes I get a frame of data that shows in rviz. GDB output is below.

I'm using ROS Noetic, Ubuntu 20.04.2, libpcl-dev 1.10.0

$ gdb cyglidar_pcl_publisher Reading symbols from cyglidar_pcl_publisher... (gdb) run Starting program: .../cyglidar_pcl_publisher [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff4bb0700 (LWP 35799)] [New Thread 0x7fffeffff700 (LWP 35801)] [New Thread 0x7fffef7fe700 (LWP 35802)] [New Thread 0x7fffeeffd700 (LWP 35803)] [New Thread 0x7fffee7fc700 (LWP 35804)] [ INFO] [1636473208.336533030]: FREQUENCY: 0 (0) / PULSE CONTROL: 0, DURATION: 0 (0) [ INFO] [1636473208.337702771]: PACKET SENT (START, 0) [ INFO] [1636473209.338267356]: PACKET_FREQUENCY HAS BEEN UPDATED [0] PACKET: 5a,77,ff,2,0,f,0,d

Thread 2 "cyglidar_pcl_pu" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff4bb0700 (LWP 35799)] 0x000055555556c6d9 in pcl_conversions::toPCL (pcl_stamp=, stamp=...) at /opt/ros/noetic/include/ros/time.h:156 156 uint64_t toNSec() const {return static_cast(sec)*1000000000ull + static_cast(nsec); } (gdb) bt

0 0x000055555556c6d9 in pcl_conversions::toPCL (pcl_stamp=, stamp=...) at /opt/ros/noetic/include/ros/time.h:156

1 cloudScatter_2D (start=..., end=..., ANGLE_STEP_2D=3.8623751834033401e+29)

at .../src/cyglidar_d1/src/cyglidar_pcl_publisher.cpp:158

2 0x00007ffff4bafae0 in ?? ()

3 0x0000555555590500 in ?? ()

4 0x000055555556f2a9 in running () at ../cyglidar_d1/src/cyglidar_pcl_publisher.cpp:439

mangtronix commented 3 years ago

What version of ROS does the example work with? It looks like there was a change in the Point Cloud Library for ROS Noetic.

https://varhowto.com/ros-noetic/ The point cloud library is PCL 1.10 in Noetic, compared to 1.8 in Melodic.

cygbot-ros-support commented 3 years ago

Hello magtronix. Sorry for the late reply. We are testing on Noetic. Please wait a little more. Thank you.