Ask Your Question
1

how to create a 2D map from laser scan data

asked 2016-01-23 12:03:17 -0500

David John gravatar image

updated 2016-02-19 10:26:07 -0500

Hi all, I'm new to ROS. I'm using ROS INDIGO and kinect for my project.I want to create a map from the laser scan data without having odometry data .I converted the depth image to laser scan data.Then how can I create a map using Gmapping for the hand held kinect using this laser scan data?

edited question. i used hectorslam and there is some problem with tf. using rosrun tf view_frames i got image description and this is my laaunch file for depthimage_to_laserscan kinect.launch


<launch>

<node name="depthimage_to_laserscan" pkg="depthimage_to_laserscan" type="depthimage_to_laserscan">

<remap from="image" to="/camera/depth_registered/image_raw"/>

</node>

</launch>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2016-01-23 12:11:27 -0500

jseal gravatar image

Trying looking into hector_mapping. It will build you a map from laser scans and doesn't require odometry data.

edit flag offensive delete link more

Comments

thank you sir...it worked for me.Is there any other method using gmapping to do the same.?I read that there is another method using gmapping with laser_scan_matcher. I tried to install it but i was not able to do that.Could you please help me to install this package?

David John gravatar image David John  ( 2016-01-24 02:46:07 -0500 )edit

I'm not sure. If you couldn't get laser_scan_matcher to install I would try asking a question with the problem.

jseal gravatar image jseal  ( 2016-01-24 18:58:17 -0500 )edit

Hi sir,i am able to get a 2d map with hectorslam using turtlebot package.But now when i am doing it with real kinect I'am getting an error` "[ WARN] [1453709644.419967908]: No transform between frames /map and scanmatcher_frame available after 20.001889 seconds of waiting."'sir please help.

David John gravatar image David John  ( 2016-02-03 08:52:00 -0500 )edit

Sounds like your missing a transform in your tf data. Check the required transforms for the nodes your running. You can look at a pdf of your tf tree with: rosrun tf view_frames

jseal gravatar image jseal  ( 2016-02-03 20:08:23 -0500 )edit

edited previous question

David John gravatar image David John  ( 2016-02-04 23:51:08 -0500 )edit
spmaniato gravatar image spmaniato  ( 2016-02-14 14:32:10 -0500 )edit

did it like this,but still getting the same error.

David John gravatar image David John  ( 2016-02-15 03:16:31 -0500 )edit
1

answered 2016-02-14 14:38:26 -0500

spmaniato gravatar image

updated 2016-02-14 14:38:58 -0500

You can either use hector_mapping, as jseal suggested, or a combination of laser_scan_matcher and slam_gmapping (or even slam_karto). You'll first need to install it:

sudo apt-get install ros-indigo-scan-tools

Then, here's an excerpt of how you'd run it from a launch file in order to "fake" odometry:

<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="use_imu" value="false" type="bool"/>
  <param name="use_odom" value="false" type="bool"/>
  <param name="max_iterations" value="10"/>
</node>
edit flag offensive delete link more

Comments

did like this also...but there is nothing uder the topic /map.

David John gravatar image David John  ( 2016-02-15 03:41:07 -0500 )edit

Did you launch slam_gmapping in addition to the laser_scan_matcher and a transform between your base_link and your laser?

spmaniato gravatar image spmaniato  ( 2016-02-15 08:07:38 -0500 )edit

i lauched slam_gmapping and laser_scan_matcher.........but i didn't do that transform part.could you please help me to do that part.

David John gravatar image David John  ( 2016-02-15 09:06:48 -0500 )edit

You need a transform between the base_link frame and your laser frame (camera_link in your case). Assuming the camera is fixed to the base, you'd add something like:

<node pkg="tf" type="static_transform_publisher" name="base_to_laser"
  args="0 0 0 0 0 0 1 /base_link /camera_link 50" />
spmaniato gravatar image spmaniato  ( 2016-02-15 09:58:14 -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

1 follower

Stats

Asked: 2016-01-23 12:03:17 -0500

Seen: 2,835 times

Last updated: Feb 19 '16