Ask Your Question
0

How to use depthimage_to_laserscan package to create map?

asked 2016-10-25 01:09:26 -0500

Dhagash Desai gravatar image

I am running rosrun depthimage_to_laserscan depthimage_to_laserscan and the scan topic is published and when I rosbag record -o /scan /tf the scan topic is not been recorded and the map is not created. I am new to ros and also read thewiki page bit didn't understand how to do that any suggestion. I want to make a 2D map to implement localization.

edit retag flag offensive close merge delete

Comments

Plz anyone...

Dhagash Desai gravatar imageDhagash Desai ( 2016-10-25 01:28:31 -0500 )edit
2

Really? A bump after ~20 minutes? This is not a (slow)chat ..

gvdhoorn gravatar imagegvdhoorn ( 2016-10-25 01:47:55 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
1

answered 2016-11-02 21:34:01 -0500

Download the gmapping package sudo apt-get install ros-[version]-gmapping. Then I would suggest launching both nodes using a launch file like so:

<launch>

    <!--- Depth image to laser scan -->
    <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan" >
        <param name="scan_height" value="3"/> 
        <param name="output_frame_id" value="base_link"/>
        <remap from="image" to="camera/depth/image_rect_color" />
    </node>

    <!-- Maping Node -->
    <node pkg="gmapping" type="slam_gmapping" name="gmapping_node" output="screen" >
        <remap from="odom" to="your/odom/topic" />
    </node>

</launch>
edit flag offensive delete link more
0

answered 2016-10-25 04:02:21 -0500

Yang gravatar image

1.Launch the robot,kinect,depthimage_to_laserscan,gmapping. 2.Your tf tree shoud be map->odom->base_link->camera_link. 3.Then you can see the map in rviz.

edit flag offensive delete link more
0

answered 2019-01-01 18:49:22 -0500

q8wwe gravatar image

are you sure output_frame_id should be base_link or it should be camera_depth_frame

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

1 follower

Stats

Asked: 2016-10-25 01:09:26 -0500

Seen: 2,021 times

Last updated: Jan 01