Ask Your Question

Converting laser_scan_matcher demo to use hokuyo node input

asked 2011-09-01 16:39:33 -0500

Tim C gravatar image

updated 2014-01-28 17:10:20 -0500

ngrennan gravatar image

Hi, I have a hokuyo Lidar compatible with hokuyo_node package and can run it fine. And, I've also run the default laser_scan_matcher demo executed from roslaunch.

My goal is to see the same demo but using live laser scan messages. I'm new to ROS so I'm sure I'm missing something.

I've taken the default demo.launch file and cut out the rosbag part and started a hokuyo_node instead, but I don't appear to see anything the rvis. I've used rxgraph to compare the to and the only piece I don't understand is the purpose and necessity of the "clock" topic from rosbag to laser_scan_matcher. It's not mentioned in the scarce documentation.

Would someone please offer direction on how to substitude the laser scans from rosbag to a hokuyo_node.


edit retag flag offensive close merge delete


Hi, I also have the same question, have you solved it yet?

Jister gravatar image Jister  ( 2015-05-23 07:18:48 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2011-09-02 03:50:55 -0500

updated 2011-09-02 03:57:49 -0500

Here is a launch file that should work:

  <node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_node"/>

  <node pkg="laser_scan_matcher" type="laser_scan_matcher_node"
    name="laser_scan_matcher_node" output="screen">
    <param name="use_alpha_beta" value="true"/>
    <param name="max_iterations" value="10"/>

  <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser"
    args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /laser 40" />


The first node launches the hokuyo_node driver, the second one launches the laser_scan_matcher, and the third one provides the neccessary tf from the base_link to the laser frame.

The parameters in the laser_scan_matcher aren't required, but tweaking them will probably improve performance. Check the documentation to see what the parameter options are and to find out what works best for you.


The clock parameter is documented here.

edit flag offensive delete link more

answered 2011-09-01 20:12:07 -0500

This could be a problem with timestamps, try setting this parameter to false (clock documentation)

 <param name="/use_sim_time" value="false"/>

Anyway you should check the laser_scan_matcher documentation to see if there are any other parameters you have to change (for example the topic's name or frame names).
If so, you have to add them into the laser_scan_matcher call. (launch documentation)

edit flag offensive delete link more

answered 2011-09-01 17:45:07 -0500

Zack gravatar image

updated 2011-09-01 17:48:56 -0500

The demo.bag file only contains:

sensor_msgs/LaserScan [90c7ef2dc6895d81024acba2ac42f369]

topics: /scan 360 msgs : sensor_msgs/LaserScan

Are you getting any message from the laser scanner?

you can type: "rostopic hz scan"

to find out if the your laser scanner is publishing to ros correctly.

Can u also post your launch file?

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


Asked: 2011-09-01 16:39:33 -0500

Seen: 1,169 times

Last updated: Jan 28 '14