0
$\begingroup$

Rosanswers logo

So I am using gmapping slam_gmapping base:=scan with rosstage and things are going nicely. (I am using rviz). There are two questions which I am sure are nooby, but I can't find the answers anywhere.

(I am putting the frames inside () because I am not sure how else to signify the difference)

  1. The first problem is /tf (base_footprint) and /tf (base_link) and /tf (base_laser_link) all give me a believable value of 7.9, .83 (I let the robot move in a straight line for a little bit). However, if I am reading the gslam tutorial correctly, I should be using /tf (/map) for the transform in the map space. It is giving me the following values -0.004988, -0.01188 The size of the map is 4000,4000 and the resolution is .05. But I am not sure how to tranform these values into real world values.

  2. I am hoping that the answer for the first question will answer the second one, but I am given an occupancy grid for a map that is 4000 X 4000 I need to be able to translate Slam coordinates (or real world coordinates) into this discrete space. Is this the same transfer function as the /tf(/map)?

Thank

~BM


Originally posted by BlackManta on ROS Answers with karma: 56 on 2011-04-23

Post score: 0


Original comments

Comment by BlackManta on 2011-04-23:
If this reposted I am sorry, my web-browser did something stupid.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hello,

I'm not sure if I fully understand what you want to do. In a typical case, you should have a main robot frame, say base_link, that should represent your robot. The transformation map->base_link gives you the position of the robot (in meters) from the origin of the map.

This origin is fixed in the yaml file you use to initialize map_server (see section 2.2). It is a bit tricky, as the origin is in fact the bottom left pixel of the map picture.

To know how far your robot moved from its position of origin in the map, you need to store the first transform map->base_link and use it as your "zero".

Hope it helps

Raph


Originally posted by raphael favier with karma: 1382 on 2011-04-24

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.