ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can not create a map with gmapping

asked 2013-04-11 19:18:34 -0600

Astronaut gravatar image

updated 2013-04-17 00:08:28 -0600

dornhege gravatar image

Hello

Im trying to create a map from a bag file using the gmapping. I have done everything using the tutorial http://www.ros.org/wiki/slam_gmapping/Tutorials/MappingFromLoggedData but when I tried to save the map with the map server it was just waited for the map and nothing happened. My bag file has camera, imu and laser scans. The topics are imu/data and scan.

Here is my launch file

<launch>

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

<node name="rosplay" pkg="rosbag" type="play" args="/home/2011-04-01-14-19-39.bag  --clock"/>


    <node pkg="tf" type="static_transform_publisher" name="baselink_laser" args="0 0 0 0 0 0 /scanmatcher_frame /laser 10"/>
    <node pkg="tf" type="static_transform_publisher" name="laser_imu" args="0 0 0 0 0 0 /laser /base_imu 10"/>


    <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="scanmatcher_frame"/>
        <param name="odom_frame" value="scanmatcher_frame"/>
    <param name="map_frame" value="map"/>

</node>

<!-- Start an rviz node with a custom configuration for the viewpoint, map_server, trajectory, laser scans, etc -->
<node pkg="rviz" type="rviz" output="screen" name="rviz" args="-d $(find pow_analyzer)/launch/pow_rviz.vcg"/>

</launch>

Any help

edit retag flag offensive close merge delete

Comments

Does your gmapping work? What output does it give?

felix k gravatar image felix k  ( 2013-04-12 01:13:01 -0600 )edit

No . I can not get work . I attached the launch file.

Astronaut gravatar image Astronaut  ( 2013-04-16 23:53:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-04-17 00:11:23 -0600

dornhege gravatar image

You are missing odometry in the bag file. gmapping requires that to work.

You can try hector_mapping for a SLAM approach that works without odometry or provide some to gmapping.

edit flag offensive delete link more

Comments

so I need like virtual odometry. I can provide virtual odometry from hector_mapping and feed that to gmapping or??

Astronaut gravatar image Astronaut  ( 2013-04-17 00:15:50 -0600 )edit

Ideally you need real odometry. If you already have hector_mapping, you shouldn't need to run gmapping on top of that?

dornhege gravatar image dornhege  ( 2013-04-17 01:33:46 -0600 )edit

Yes, I already have hector_mapping. So What do you mean to run gmapping on the top of that?? So what do I need??

Astronaut gravatar image Astronaut  ( 2013-04-17 02:13:07 -0600 )edit

Only one of those. They solve the same problem.

dornhege gravatar image dornhege  ( 2013-04-17 02:26:07 -0600 )edit

I do not understand how to run gmapping on the top of hector_mapping. Please can you tell me that??

Astronaut gravatar image Astronaut  ( 2013-04-17 06:14:58 -0600 )edit

My point is that you should NOT need to do that, unless you know what you want to achieve. The default is to use either one.

dornhege gravatar image dornhege  ( 2013-04-17 08:43:12 -0600 )edit

I just wont to compare the two maps from gmapping and hector_mapping and use AMCL and robot_pose_ekf with both of them and also compare the estimated pose. OK?

Astronaut gravatar image Astronaut  ( 2013-04-17 14:25:23 -0600 )edit

The easiest would be to run them one after another on the same log.

dornhege gravatar image dornhege  ( 2013-04-18 00:08:22 -0600 )edit

Question Tools

Stats

Asked: 2013-04-11 19:18:34 -0600

Seen: 2,240 times

Last updated: Apr 17 '13