[Documentation] [TitleIndex] [WordIndex

Note: This tutorial assumes that you have completed the previous tutorials: ROS Tutorials.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Using SICK Laser Scanners with the sicktoolbox_wrapper

Description: This tutorial is an introduction to using a SICK laser scanner connected to a desktop. After reading this tutorial, you should be able to bring up the sicklms node and display the laser data.

Keywords: SICK, laser, driver, LMS200, LMS291

Tutorial Level: BEGINNER


Start by getting the dependencies and compiling the driver and rviz.

$ rosdep install sicktoolbox_wrapper rviz
$ rosmake sicktoolbox_wrapper rviz

Powered On and Plugged In

Make sure that your SICK laser is plugged in via USB or serial port and the green power light is on.

NOTE: The RS232 TX and RX lines on the SICK LMS200/LMS291 are reversed. You will need a crossover or null modem cable for the data connection to work properly.

Configuring the SICK

Make sure that the sicklms node will be able to access the SICK laser scanner.

Start by listing the permissions of the SICK connection, this assumes you are using a usb to serial adapter.

ls -l /dev/ttyUSB0

You will see something similar to:

If XX is rw: the laser is configured properly.

If XX is --: the laser is not configured properly and you need to:

sudo chmod a+rw /dev/ttyUSB0

Starting a roscore

For the sicklms node to work properly, a ros core must be running. In a new terminal:

$ roscore

Setting Parameters

Before we can run the sicklms node we need to make sure that we have the correct configurations loaded on the parameter server.

$ rosparam set sicklms/port /dev/XXX (this is the port that the SICK is connected to /dev/ttyUSB0, /dev/lms200, etc...)
$ rosparam set sicklms/baud 38400

Running the sicklms node

In a new terminal, run the sicklms:

$ rosrun sicktoolbox_wrapper sicklms

You will see something similar to:

Variation: Setting parameters on the command-line

Instead of using rosparam to set parameters, you can set them on the command line when launching sicklms, e.g.:

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

Viewing the data

To see that everything is working and data is being published to ros, in a new terminal:

$ rosrun rviz rviz 

You will see the laser scan in rviz:


2020-03-28 13:11