RESULT_OPERATION_TIMEOUT error on raspberry pi 3 B when interfacing RPLIDAR A1 with rplidar_ros package

asked 2018-10-29 22:00:55 -0600

ameykasar gravatar image

updated 2018-10-30 09:37:56 -0600

I am trying to interface RPLIDAR A1 with my Raspberry Pi 3 B 2015 Model running ubuntu 16.04 and ROS kinetic.

I am receiving the following error: RESULT_OPERATION_TIMEOUT when I use roslaunch rplidar_ros rplidar.launch

I tried using multiple OS images and the standalone SDK but the error persists.

Using the SDK: I am receiving the following error when I run ultra_simple /dev/ttyUSB0: Error, cannot bind to the specified serial port /dev/ttyUSB0.

I receive the following error when I run simple_grabber /dev/ttyUSB0: Error, operation timed out

It works fine on my PC running Ubuntu 16.04 and ROS kinetic with same USB cable and usb to serial converter.

I have the correct permissions set for /dev/ttyUSB0 and the correct udev rules and the user is a member of the dialout group. Is this due to Raspberry Pi 3 B only having USB 2.0 ports? Or is the port blocked? Help me find a solution

EDIT:

1] THE SUMMARY WHEN I RUN roslaunch rplidar_ros rplidar.launch

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /rplidarNode/angle_compensate: True
 * /rplidarNode/frame_id: laser
 * /rplidarNode/inverted: False
 * /rplidarNode/serial_baudrate: 115200
 * /rplidarNode/serial_port: /dev/ttyUSB0

NODES
  /
    rplidarNode (rplidar_ros/rplidarNode)

ROS_MASTER_URI=http://ubiquityrobot.local:11311

process[rplidarNode-1]: started with pid [2130]
[ INFO] [1455209103.213060755]: RPLIDAR running on ROS package rplidar_ros. SDK Version:1.9.0
[ERROR] [1455209107.721312732]: Error, operation time out. RESULT_OPERATION_TIMEOUT! 
[rplidarNode-1] process has died [pid 2130, exit code 255, cmd /home/ubuntu/x/devel/lib/rplidar_ros/rplidarNode __name:=rplidarNode __log:=/home/ubuntu/.ros/log/708a8734-d0dc-11e5-a840-9bebfff8ab49/rplidarNode-1.log].
log file: /home/ubuntu/.ros/log/708a8734-d0dc-11e5-a840-9bebfff8ab49/rplidarNode-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

2] OUTPUT of dmesg

usb 1-1.4: Product: CP2102 USB to UART Bridge Controller
usb 1-1.4: Manufacturer: Silicon Labs
usb 1-1.4: SerialNumber: 0001
cp210x 1-1.4:1.0: cp210x converter detected
usb 1-1.4: cp210x converter now attached to ttyUSB0

3] OUTPUT of ls -al /dev/ttyUSB0

crw-rw---- 1 root dialout 188, 0 Feb 11 16:35 /dev/ttyUSB0
edit retag flag offensive close merge delete

Comments

Can anyone give the steps to configure raspberry pi ports so that I can figure out if I'm missing something?

ameykasar gravatar imageameykasar ( 2018-10-30 01:41:52 -0600 )edit
1

Can you paste the last lines of dmesg after inserting the rplidar?

Humpelstilzchen gravatar imageHumpelstilzchen ( 2018-10-30 01:56:53 -0600 )edit
1

The first thing to check is whether /dev/ttyUSB0 actually exists. Some platforms use different names for (serial to) USB ports. After having inserted the rplidar, what is the output of ls -al /dev/ttyUSB0?

gvdhoorn gravatar imagegvdhoorn ( 2018-10-30 03:22:13 -0600 )edit

THE FOLLOWING IS THE OUTPUT OF dmesg

usb 1-1.4: Product: CP2102 USB to UART Bridge Controller
usb 1-1.4: Manufacturer: Silicon Labs
usb 1-1.4: SerialNumber: 0001
cp210x 1-1.4:1.0: cp210x converter detected
usb 1-1.4: cp210x converter now attached to ttyUSB0
ameykasar gravatar imageameykasar ( 2018-10-30 09:19:50 -0600 )edit

OUTPUT FOR ls -al /dev/ttyUSB0

crw-rw---- 1 root dialout 188, 0 Feb 11 16:35 /dev/ttyUSB0
ameykasar gravatar imageameykasar ( 2018-10-30 09:22:37 -0600 )edit
1

Can you please paste more dmesg lines after trying to read the scanner?? My guess is a power failure from the rpi to supply the current for the scanner.

Humpelstilzchen gravatar imageHumpelstilzchen ( 2018-10-30 11:53:00 -0600 )edit

UPDATED dmesg log: https://goo.gl/i72xh5 When you mentioned power failure, I looked closely & noticed that the motor speed is slightly slower when connected to RPi compared to my PC. It is not a huge difference in speed but it is noticeable.

ameykasar gravatar imageameykasar ( 2018-10-30 14:10:03 -0600 )edit

I am powering my RPi with a USB cable. It is highly possible that the cable is dodgy.

It is not possible for me to get an alternate power source at this hour. I will try a new power source and let you know first thing tomorrow morning. Thank you very much sir.

ameykasar gravatar imageameykasar ( 2018-10-30 14:14:32 -0600 )edit