Livox-SDK/livox_detection

Error while using live LIDAR data from Mid 70 lidar

akrv opened this issue · 1 comments

akrv commented

We are using a Livox Mid 70 lidar and trying to run the livox_detection package.

it works perfectly with the provided ros bag. but when we try to run the same program with the live LIDAR data, we see the follow errors: IndexError: too many indices for array on line 197, in LivoxCallback

[ERROR] [1658247201.950686]: bad callback: <bound method Detector.LivoxCallback of <__main__.Detector object at 0x7f6f3226cf10>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "livox_rosdetection.py", line 197, in LivoxCallback
    pointcloud_msg = pcl2.create_cloud_xyz32(header, points_list[:, 0:3])
IndexError: too many indices for array

any help would be appreciated.

akrv commented

The line I have liked below is the problem. We changed the thresholds and we are able to see the points.

for point in pcl2.read_points(msg, skip_nans=True, field_names=("x", "y", "z", "intensity")):