Ask Your Question
0

gmapping localization information

asked 2015-04-18 04:07:07 -0500

RND gravatar image

Hello ROS community,

Since gmapping is a SLAM algorithm, I would like to use both the map and the localization being computed by this algorithm. From what I have seen so far, gmapping only publishes the /map and does not provide any such localization information (i.e. an estimate of the robot pose). My question is this:

Is the gmapping package in ROS performing SLAM? If so, can we get localization information directly from it, rather than having to use other packages like amcl, robot_pose_ekf and robot_localization?

I need to have a fairly accurate robot pose estimate within the map that is the result of SLAM gmapping, rather than using the robot pose estimated from the odometry data. I need to use this in an exploration algorithm.

Also, I seem to have a localization problem in gmapping since if the robot is rotated by 180 degrees in an alley, the resulting map is a mess as shown below:gmapping result

I appreciate any help. Thank you!

RND

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2015-04-20 04:55:48 -0500

GMapping does not publish geometry_msgs/PoseWithCovarianceStamped message as robot_pose_ekf and other packages do. Instead it provide transformation from map frame to odom frame. In combination with transformation from odom frame to robot base frame (provided by your odometry) you have estimation of your robot pose.

About the rotation problem you have other informations are needed (about hardware, configuration etc).

Bye Ale

edit flag offensive delete link more

Comments

Do you know how you can get the PoseWithCovarianceStamped from gmapping??? because I use a translator to change odom to pose but the covariance doesn't change and i do not use the entropy. Any idea?

roberto3 gravatar image roberto3  ( 2018-02-21 04:33:39 -0500 )edit
0

answered 2015-04-19 16:00:51 -0500

I don't know if you saw this question: [ http://answers.ros.org/question/60523... ], maybe it can help.

Also I used an exploration node working with gmapping combined with hector_trajectory_server to keep the path of my robot, it was efficient to me but depends on what you want, here was my launchfile:

<launch>    
  <!-- dynamic map generation -->
  <node name="gmapping_node" pkg="gmapping" type="slam_gmapping" respawn="false" >
    <remap to="base_scan" from="scan"/>
    <param name="odom_frame" value="odom_combined" />
    <param name="map_update_interval" value="1" />
  </node>
 <!-- path --> 
  <node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" output="screen">
    <param name="target_frame_name" type="string" value="/map" />
    <param name="source_frame_name" type="string" value="/base_link" />
    <param name="trajectory_update_rate" type="double" value="0.5" />
    <param name="trajectory_publish_rate" type="double" value="0.15" />
  </node> 
</launch>
edit flag offensive delete link more

Comments

Is the hector_trajectory_server used as a localization technique here? Isn't GMapping supposed to do localization as well as mapping though?

RND gravatar image RND  ( 2015-04-20 03:18:34 -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: 2015-04-18 04:07:07 -0500

Seen: 1,444 times

Last updated: Apr 20 '15