Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros2 run sllidar_ros2 sllidar_node #13

Open
xiaoc10020015 opened this issue Sep 4, 2022 · 4 comments
Open

ros2 run sllidar_ros2 sllidar_node #13

xiaoc10020015 opened this issue Sep 4, 2022 · 4 comments

Comments

@xiaoc10020015
Copy link

ros2 humble error:
jeff@jeff-smp:/smp_ws$ source install/setup.bash
jeff@jeff-smp:
/smp_ws$ ros2 run sllidar_ros2 sllidar_node
[INFO] [1662300722.249945517] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0
[ERROR] [1662300722.292923769] [sllidar_node]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT!
[ros2run]: Process exited with failure 255
jeff@jeff-smp:~/smp_ws$ ls /dev | grep ttyUSB**
ttyUSB0

@MagicalBrain
Copy link

I have the same problem before. My operation system version is Ubuntu 18.04, ROS2 version is eloquent, device platform is Nvidia jetson nano(4GB mermory).
After I try some commads, the A2M12 does work very well, and I can see data with rviz2 tool.

First of all, I check USB ports. Use lsusb command to find out which USB port is my A2.
lsusb result as follows:

jetson@Nano:~$ lsusb
Bus 002 Device 004: ID 8086:0ad4 Intel Corp.
Bus 002 Device 003: ID 05e3:0626 Genesys Logic, Inc.
Bus 002 Device 002: ID 2109:0817 VIA Labs, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 010: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Bus 001 Device 006: ID 24ae:2013
Bus 001 Device 005: ID 25a7:fa70
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 2109:2817 VIA Labs, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So, /dev/bus/usb/001/010 is my RPLiDAR A2. Then run this commands:
sudo chmod 777 /dev/bus/usb/001/010

And then, check /dev/ttyUSB0 is my RPLiDAR or not. In my device, it is.
run: sudo chmod 777 /dev/ttyUSB0

Secondly, try to run sllidar_node by correct baud rate, and my the correct baud rate of A2M12 is 256000.
So, I run node successfully by command: ros2 launch sllidar_ros2 view_sllidar_launch.py serial_baudrate:=256000

However, it can work in virtual machine, and doesn't work in Nano, I find the problem is power supply of usb.
Because the virtual machine is on my PC with 5V1.3A, and Nano is 5V?A ( I don't know).
Finally, I pull out the HDMI in Nano, then it does work well in Nano.

@xiaoc10020015
Copy link
Author

xiaoc10020015 commented Sep 9, 2022 via email

@KarsonKang
Copy link

I met the same problem here, the sllidar_node is working when I use ros2 launch sllidar_ros2 view_sllidar_launch.py command. But when I use ros2 run sllidar_ros2 sllidar_node to run the single node, the same error come out:

ros2 run sllidar_ros2 sllidar_node 
[INFO] [1685514051.594998751] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0
[ERROR] [1685514057.071174262] [sllidar_node]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT! 
[ros2run]: Process exited with failure 255

@xiaoc10020015
Copy link
Author

xiaoc10020015 commented May 31, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants