Ask Your Question
0

How to provide transform between costmap frame and robot frame?

asked 2014-03-28 11:04:04 -0600

oswinium gravatar image

updated 2014-03-31 05:24:54 -0600

So a costmap_2d tutorial says this:

image description

My questions are:

Since this is ONE solution, what other ones are there?

And, more specifically, how does turtlebot_navigation/amcl_demo.launch provide the transform between the map_file loaded and the turtlebot? (Because there is no such line (as in the picture above) in its launch file).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-31 05:48:17 -0600

demmeln gravatar image

updated 2014-03-31 22:36:26 -0600

Any solution that publishes to TF is possible in theory. You can use th API to do that directly from within on of your nodes, you can use URDF+robot_state_publisher, ... I guess the question is really what are you trying to do?

Regarding the amcl demo, the amcl node publishes a TF from odom to map and base_link to map is provided by the turtlebot driver node, but this is not about costmaps, but rather gridmaps, so not sure where this question is coming from.

Edit:

If you are using amcl to localize against a gridmap, you do not need the static_transform_publisher node of the tutorial, as the transform between base_link and map is provided by your localization module. The static transform node is just very useful for tutorial or testing purposes or in cases where you actually want a static transform (usually the transform between base_link and map changes, unless your robot is not moving).

edit flag offensive delete link more

Comments

About the first point, nothing specific for now; I was just wondering how else the transform is able to be done for maps :) And regarding the second, I don't know the difference between costmaps and gridmaps; I thought the map that amcl_demo.launch runs IS a costmap :S

oswinium gravatar imageoswinium ( 2014-03-31 08:05:38 -0600 )edit
1

The gridmap is used for laser *localization*. The costmap is used for *navigation*, i.e. local or global path planning an obstacle avoidance. The two are related, but not the same. The gridmap can be a source or layer of the costmap, as the tutorial you linked describes.

demmeln gravatar imagedemmeln ( 2014-03-31 22:33:54 -0600 )edit

So, is the gridmap here the same as the grid layer in this tutorial: http://wiki.ros.org/costmap_2d/Tutorials/Creating%20a%20New%20Layer

oswinium gravatar imageoswinium ( 2014-04-02 09:12:32 -0600 )edit
1

No, this tutorial is about creating a new type of layer. The gridmap comes into play in the costmap as an existing plugin, namely the costmap_2d::StaticLayer. Look at this tutorial: http://wiki.ros.org/costmap_2d/Tutorials/Configuring%20Layered%20Costmaps

demmeln gravatar imagedemmeln ( 2014-04-02 09:26:47 -0600 )edit

Right, I went through both tutorials and am confused how to combine the two together. How do I load the layers I created in "Creating a New Layer" onto a costmap via "Configuring Layered Costmaps"? (Thanks for your time, Sir :)

oswinium gravatar imageoswinium ( 2014-04-02 09:46:27 -0600 )edit
1

I have not actually tried this myself, but from the Tutorials it seems that you would add your custom layer to the list of plugins in the parameter yaml file, for example with `type: "simple_layer_namespace::SimpleLayer"`.

demmeln gravatar imagedemmeln ( 2014-04-02 10:19:31 -0600 )edit

Are you actually creating a custom layer, or do you want to add the gridmap as a layer?

demmeln gravatar imagedemmeln ( 2014-04-02 10:19:34 -0600 )edit

I am creating a custom layer as per the tutorial i.e. to add a LETHAL_OBSTACLE one meter ahead of the robot. Also, I know how to add my custom layer to the list of plugins, but I do NOT know which "parameter yaml" file to do so in - which one does amcl_demo.launch use? (Isn't gridmap there default?)

oswinium gravatar imageoswinium ( 2014-04-03 11:00:47 -0600 )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: 2014-03-28 11:04:04 -0600

Seen: 709 times

Last updated: Mar 31 '14