Closed thehamzan6 closed 2 years ago
I fixed the problem.
Under the python code, since the Lidar X2 is one-way communication, I have to set the following line:
laser.setlidaropt(ydlidar.LidarPropSingleChannel, False);
To
laser.setlidaropt(ydlidar.LidarPropSingleChannel, True);
$ python3 test.py
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!
3052528704 thread has been canceled
[CYdLidar] Failed to turn on the Lidar, because the lidar is [No error].
I am receiving this error now. How odd. Anyone has any idea?
Changing the baud_rate to:
laser.setlidaropt(ydlidar.LidarPropSerialBaudrate, 230400);
to
laser.setlidaropt(ydlidar.LidarPropSerialBaudrate, 115200);
Fixed the error.
If I run ./ydlidar-test, it works fine. However, running with python, it does not work.
I receive the following error: