yangfuyuan / ydlidar_sdk

ydlidar sdk(new version)
GNU General Public License v3.0
15 stars 5 forks source link

Serial port error when starting ydlidar_test #2

Open DaeunGod opened 5 years ago

DaeunGod commented 5 years ago

Hi i'm going to make a drone with ydlidar.

but this sdk's test does not work and i don't have any idea of this error.

If you have any advice please let me know.

overload@overload:~/build$ ./ydlidar_test 
YDLIDAR C++ TEST
Radar[ydlidar1] detected, whether to select current radar(yes/no)?:yes
0. 115200
1. 128000
2. 153600
3. 230400
Please select the lidar baud rate:1
0. false
1. true
Please select the lidar intensity:0
SDK Version: 1..3.7
LIDAR Version: 1.3.7
fhs_lock: creating lockfile:       3038

fhs_unlock: Removing LockFile
[YDLIDAR INFO] Error, cannot bind to the specified serial port /dev/ttyUSB0
Serial port is connection failed. 
SajadSaeediG commented 5 years ago

Similar issue on Ubuntu 16.04

./ydlidar_test YDLIDAR C++ TEST Radar[ydlidar1.8] detected, whether to select current radar(yes/no)?:yes SDK Version: 1..3.7 LIDAR Version: 1.3.7 fhs_lock: creating lockfile: 6652

fhs_unlock: Removing LockFile [YDLIDAR INFO] Error, cannot bind to the specified serial port /dev/ttyUSB0 Serial port is connection failed.

vindevries commented 5 years ago

I had the same issue, it turned out to be the USB cable I was using...

yangfuyuan commented 5 years ago
  1. make sure your serial port is not occupied by another program
yangfuyuan commented 5 years ago

your can try to open the current serial port with the serial port tool. make sure your serial port is normal.

SajadSaeediG commented 5 years ago

I am using YDLIDAR-X4. I downloaded and installed the SDK from here, and it worked: http://www.ydlidar.com/download/5 For G4, use this link: http://www.ydlidar.com/download/17 For F4Pro, use this link: http://www.ydlidar.com/download/11

This is the command that I used to run the driver ./ydlidar_test /dev/ttyUSB0 128000 0

yangfuyuan commented 5 years ago

The original link of these sdk you downloaded: https://github.com/yangfuyuan/sdk

tombooms commented 5 years ago

Thank you for the information regarding remap the port.

Also, I have a favor to ask if you can help.

I am fairly new to the ydlidar and ROS technology and framework and am not quite sure where and how to start processing the LIDAR data. I want to build a SLAM map to determine the right avoidance/obstruction data and trigger or controll a 4 wheeler (with stepper motors). Would you kindly be able to suggest some hints on how to go about accomplish this?

This is for an autonomous robot with wheels project.

Thank you. Tom

vindevries commented 5 years ago

Thank you for the information regarding remap the port.

Also, I have a favor to ask if you can help.

I am fairly new to the ydlidar and ROS technology and framework and am not quite sure where and how to start processing the LIDAR data. I want to build a SLAM map to determine the right avoidance/obstruction data and trigger or controll a 4 wheeler (with stepper motors). Would you kindly be able to suggest some hints on how to go about accomplish this?

This is for an autonomous robot with wheels project.

Thank you. Tom

If you are familiar with ROS I would start here: https://github.com/yangfuyuan/ydlidar_ros. Honestly is was a bit of a struggle for me to get it working, but once it did it worked great!

higortizatto commented 4 years ago

Hi, could you help me? I am having the same problem, I execute the commands arrives in the part of initializing the roslauch ydlidar deal_view.launch, it starts giving driver error. I'm new to ROS.

higortizatto commented 4 years ago

I use ydlidar x2

dereklstinson commented 4 years ago

Run the program as super user. sudo ./ydlidar_test

KaoluAngel commented 1 year ago

Run the program as super user. sudo ./ydlidar_test

Thank you so much, it finally works!!!😇

my issue: Error initializing YDLIDAR check Comms