YDLIDAR / sdk

ydlidar sdk
Other
7 stars 4 forks source link

G4 - [CYdLidar] Failed to turn on the Lidar, because the lidar is [No error]. #20

Open vincebot opened 2 years ago

vincebot commented 2 years ago

when i try to start my lidar with ydlidar_test.py, i get :

YDLidar SDK initializing YDLidar SDK has been initialized [YDLIDAR]:SDK Version: 1.0.3 LiDAR successfully connected [YDLIDAR]:Lidar running correctly ! The health status: good [YDLIDAR] Connection established in [/dev/ttyUSB1][230400]: Firmware version: 3.2 Hardware version: 3 Model: G4 Serial: 2021101000070073 [YDLIDAR INFO] Current Scan Frequency: 10.000000Hz LiDAR init success! 140168977721088 thread has been canceled [CYdLidar] Failed to turn on the Lidar, because the lidar is [No error].

lidar start spinning but after some seconds it die.

thehamzan6 commented 2 years ago

YDLidar X2 with the same problem.

Osayd701 commented 2 years ago

Same any solutions? Tried even using the windows driver to check if the sensor is ok but if says failed to start on cloud viewer

Nhe-Fix commented 2 years ago

Hello ! Same error here, multiple YDlidar G2 bought and 99% of the time I run into this kind of error (either [No error] or [Laser failure]). Only twice could I have a running lidar process, (but without scans...)

Used on Ubuntu 20.04, under ROS2 Foxy, after SDK installation.

Errors encountered using SDK's process : ydlidar_test

  1. ydlidar4
  2. ydlidar5 Please select the lidar port:0 Baudrate:
  3. 115200
  4. 128000
  5. 153600
  6. 230400
  7. 512000 Please select the lidar baudrate:3 Whether the Lidar is one-way communication[yes/no]:yes YDLidar SDK initializing YDLidar SDK has been initialized [YDLIDAR]:SDK Version: 1.0.3 LiDAR successfully connected [YDLIDAR]:Lidar running correctly ! The health status: good LiDAR init success! 140503858501376 thread has been canceled [CYdLidar] Failed to turn on the Lidar, because the lidar is [No error].

Errors encountered using Driver's cmd : ros2 launch ydlidar_ros2_driver ydlidar_launch.py

[ydlidar_ros2_driver_node-1] [INFO] [1652707458.256045981] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1 [ydlidar_ros2_driver_node-1] [ydlidar_ros2_driver_node-1] YDLidar SDK initializing [ydlidar_ros2_driver_node-1] YDLidar SDK has been initialized [ydlidar_ros2_driver_node-1] [YDLIDAR]:SDK Version: 1.0.3 [static_transform_publisher-2] [INFO] [1652707458.292926671] [static_tf_pub_laser]: Spinning until killed publishing transform from 'base_link' to 'laser_frame' [ydlidar_ros2_driver_node-1] LiDAR successfully connected [ydlidar_ros2_driver_node-1] [YDLIDAR]:Lidar running correctly ! The health status: good [ydlidar_ros2_driver_node-1] [YDLIDAR] Connection established in [/dev/ttyUSB1][230400]: [ydlidar_ros2_driver_node-1] Firmware version: 3.5 [ydlidar_ros2_driver_node-1] Hardware version: 3 [ydlidar_ros2_driver_node-1] Model: G2B [ydlidar_ros2_driver_node-1] Serial: 2022021500070326 [ydlidar_ros2_driver_node-1] [YDLIDAR INFO] Current Scan Frequency: 10.000000Hz [ydlidar_ros2_driver_node-1] [YDLIDAR INFO] Successfully obtained the corrected offset angle[0.000000] from the lidar[2022021500070326] [ydlidar_ros2_driver_node-1] LiDAR init success! [ydlidar_ros2_driver_node-1] 139926544840448 thread has been canceled [ydlidar_ros2_driver_node-1] [CYdLidar] Failed to turn on the Lidar, because the lidar is [Laser Failure]. [ydlidar_ros2_driver_node-1] [INFO] [1652707466.586622332] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Now YDLIDAR is stopping ....... [INFO] [ydlidar_ros2_driver_node-1]: process has finished cleanly [pid 36527]

If someone happens to have a solution, I would be really grateful :-)

happy-dev-lab commented 1 year ago

Hello

I met same error on YDLiDAR x4 @RPi4 Ubuntu20.04, but it was solved.

I re-download "YDLiDARx4 SDK" from "https://www.ydlidar.com/service_support.html" (Not this git SDK that is little bit different with YDLiDARx4SDK)

And re-build on same flow as below. cd sdk/build cmake .. make sudo make install

And then, run "build/ydlidar_test" on "Baudrate: 128000"

It work on my environment for now.

I'm glad if this help. Have a good LiDAR life !!

Thank you image

wangsiyong0 commented 1 year ago

image

happy-dev-lab commented 1 year ago

To : wangsiyong0

Pls choice 1 on baundrate not 0. And did you set access rights for USB ?

rohanyrane commented 3 months ago

I am having the same problem with G2 model, I tried both with git and website SDK but it persists.

Try method by Nhe-Fix It works

rohanyrane commented 3 months ago

I am having the same problem with G2 model, I tried both with git and website SDK but it persists.

Try method by Nhe-Fix It works

Nhe-Fix also asks for the solution, which method Nhe-Fix recommends? I would be glad if you clarify 🙏🏻

Sorry not nhe fix Happy dev one Try different baudrates One will definitely work

Then there is some file where we need to change the baudrate for lidar