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

Unable to get data from sick laser on Pioneer

asked 2011-03-04 21:55:00 -0600

Aravindhan K Krishnan gravatar image

updated 2011-03-07 14:21:42 -0600

Eric Perko gravatar image

I am using sicktoolbox_wrapper to get laser scans from sicklms200 in diamondback. I am following the procedure described here ( http://www.ros.org/wiki/sicktoolbox_w... )

I get the following message and nothing happens after that.

    *** Attempting to initialize the Sick LMS...
    Attempting to open device @ /dev/ttyUSB0

The program waits here indefinitely.

No data is being sent on the topic "/scan" as well. (Ran 'rostopic echo /scan'. ) Any help?

Update

I have tried using the null modem cable too. The program still waits indefinitely. BTW, I am using Ubuntu 10.10 and Diamondback RC3

edit retag flag offensive close merge delete

Comments

Are you using this on a Pioneer (or some other robot that only turns on the laser when a driver attempts to access the laser)?
Eric Perko gravatar image Eric Perko  ( 2011-03-06 17:28:34 -0600 )edit
I am using p3dx but the laser turns on only when the sicklms node is launched.
Aravindhan K Krishnan gravatar image Aravindhan K Krishnan  ( 2011-03-06 18:53:40 -0600 )edit

6 Answers

Sort by ยป oldest newest most voted
1

answered 2013-10-13 09:01:47 -0600

Chad Rockey gravatar image

This was merged officially into the ROS forks of sicktoolbox and sicktoolbox_wrapper about 2 years ago.

If you're running Groovy or Hydro from debs, please set the connect_delay parameter to something like 30 seconds for the Pioneer. https://github.com/ros-drivers/sicktoolbox_wrapper/blob/hydro-devel/ros/sicklms/sicklms.cpp#L207

You DO NOT need to modify the source code, it's already included in the ROS fork of sicktoolbox. https://github.com/ros-drivers/sicktoolbox/blob/catkin/c%2B%2B/drivers/lms2xx/sicklms2xx/SickLMS2xx.cc#L110

edit flag offensive delete link more
2

answered 2011-03-07 21:41:14 -0600

Aravindhan K Krishnan gravatar image

Solved

Debugged the sicktoolbox. The program was hanging at the open() system call for /dev/ttyUSB0 in SickLMS.cc (line number 2319). Added O_NDELAY flag to the second parameter in open() system call and added a sleep(30) system call after open(). Recompiled the sicktoolbox and things started working.

edit flag offensive delete link more

Comments

Hi Krishnan, I also couldn't find SickLMS.cc file. I downloaded tarball and install(./configure, make, sudo make install). i also tried sudo apt-get install ros-hydro-sicktoolbox. Still no luck. Where n how should i install? thanks in advance

cognitiveRobot gravatar image cognitiveRobot  ( 2013-10-11 01:54:03 -0600 )edit

@cognitiveRobot, I've added a new answer. Please look at that.

Chad Rockey gravatar image Chad Rockey  ( 2013-10-13 08:57:08 -0600 )edit
0

answered 2012-01-24 01:08:22 -0600

Sudhan gravatar image

Hi, I am also having the same problem. I edited the sicklms.cc file but it was still not working.

Guys it will be good if you can share the file here for us.

thank you..

edit flag offensive delete link more
0

answered 2011-03-05 00:29:01 -0600

joq gravatar image

Make sure that /dev/ttyUSB0 is the correct port for your device:

$ dmesg | grep tty

If using a different serial port, set the ~port parameter appropriately:

$ rosrun sicktoolbox_wrapper sicklms _port:=/dev/XXX _baud:=38400

If the port was correct, check that you are using the right kind of serial cable, have valid permissions, etc.

edit flag offensive delete link more
0

answered 2011-03-05 20:15:23 -0600

Abhijit gravatar image

I am also getting a similar error for sick lms200 in diamondback. I have checked the port and set the proper permissions as in the tutorial.

I am able to get data through the standalone Player and Aria packages. Do i need to still do the null modem hack for the ros sick node?

edit flag offensive delete link more

Comments

Are you using this on a Pioneer (or some other robot that only turns on the laser when a driver attempts to access the laser)?
Eric Perko gravatar image Eric Perko  ( 2011-03-07 05:45:59 -0600 )edit
Yes, you are right. the laser turns on, only when the driver attempts to access the laser (its mounted in a pioneer). I was getting an error when it was attempting to set baud-rate. Waiting for some time after the laser turns on and then attempting to set baud rate solves the problem.
Abhijit gravatar image Abhijit  ( 2011-03-07 13:51:02 -0600 )edit
This probably affects most of the lasers mounted on pioneer or similar series of robots. More information at http://robots.mobilerobots.com/wiki/SICK_Laser_Integration_Board
Abhijit gravatar image Abhijit  ( 2011-03-07 22:44:39 -0600 )edit
0

answered 2011-09-29 03:40:54 -0600

Florentin gravatar image

I have the same problem, but cannot find my SickLMS.cc file. I have tried removing and reinstalling diamondback, as well as installing the laser-drivers stack separately. The nautilus search function is still unable to locate the file. I am out of ideas, for now...

edit flag offensive delete link more

Comments

You'll need to install the laser_drivers stack from source in order to get all of the source files. The SickLMS.cc file is included in the tarball that the sicktoolbox package downloads, so it is not included in the .debs . Note trunk may only compile against Electric.
Eric Perko gravatar image Eric Perko  ( 2011-09-29 11:08:35 -0600 )edit

Hi Eric, I also couldn't find SickLMS.cc file. I downloaded tarball and install(./configure, make, sudo make install). Where n how should i install? thanks in advance

cognitiveRobot gravatar image cognitiveRobot  ( 2013-10-11 01:52:01 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2011-03-04 21:55:00 -0600

Seen: 2,375 times

Last updated: Oct 13 '13