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

setting up a tf for SICK Laser Scanner PLS101-312

asked 2014-10-08 10:24:52 -0500

MKI gravatar image

Hi,

I am currently working with a 2d laser scanner (PLS101-312). There are no registered drivers available for this device in the ROS repositories. however, following this answer, I was able to find a fork on git here, which works pretty fine on the device I am working on. I could also see the stream of laser data using $ rostopic echo /scan

My question here is, How can I view the laser scan data on rviz? When tried the /scan topic on rviz, I get an error saying that the frame for laser_scanner cannot be /world, the example here shows that it is being set to a base_laser. how can I do the same? I am aware that, there should be a tf for my laser_scanner, what would be the simplest way of setting up a tf for the laser, just for testing the laser scanner output? please suggest, some Ideas.

Thanks again,

Murali

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-10-14 11:30:45 -0500

MKI gravatar image

updated 2014-10-15 09:52:29 -0500

Well, Just for the record. the steps I followed to setup the SICK PLS 101-312 scanner on ROS groovy are:

  1. create a workspace and clone the pls_wrapper into this directory as shown below.

    $ mkdir ~/sickplsws/src;cd ~/sickplsws/src; sudo git clone https://github.com/hawesie/laser_drivers.git

  2. now to build this source code, with rosmake.

  3. Start your ros master in a new terminal $ roscore and in the old terminal where you sourced the catkin package, type the below command $ rosrun sicktoolbox_pls_wrapper sick_pls_wrapper _port:=/dev/ttyUSB0 _baud:=38400 (Note: you should be able to tab autofill after you type sicktoolbox_ ... if not, check if you have built the source code properly or not). This command will take a while (assuming that you are connecting the laser at /dev/ttyUSB0 and with a baud of 38400).
  4. Now in a new terminal type $ rostopic echo /scan, if you have done everything right you should a get stream of serial data being pushed into your PC terminal. Now the important part, CTRL+C, scroll up in the same screen and find out what header message you are getting in the data stream you received serially. Note down what is against the > Frame : laser_xx
  5. in another terminal, type $ rosrun rviz rviz, click Add-> laser scanner and under the laser scanner find the topic and make it as /scan. if you get an error now, just make the global fixed_frame as laser_xx or to whatever you find from step 4.

And you should be able to see the data spread on the 2D plane of RVIZ.

Cheers,

edit flag offensive delete link more

Comments

Just wanted to let you know that your steps worked for me. I did have to make one change as noted here. I'm using Kinetic.

Eric

hipystix gravatar image hipystix  ( 2016-11-20 22:05:25 -0500 )edit
1

answered 2014-10-08 10:30:37 -0500

dornhege gravatar image

If you just want to see the laser data, just type in whatever frame is in the scan message into fixed_frame in rviz.

edit flag offensive delete link more

Comments

Hi, the node has only one topic being published (/scan) , there is no frame associated with the laser. Also using any random frame, throws up an error on rviz.

MKI gravatar image MKI  ( 2014-10-08 10:51:29 -0500 )edit

The laser message will have some frame. use that in rviz. The name doesn't matter, if the laser isn't mounted to anything.

dornhege gravatar image dornhege  ( 2014-10-08 11:26:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-10-08 10:24:52 -0500

Seen: 1,720 times

Last updated: Oct 15 '14