0
$\begingroup$

Rosanswers logo

Hello everyone, I am running ROS indigo on Raspberry Pi, I successfully installed ROSARIA for Pioneer robot and openni2_camera for Asus Xtion Live Pro, they both works well.

I successfully installed rplidar_ros, the nodes are properly launched, but when I run

$ rostopic echo /scan

I can't see any output. I tried it on my PC(Ubuntu 14.04 LTS, x86_86), everything goes well. I also tried to run the demo of rplidar SDK, the output data is right. It is so strange, could you give me some advice to solve the problem?


Originally posted by krist on ROS Answers with karma: 3 on 2015-05-10

Post score: 0


Original comments

Comment by PT on 2015-07-14:
Hi, I encountered the same problem, and wondering whether you've found a solution yet? I connect rplidar to the Pi via usb. RPLidar health status : 0 (which means ok), but rostopic echo /scan shows nothing as you. Thanks

Comment by krist on 2015-07-15:
Yes, I've got the solution. Here is what I encountered, once I connect rplidar to my laptop, a new device /dev/ttyUSB0 will appear, however, when I tried to read data from it, /dev/ttyUSB0 disappears! This may cause the problem. You can check.

Comment by krist on 2015-07-15:
This may be an issue of Raspberry Pi. I use a USB hub, and solve the problem, so weired......

Comment by PT on 2015-07-15:
I see. thanks for your response. I tried to power the raspberry pi with a 2.1A usb battery pack, and it seems to work (more testing needed for its reliability), but not with 1A power supply. I think the issue might come down to whether we provide enough power or not.

Comment by PT on 2015-09-04:
Hi Krist, my solution with 2.1A usb battery pack is not very reliable. It's good sometimes, but not always. So, when you use the USB hub, do you connect them as battery > RPi > USB hub > RPLidar? Or do you have a 2nd battery pack to power the USB hub? Thanks

Comment by krist on 2015-09-04:
No, I don't have a 2nd battery.

Comment by PT on 2015-09-04:
hmmm, so a usb hub without additional power somehow works... interesting... let me give it a shot. thanks!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As it seems to be a current problem to me, I looked into what's the current limit on my Raspberry Pi 2 Model B, and found that the default limit is 600mA. However, this can be increased to 1.2A. All you need to do is to add a line max_usb_current=1 in /boot/config.txt (see this post for more detail). Then, I encounter no more usb disconnection when start reading and publishing the scan from RPLidar. RPLidar works with Pi like a charm!

I also hooked up a usb current meter between my 2.1A battery pack and the Pi. The reading is 0.4x Amp when just connecting the RPLidar to the Pi. However, when start reading the scan data, the reading increases to 0.5x Amp, which maybe too close to the 0.6A default current limit and causes the usb disconnection. Maybe you don't need the usb hub anymore. :)


Originally posted by PT with karma: 234 on 2015-09-05

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by krist on 2015-09-05:
You did a great job, I'm sure I will try it, thanks!

Comment by Pablo Iñigo Blasco on 2015-09-08:
It works. correct answer.

Comment by Hobbert Evergreen on 2018-01-05:
I am using a Raspberry Pi 3 and that max_usb_current didn´t work!! But when I change to a better power supply, worked fine!! It´s really a matter of energy!! Thanx a lot!! Saved my day!!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.