Ask Your Question
1

Errors using sicktoolbox_wrapper on Powerbot

asked Dec 07 '11

wkr101 gravatar image wkr101
53 1 5

updated Mar 21

I'm having an issue using sicktoolbox_wrapper on the MobileRobots Powerbot. I've looked through the related threads but my issue appears to be a bit different. For reference, these are the threads I'm referring to:

1) sicklms failed to initialize!

2) SICK laser driver fails to start after initialization and handshake?

3) Unable to get data from sick laser on Pioneer

The third seems most promising since it appears to be an issue related to MobileRobots and a solution for the Pioneer was found by adding a delay into the source code. I also read the information in the link Abhijit provided regarding the laser integration board.

Since I'm working with the Powerbot, there is in fact a switch on the side of the robot that must be turned on prior to using the laser. I did so and gave it quite a bit of time to warm up, with all the lights green etc. I have experienced the same issue others have addressed in the threads above, however, I'm not always observing the same output. The weird thing is I'm not doing anything different each time. For instance, one attempt will result in an output similar to thread 1) and 3):

usr@powerbot:~$ rosrun sicktoolbox_wrapper sicklms

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

SickLMS::_setTermSpeed: ioctl() failed while trying to get serial port info! NOTE: This is normal when connected via USB! SickLMS::_setTerminalBaud: ioctl() failed while trying to set serial port info! NOTE: This is normal when connected via USB! Device opened! Attempting to start buffer monitor... Buffer monitor started! Attempting to set requested baud rate... A Timeout Occurred! 2 tries remaining A Timeout Occurred! 1 tries remaining A Timeout Occurred - SickLIDAR::_sendMessageAndGetReply: Attempted max number of tries w/o success! Failed to set requested baud rate... Attempting to detect LMS baud rate... Checking 19200bps... SickLMS::_setTermSpeed: ioctl() failed while trying to get serial port info! NOTE: This is normal when connected via USB! SickLMS::_setTerminalBaud: ioctl() failed while trying to set serial port info! NOTE: This is normal when connected via USB! A Timeout Occurred! 2 tries remaining A Timeout Occurred! 1 tries remaining A Timeout Occurred - SickLIDAR::_sendMessageAndGetReply: Attempted max number of tries w/o success! Checking 38400bps... SickLMS::_setTermSpeed: ioctl() fThe other platform is simply a laptop running Natty and ROS Diamondback. I used an identical laser to that connected to the PowerBot. I attempted this with two different serial-to-USB converters: FTDI FT232R and Prolific PL2303 both with and without a null modem cable. ailed while trying to get serial port info! NOTE: This is normal when connected via USB! SickLMS::_setTerminalBaud: ioctl() failed while trying to set serial port info! NOTE: This is normal when connected via USB! A Timeout Occurred! 2 tries remaining A Timeout Occurred! 1 tries remaining A Timeout Occurred - SickLIDAR::_sendMessageAndGetReply: Attempted max number of tries w/o success! Checking 500Kbps... ERROR: I/O exception - SickLMS::_setTerminalBaud: ioctl() failed! ERROR: I/O exception - SickLMS::_setTerminalBaud: ioctl() failed! ERROR: I/O exception - SickLMS::_setTerminalBaud: ioctl() failed! ERROR: Sick thread exception - SickBufferMonitor::AcquireDataStream: pthread_mutex_lock() failed! ERROR: Sick thread exception - SickBufferMonitor::AcquireDataStream: pthread_mutex_lock() failed! ... ERROR: Sick thread exception - SickBufferMonitor::AcquireDataStream: pthread_mutex_lock() failed! ERROR: Sick thread exception - SickBufferMonitor::AcquireDataStream: pthread_mutex_lock() failed! ERROR: Sick thread exception - SickBufferMonitor::AcquireDataStream: pthread_mutex_lock() failed!

Running the same command will then sometimes yield the next error, which is more similar to thread 2). After connecting at 38400 baud and the data stream starts, I begin getting the following warniThe other platform is simply a laptop running Natty and ROS Diamondback. I used an identical laser to that connected to the PowerBot. I attempted this with two different serial-to-USB converters: FTDI FT232R and Prolific PL2303 both with and without a null modem cable. ng which repeats many times:

[ WARN] [1323229374.089444553]: A scan was probably missed. The last scan was 0.181478 seconds ago.

This repeats until it finally crashes:

[ERROR] [1323229381.489953672]: woah! error!
terminate called after throwing The other platform is simply a laptop running Natty and ROS Diamondback.  I used an identical laser to that connected to the PowerBot.  I attempted this with two different serial-to-USB converters: FTDI FT232R and Prolific PL2303 both with and without a null modem cable. an instance of 'SickToolbox::SickThreadException'
Aborted
I am using Diamondback on Lucid and I obtained sicktoolbox_wrapper by installing the laser_drivers stack using precompiled binaries (apt-get install). I'm able to get the laser to work using Player so I've pretty much ruled out a hardware issue. If anyone has any suggestions I'm open to them. The other platform is simply a laptop running Natty and ROS Diamondback. I used an identical laser to that connected to the PowerBot. I attempted this with two different serial-to-USB converters: FTDI FT232R and Prolific PL2303 both with and without a null modem cable.

