Skip to content

Generic C++ library for SICK laser scanner. Currently we support Windows and Ubuntu 18.04LTS for x86 architectures with this software. Within the demo the gathered data is stored at regular intervals as CSV data and as an image file in JPEG format. The image file shows the scan data in the top view.

License

Notifications You must be signed in to change notification settings

lpc921/sick_scan_base

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sick_scan_base

Generic driver for SICK laser scanner

Generic C++ library for SICK laser scanner. Currently we support Windows and Ubuntu 18.04LTS for x86 architectures with this software. Within the demo the gathered data is stored at regular intervals as CSV data and as an image file in JPEG format. The image file shows the scan data in the top view.

Supported Hardware

This driver should work with all of the following products.

device name part no. description tested?
MRS1104 1081208 4 layer max. range: 64 m, ang. resol. 0.25 [deg] hor., 2.50 [deg] ver. ✔ [stable]
Scan-Rate: 50 Hz, 4x12.5 Hz
TiM551 1060445 1 layer max. range: 10 m, ang. resol. 1.00[deg] ✔ [stable]
Scan-Rate: 15 Hz
TiM561 1071419 1 layer max. range: 10 m, ang. resol. 0.33 [deg] ✔ [stable]
Scan-Rate: 15 Hz
TiM571 1079742 1 layer max. range: 25 m, ang. resol. 0.33 [deg] ✔ [stable]
Scan-Rate: 15 Hz
TiM781 1096807 1 layer max. range: 25 m, ang. resol. 0.33 [deg] ✔ [stable]
Scan-Rate: 15 Hz
TiM781S 1096363 1 layer max. range: 25 m, ang. resol. 0.33 [deg] ✔ [stable]
Scan-Rate: 15 Hz
LMS511-10100 PRO e.g. 1046135 1 layer max. range: 80 m, ang. resol. 0.167 [deg] ✔ [stable]
Scan-Rate: 100 Hz
LMS4xxx-Family e.g. 1091423 1 layer max. range: 3 m, ang. resol. 0,0833 [deg] ✔ [stable]
Scan-Rate: 600 Hz

Installation

To install, follow the steps below:

  1. clone repository
git clone https://github.com/SICKAG/sick_scan_base.git
  1. create Makefile by using cmake
cd sick_scan_base
cmake .
  1. compile the software
make

Running

  1. Start software e.g. with
sick_generic_caller ./launch/sick_mrs_1xxx.launch hostname:=192.168.0.72

In general the software starts with the following options:

sick_generic_caller <launch-file> [<tag1>:=<value1>] [<tag2>:=<value>] ... [<tagn>:=<valuen>]

The tag/value pairs overwrite the settings in the launch file.

Check results

The software starts, connects to the scanner and writes data to the demo directory at regular intervals. It generates a top view scan image and a csv data file.

The HTML file image_viewer.html can be loaded into your favorite browser for checking purposes. The generated scan image is then shown in the browser.

You can find reference outputs in the demo directory.

Parameters

For the launch-file settings and the tag/values pairs the following keywords are supported:

Keyword Meaning Default value Hint
scanner_type Scanner family ??? "sick_mrs_1xxx" is the only one currently supported.
min_ang Start scan angle in [rad] -2.3998277
max_ang End scan angle in [rad] +2.3998277
intensity_resolution_16bit Switch between 8Bit/16Bit "false" do not change
hostname Ip address of scanner 192.168.0.1 change to scanner ip address in your network (see faq)
port port number 2112 do not change, check firewall rules if there is blocking traffic
timelimit Timelimit in [sec] 5 do not change

Supported operating systems

This driver supports the following x86-based operating systems:

  • Ubuntu 18.04 with gcc
  • Windows 10 with Visual Studio Compiler (VS2017, VS2019)

Keywords

MRS1104 MRS1000 MRS1xxx sick_scan SICK LiDAR SICK Laser SICK Laserscanner TiM5xx TiM551 TiM561 TiM571

Support

  • In case of technical support please open a new issue. For optimal support, add the following information to your request:
  1. Scanner model name,
  2. Ros node startup log,
  3. Sopas file of your scanner configuration. The instructions at http://sickusablog.com/create-and-download-a-sopas-file/ show how to create the Sopas file.
  • In case of application support please use https://supportportal.sick.com .
  • Issue Handling: Issues, for which no reply was received from the questioner for more than 7 days, are closed by us because we assume that the user has solved the problem.

Trouble Shooting

The software is very similar to the ROS driver sick_scan. For FAQ and troubleshooting please also have a look at https://github.com/SICKAG/sick_scan

FAQ

"ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.1, aborting."

❓ Question: sick_generic_caller gives you an answer like:

"ERROR: Tcp::open: Failed to open TCP connection to 192.168.0.1, aborting."

✅ Answer:

  1. Try to ping your device:

    ping 192.168.0.1
  2. Disconnect your scanner and retry ping

    ping 192.168.0.1

    The result of ping contains a pattern like

     ... Destination Host Unreachable
  3. Reconnect your device and try to ping:

    ping 192.168.0.1

If you do not know the ip address, try to find the ip address in your subnet:

apt-get install fping

scan your network (for example, subnet 192.168.10.0/24):

192.168.0.1/24

search for all ip addresses from 192.168.0.0 to 192.168.0.255

The result is similar to:

192.168.0.4 is alive
192.168.0.22 is alive

and a lot of unreachable entries. In the example the ip address 192.168.0.4 is the laserscanner MRS1104 and the ip address 192.168.0.22 is the computer running linux. Check this with

ifconfig|grep 192.168.0.22

IP Address of Laser Scanner

❓ Question: My scanner does not use the default ip address. What shall I do?

✅ Answer: There are two options doing this:

  • Permanently:
    Replace the following entry with your ip address.
  <param name="hostname" type="string" value="192.168.0.1" />
  • Temporarily
    Use a command line argument in addition to the launch file argument:
   hostname:=192.168.0.2

Timeout Warning

❓ Question: During start phase the are warning/error message like

no answer received after 5000 ms. Maybe sopas mode is wrong.

and some more warning/error messages:

✅ Answer: In this case the driver tries to start the scanner in binary mode. If this is not possible, warnings and error messages are generated. The driver switches the scanner from ASCII mode to binary mode and then restarts communication. The messages can therefore be ignored. For a long-term solution, we recommend switching from ASCII to binary communication with SOPAS ET under Windows.

Own Data Handling

❓ Question: I would like to process data with my own methods.

✅ Answer: Search for keyword "PUBLISH_DATA:" in the code and replace the code for writing jpeg-files and CSV-files with your own source code.

Known Issues

  • The intensity values in the csv demo file are currently 0.
  • If the scanner type is not selected correctly in the launchfile (e.g. launch->mrs_1xxx hardware->tim_5xx) starts the software and then crashes when receiving the first packet with a "bad pointer".

Creators

Michael Lehning

on behalf of SICK AG


Lehning Logo

About

Generic C++ library for SICK laser scanner. Currently we support Windows and Ubuntu 18.04LTS for x86 architectures with this software. Within the demo the gathered data is stored at regular intervals as CSV data and as an image file in JPEG format. The image file shows the scan data in the top view.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 61.8%
  • C 29.0%
  • HTML 8.3%
  • Makefile 0.7%
  • CMake 0.1%
  • Objective-C 0.1%