Ask Your Question
1

How to use laser_scan_matcher with depthimage_to_laserscan and gmapping?

asked 2015-03-25 04:02:49 -0600

Nightstalker gravatar image

updated 2015-03-25 10:26:29 -0600

I am kinda new to ROS here, so please help me out accordingly.
I am using ROS Indigo on a Ubuntu 14.04 system. I am using an Asus XTion Pro Live to record a bag file of the /scan topic that I am getting from depthimage_to_laserscan node. I can view the scan properly in rviz and also through rosbag play.
Now, the issue is that I want to use gmapping to perform some basic SLAM but I don't have an /odom topic. So I thought of using laser_scan_matcher to get the Pose2D from my "fake" laser scans.
I tried out the demo given here and it worked perfectly. However, when I try it with my own bag file, I don't get any output in rviz.
How can I use laser_scan matcher output with rviz?


EDIT:
Here is what I'm doing so far
1. roscore 2. roslaunch openni2_launch openni2.launch 3. rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw 4. rosrun laser_scan_matcher laser_scan_matcher_node

Here is the error I get from laser_scan_matcher

Could not get initial transform from base to laser frame, "base_link" passed to lookupTransform argument target_frame does not exist.
Skipping scan

Here is my rqt_graph
rqt_graph image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-25 16:47:36 -0600

Nightstalker gravatar image

Okay, got it working. There was an issue with the tf tree being published to laser_scan_matcher.
Here's my working launch file for laser_scan_matcher.
Just replace step 4 with roslaunch <this_launch_file>.launch

<launch>

#### publish an example base_link -> laser transform ###########
### this was the error ###
<!--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" /-->
<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" args="0 0 0 0 0 0 /base_link /camera_link 100"/>

#### start the laser scan_matcher ##############################
<node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">

    <param name="fixed_frame" value = "odom"/>
    <param name="base_frame" value="base_link"/>
    <param name="fixed_frame" value="world"/>
    <param name="use_alpha_beta" value="true"/>
    <param name="use_odom" value="false"/>
    <param name="use_imu" value="false"/>
    <param name="max_iterations" value="10"/>
    <param name="publish_pose" value="true"/>
    <param name="publish_tf" value="true"/>
    <param name="use_vel" value="false"/>

</node>
</launch>
edit flag offensive delete link more

Comments

so how can you see output in rviz? beside this launch file what did you write to see output in rviz?

bsk gravatar imagebsk ( 2016-06-09 09:18:24 -0600 )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

2 followers

Stats

Asked: 2015-03-25 04:02:49 -0600

Seen: 1,599 times

Last updated: Mar 25 '15