yujinrobot / yujin_lidar

all sources for the Yujin lidar
13 stars 12 forks source link

Segment Fault while running the driver code in Ubuntu 18-04 #1

Closed vshlojha closed 4 years ago

vshlojha commented 4 years ago

We were trying to run the driver code in Ubuntu\ following changes were done:

  1. The relative path for the libyrl_library.so file was changed.
  2. The calibration bin path was added in the code.
  3. We are running test_distance_reader.cpp file using the following command for compiling g++ test_distance_reader.cpp -ldl -o test.

After connecting the sensor and running the code it throws a seg-fault. We are also attaching the file that we are running. Can you please help as in what is the issue.

yujin_lidar_driver_ubuntu1804.zip

vshlojha commented 4 years ago

I was missing the linking of the thread library while compiling. Now it is compiling properly. Currently, I am compiling using g++ code.cpp -ldl -lpthread -o. Will check the data and get back. Thanks