Ask Your Question

Using sick_scan and rviz

asked 2019-03-04 12:24:39 -0500

Pol gravatar image

updated 2019-04-03 00:45:49 -0500

jayess gravatar image


I am trying to use rviz to visualize the data I am receiving from my Sick tim561 which is running from my Raspberry Pi. For this, I am using ros kinetic, sick_scan and attempting to follow the instructions on the wiki. I am however having some trouble. I am able to run the roslaunch command with my launch file (sick_scan sick_tim_5xx.launch), and it seems to be working well. From what I can tell it is publishing pointcloud2 to cloud, but I am not quite sure what that means. However I am unsure as to how to get rviz to read that data.

I would also like to add that I am quite new to ROS and this sort of project in general so feel free to add any clarifying points or let me know if you need more information and I will get that to you as soon as I can.


Edit: Launch file -> sick_tim_5xx.launch

<?xml version="1.0"?>    
    <arg name="hostname" default="" />
    <arg name="cloud_topic" default="cloud" />
    <arg name="frame_id" default="cloud" />
    <node name="sick_tim_5xx" pkg="sick_scan" type="sick_generic_caller"  respawn="false" output="screen">

    <param name="scanner_type" type="string" value="sick_tim_5xx" />

    <!-- -135° -->
    <param name="min_ang" type="double" value="-2.35619449" />

    <!-- 135° -->
    <param name="max_ang" type="double" value="2.35619449" />

    <param name="use_binary_protocol" type="bool" value="true" />
    <param name="range_max" type="double" value="100.0" />
    <param name="intensity" type="bool" value="True" />

    <param name="hostname" type="string" value="$(arg hostname)" />
    <param name="cloud_topic" type="string" value="$(arg cloud_topic)"/>
    <param name="frame_id" type="str" value="$(arg frame_id)" />
    <param name="port" type="string" value="2112" />
    <param name="timelimit" type="int" value="5" />

Here is what happens when I run this launch file:

ubuntu@ubiquityrobot:~/catkin_ws$ roslaunch sick_scan sick_tim_5xx.launch
... logging to /home/ubuntu/.ros/log/702e9050-d0dc-11e5-9013-b827eb3e657d/roslaunch-ubiquityrobot-2063.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubiquityrobot.local:41867/


 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /sick_tim_5xx/cloud_topic: cloud
 * /sick_tim_5xx/frame_id: cloud
 * /sick_tim_5xx/hostname:
 * /sick_tim_5xx/intensity: True
 * /sick_tim_5xx/max_ang: 2.35619449
 * /sick_tim_5xx/min_ang: -2.35619449
 * /sick_tim_5xx/port: 2112
 * /sick_tim_5xx/range_max: 100.0
 * /sick_tim_5xx/scanner_type: sick_tim_5xx
 * /sick_tim_5xx/timelimit: 5
 * /sick_tim_5xx/use_binary_protocol: True

    sick_tim_5xx (sick_scan/sick_generic_caller)


process[sick_tim_5xx-1]: started with pid [2081]
[ INFO] [1551880175.138692169]: sick_generic_caller V. 001.003.016
[ INFO] [1551880175.138954563]: Program arguments: /home/ubuntu/catkin_ws/install/lib/sick_scan/sick_generic_caller
[ INFO] [1551880175.139037895]: Program arguments: __name:=sick_tim_5xx
[ INFO] [1551880175.139090395]: Program arguments: __log:=/home/ubuntu/.ros/log/702e9050-d0dc-11e5-9013-b827eb3e657d/sick_tim_5xx-1.log
[ INFO] [1551880175.212545742]: Found sopas_protocol_type param overwriting default protocol:
[ INFO] [1551880175.212803813]: Binary protocol activated
[ INFO] [1551880175.212909385]: Start initialising scanner [Ip:] [Port: 2112]
[ INFO] [1551880175.409250725]: Publishing laserscan-pointcloud2 to cloud
1551880308.5115 ERROR: Tcp::open: Failed to open TCP connection to, aborting.
[ INFO] [1551880308.531176850]: Parameter setting for <active_echo: 0>
[ INFO] [1551880308.733535743 ...
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2019-03-22 18:08:17 -0500

Pol gravatar image

I was able to find the solution by contacting SICK support. Apparently the IP address of the port you connect to and the IP address of the LIDAR need to be similar (eg if LIDAR is then port IP needs to be 10.10.10.XXX). The opposite is also true, however I was unable to change the LIDAR's IP so I changed the ports'. I followed this tutorial and set up a temporary IP on my port. This solved my issue and can now run sick_scan successfully.

edit flag offensive delete link more

answered 2019-03-05 03:46:03 -0500

EdwardNur gravatar image

It means that the package is publishing point clouds that you can use to create 3D sparse map and 2D occupancy grid map in order to use for the navigation and localization afterwards.

When you launch Rviz, it automatically subscribes to /tf and listens to all tf that you have launched. When openning RViz, simply press button "add source" (on the left box) and add by topic. There you can find /cloud topic and simply add it.

edit flag offensive delete link more


Hello thank you for your reply. These steps do not seem to be working for me for some reason. The fixed frame gives an error that says "no tf data" even when I add the reference to topic cloud. Are there any steps, as basic as they may seem, that I might be missing? Thanks.

Pol gravatar image Pol  ( 2019-03-05 13:50:16 -0500 )edit

I just ran "rostopic echo sick_tim_5xx" and it came back saying that sick_tim_5xx is not published yet, even though when I run the launch file it says "Publishing laserscan-pointcloud2 to cloud". What is the disparity here?

Pol gravatar image Pol  ( 2019-03-05 13:59:05 -0500 )edit

@Pol you probably have a wrong TF. Can you show me the launch file

EdwardNur gravatar image EdwardNur  ( 2019-03-06 07:06:47 -0500 )edit

Hello, I am not entirely sure what launch file you are referring to, so I have put the sick_tim_5xx.launch file as well as what happens when I run it above in the original post as an edit. Is this what you were looking for?


Pol gravatar image Pol  ( 2019-03-06 07:55:32 -0500 )edit

@Pol192.168.0.1 is that your IP address? Can you do hostname -I

EdwardNur gravatar image EdwardNur  ( 2019-03-06 08:33:53 -0500 )edit

Hello, I apologize for that I do not believe that is my IP address I was simply trying to do it the quicker way. When I run hostname -I I get However that does not match the IP address of my LIDAR that I found through SOPAS (10 . 97 . 0 . 60). Should I try those IPs?

Pol gravatar image Pol  ( 2019-03-06 09:43:24 -0500 )edit

I also ran nc -z -v -w5 $SCANNERIPADDRESS 2112 with all three addresses and got varied results. For 128... I got connection refused. For 10.97... I got that it timed out. And for 10.42... I also got connection refused. I hope that's helpful.

Pol gravatar image Pol  ( 2019-03-06 12:58:33 -0500 )edit

Your Answer

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

Add Answer

Question Tools



Asked: 2019-03-04 12:24:39 -0500

Seen: 322 times

Last updated: Apr 03 '19