Livox-SDK / livox_detection

Livox open source detection algorithm
Apache License 2.0
264 stars 55 forks source link

Error while using live LIDAR data from Mid 70 lidar #34

Closed akrv closed 2 years ago

akrv commented 2 years ago

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 2 years ago

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

https://github.com/Livox-SDK/livox_detection/blob/fe2bd7fed80ec9a1c9f0880936a4c6ca9d508678/livox_rosdetection.py#L190