YDLIDAR / ydlidar_ros2_driver

ydlidar driver package under ros2
Other
61 stars 110 forks source link

YDLidar fails health check #4

Closed mjwhite8119 closed 3 years ago

mjwhite8119 commented 3 years ago

I'm getting the following error while running on an X2.

ros2 run ydlidar_ros2_driver ydlidar_ros2_driver_node 
[INFO] [1607667192.059940007] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1

YDLidar SDK initializing
YDLidar SDK has been initialized
[YDLIDAR]:SDK Version: 1.0.2
LiDAR successfully connected
Error, cannot retrieve YDLidar health code: ffffffff
get Device Information Error
[CYdLidar::initialize] Error initializing YDLIDAR check status under [/dev/ydlidar] and [230400].
[ERROR] [1607667194.729046802] [ydlidar_ros2_driver_node]: Unknown error

[INFO] [1607667194.742430593] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Now YDLIDAR is stopping

The lidar runs successfully at the SDK level using ./ydlidar_test so the connection to the port is OK. Any help would be appreciated. Thank you.

mjwhite8119 commented 3 years ago

So the solution for the X4 (sorry I said X2 previously) was to set the baud rate to 128000 and set the support_motor_dir parameter equal to true in the params/ydlidar.yaml file. The lesson here is that you must know the parameter settings for you YDLidar model because it fails with very few diagnostics.