ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cannot see the scan data of rplidar on raspberry pi

asked 2015-05-10 20:38:28 -0600

krist gravatar image

updated 2015-05-10 20:39:18 -0600

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?

edit retag flag offensive close merge delete

Comments

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

PT gravatar image PT  ( 2015-07-14 14:55:51 -0600 )edit

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.

krist gravatar image krist  ( 2015-07-15 02:05:40 -0600 )edit

This may be an issue of Raspberry Pi. I use a USB hub, and solve the problem, so weired......

krist gravatar image krist  ( 2015-07-15 02:06:26 -0600 )edit

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.

PT gravatar image PT  ( 2015-07-15 14:08:25 -0600 )edit

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

PT gravatar image PT  ( 2015-09-04 20:29:37 -0600 )edit

No, I don't have a 2nd battery.

krist gravatar image krist  ( 2015-09-04 21:29:32 -0600 )edit

hmmm, so a usb hub without additional power somehow works... interesting... let me give it a shot. thanks!

PT gravatar image PT  ( 2015-09-04 21:52:33 -0600 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2015-09-05 16:31:28 -0600

PT gravatar image

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. :)

edit flag offensive delete link more

Comments

You did a great job, I'm sure I will try it, thanks!

krist gravatar image krist  ( 2015-09-05 20:52:19 -0600 )edit

It works. correct answer.

Pablo Iñigo Blasco gravatar image Pablo Iñigo Blasco  ( 2015-09-08 09:30:51 -0600 )edit

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!!

Hobbert Evergreen gravatar image Hobbert Evergreen  ( 2018-01-05 19:59:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-10 20:38:28 -0600

Seen: 3,713 times

Last updated: Sep 05 '15