Ask Your Question
1

problem using Sick LMS200 laser with sicktoolbox

asked 2012-01-25 02:33:51 -0600

Puneeth gravatar image

updated 2014-01-28 17:11:11 -0600

ngrennan gravatar image

Hi, I am having problem with sick lms200 laser. I am using rs232 protocall for communication. I am having ubuntu 11.04 and ROS electric. I followed the tutorial on

http://www.ros.org/wiki/sicktoolbox_wrapper/Tutorials/UsingTheSicklms

but I just get these two lines and it stays there indefinitely

* Attempting to initialize the Sick LMS...

 Attempting to open device @ /dev/ttyUSB0

then I tried to change the sicklms.cc file as suggested in this forum and as given here

http://thebattlegoeson.blogspot.com/2011/06/xyz.html

but still i get the same output no differnce

Its been quite a while I am unable to find the solution it would be of great help if any one can suggest me a suitable solution.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

Are you editing files in /opt/ros or did you make a development overlay that contains the sicktoolbox package?
Eric Perko gravatar imageEric Perko ( 2012-01-25 04:04:40 -0600 )edit
I am editing the files in my sicktoolbox package..
Puneeth gravatar imagePuneeth ( 2012-01-25 04:38:50 -0600 )edit
What path do you get if you do 'rospack find sicktoolbox'? I'd just like to confirm that the file you changed is the driver that ROS is trying to load and was actually recompiled with your changes. A package in /opt/ros will be marked as ROS_NOBUILD and so would be skipped when recompiling.
Eric Perko gravatar imageEric Perko ( 2012-01-25 04:51:06 -0600 )edit
/home/mycomp/ros_workspace/sicktoolbox this is the path I get when i do rosfind. sicktoolbox/build/sicktoolbox-1.0/c++/drivers/lms/sicklms-1.0/SickLMS.cc is the path and file i edit. later I go this path in my terminal and do $make all. After that i also do rosmake Sicktoolbox
Puneeth gravatar imagePuneeth ( 2012-01-25 05:00:47 -0600 )edit
1
Can you try "rosmake --pre-clean sicktoolbox_wrapper" to make sure the wrapper class is also rebuilt against the newer sicktoolbox library you are building.
Eric Perko gravatar imageEric Perko ( 2012-01-25 05:43:54 -0600 )edit
thanks it worked.. :)
Puneeth gravatar imagePuneeth ( 2012-01-26 04:26:15 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-01-26 04:24:58 -0600

Puneeth gravatar image

updated 2012-01-26 04:25:45 -0600

Hi Eric, thank you. I tried "rosmake --pre-clean sicktoolbox_wrapper" and it worked.

Here is the steps I followed.(In case any one is having trouble)

1) download sicktoolbox

2)rosmake sicktoolbox

3)open this file (your_ros_installation_directory)/ros/diamondback/stacks/sicktoolbox/build/sicktoolbox-1.0/c++/drivers/lms/sicklms-1.0/SickLMS.cc . Go to line 2317. 3) In this line, add the O_NDELAY flag as shown here:

if((_sick_fd = open(_sick_device_path.c_str(), O_RDWR | O_NOCTTY| O_NDELAY)) < 0) {

throw SickIOException("SickLMS::_setupConnection: - Unable to open serial port");

}

4)After this line, add a system sleep call for 30 seconds. This is required so as to allow the sick laser to start up and start scanning.

sleep(30); // actually It worked fine for me without adding this line as well, but it didn't for my friend

5)go to ros/diamondback/stacks/sicktoolbox/build/sicktoolbox-1.0/c++/drivers/lms/sicklms-1.0/

and

$ make all 6)$rosmake sicktoolbax

7)$rosmake sicktoolbox_wrapper

8)rosmake --pre-clean sicktoolbox_wrapper

9) then continue with the tutorials

10)you should see the scan in RVIZ..

once again thank you Eric and all the best for for others.

edit flag offensive delete link more

Comments

Could you open a ticket against laser_drivers so that this can be evaluated for adding to the released stacks?
Eric Perko gravatar imageEric Perko ( 2012-01-26 04:51:58 -0600 )edit
ok will do it..
Puneeth gravatar imagePuneeth ( 2012-01-26 04:58:30 -0600 )edit
0

answered 2012-10-15 21:58:43 -0600

sven_007 gravatar image

On the step 5,I came across two mistakes: SickLMS.cc:2317: error: expected unqualified-id before 'if' SickLMS.cc:2322: error: expected constructor, destructor, or type conversion before '(' token make: * [SickLMS.lo] Error 1 Any one can help me ?Thanks in advance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-01-25 02:33:51 -0600

Seen: 1,579 times

Last updated: Oct 15 '12