UPDATE: 3-6-2012

I've revisited this issue and have it so I'm getting results that are consistently the same.

usr@powerbot:~$ rosrun sicktoolbox_wrapper sicklms

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

SickLMS::_setTermSpeed: ioctl() failed while trying to get serial port info! NOTE: This is normal when connected via USB! SickLMS::_setTerminalBaud: ioctl() failed while trying to set serial port info! NOTE: This is normal when connected via USB! Device opened! Attempting to start buffer monitor... Buffer monitor started! Attempting to set requested baud rate... SickLMS::_setTermSpeed: ioctl() failed while trying to get serial port info! NOTE: This is normal when connected via USB! SickLMS::_setTerminalBaud: ioctl() failed while trying to set serial port info! NOTE: This is normal when connected via USB! Operating @ 38400bps Attempting to sync driver... Driver synchronized! * Init. complete: Sick LMS is online and ready! Sick Type: Sick LMS 200-30106 Scan Angle: 180 (deg) Scan Resolution: 0.5 (deg) Measuring Mode: 8m/80m; fields A,B,Dazzle Measuring Units: Centimeters (cm)

Requesting partial scan data stream...
    Data stream started!

^C[ WARN] [1331088810.897225808]: A scan was probably missed. The last scan was 0.108228 seconds ago. * Attempting to uninitialize the Sick LMS... SickLMS::_setTermSpeed: ioctl() failed while trying to get serial port info! NOTE: This is normal when connected via USB! SickLMS::_setTerminalBaud: ioctl() failed while trying to set serial port info! NOTE: This is normal when connected via USB! Attempting to stop buffer monitor... Buffer monitor stopped! * Uninit. complete - Sick LMS is now offline!

The stream of warnings continue until I CTRL+C to kill the process. Also, I've let the process keep running and checked rviz, observing no data.

I downloaded sicktoolbox and compiled from source, adding the delay as indicated in thread 3) above. This didn't affect the result except a delay (~30 sec. as expected) was noticed after sicklms attempts to open the device at /dev/ttyUSB0.

I've attempted the same tutorial with an identical SICK LMS-200 on a laptop computer running Diamondback on Natty. Again, I tried using sicktoolbox directly from the laser-drivers stack and then one I compiled from source, adding the delay. I also attempted this using two different serial-to-USB converters (FTDI FT232R and Prolific PL2303) both with and without null modem cables. In all cases, the results are the same yielding a constant stream of missed scans.

I'm wondering if this could be related to the port settings somehow? I accidentally attempted to run sicklms without first changing the permissions as directed in the tutorial and my results didn't change.

delete close flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered Mar 06

Eric Perko gravatar image Eric Perko flag of United States
5281 27 53 101
http://ericperko.com/

updated Apr 05

Errors related to "missed scans" in the 0.5 degree mode may be related to ticket #4673. Try setting your laser to 1 degree mode and see if the missed scan errors go away.

UPDATE: See the resolution to the ticket. This "missed scans" functionality was removed, as it was not an accurate indication of scans being missed. Diagnostics were added to monitor the publishing rate of the driver.

link delete flag offensive edit

Comments

Thanks for the feedback. How would I go about changing the degree mode?

wkr101 (Mar 06)edit

Set the ~resolution parameter (detailed here: http://www.ros.org/wiki/sicktoolbox_wrapper ) to 1.0 . You'd use a command like rosrun sicktoolbox_wrapper sicklms _resolution:=1.0 .

Eric Perko (Mar 07)edit

Thanks. I did in fact try that but alas, no luck on either platform. Still getting the missed scans.

wkr101 (Mar 07)edit

See the update to my answer regarding the solution to this problem.

Eric Perko (Apr 05)edit
0

answered Feb 22

Swaminathan gravatar image Swaminathan
1

Hey, were you able to solve the problem? I am having the same issue.

link delete flag offensive edit
0

answered Mar 06

wkr101 gravatar image wkr101
53 1 5

updated Mar 06

I've edited the original question and have determined this isn't a PowerBot specific problem. I've tried implementing this on another platform and have observed the exact same results, which are evidently missed scans.

In all attempts on both platforms, the results are the same. I'm wondering if this thread should be closed / reopened into a different thread since this is not only an issue with the PowerBot?

link delete flag offensive edit

Comments

You can edit the title too.

tfoote (Mar 21)edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: Dec 07 '11

Seen: 174 times

Last updated: Apr 05