yujinrobot / yujin_lidar

all sources for the Yujin lidar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

vshlojha opened this issue · comments

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

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