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

Configuring robot footprint in costmap_2d

asked 2019-02-26 05:53:39 -0600

halberd gravatar image

updated 2019-02-26 06:28:14 -0600

I have attempted to find the answer previously, however I have only found scraps that did not directly point to the treasure.

I am working on a rectangular-shaped robot of which I'd want to display its rough size in rviz. I found that this needed to be configured in the costmap_common_params.yaml file. In there, I have added the following:

inflation_layer:
    footprint: [[-0.31, -0.69], [-0.31, 0.25], [0.31, 0,25], [0.31, -0.69]]
    footprint_padding: 0.05

These are the estimated dimensions in centimeters from the center point of the robot's two wheels (diff drive). The backside of the robot is indeed larger, which is why I'd want this displayed to keep track of its turning. (the base is derived off an electric wheelchair, with two caster wheels at the rear end.)

To symbolize the robot's design: (L = LIDAR sensor, 0 = motorized wheels. x = base point of the robot, C = Caster wheels)

 ----L----
0-   x   -0
 -       -
 -       -
 C       C
 ---------

Additionally, the environment is set up using the standard followed throughout the tutorials (global_planner, base_local_planner, costmap2d) and no custom packages/configurations are being used.

Upon rebooting the robot and its navigation stack, I found that these parameters are not applied and the footprint is still presented as a circle around the base, among with other changes in the configuration files being ignored.

In short, the question would be: "How can I properly configure the robot's footprint to be represented in rviz"?

edit retag flag offensive close merge delete

Comments

This may point to a more general problem with loading parameters (does move_base take your updated footprint into account fi?), so it would help if you tell us a little more about the specific setup that you use: are you using the "standard" navigation config files, a custom pkg? Etc.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-26 05:56:17 -0600 )edit
1

Also:

These are the estimated dimensions in centimeters from the center point of the robot's two wheels (diff drive).

I assume you meant to write "in metres" there: everything in ROS is in (derived) SI units. Your robot would also be about 1cm^2 if these were actual centimetres.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-26 05:57:25 -0600 )edit

As far as I am aware, the default navigation stack is being used without any custom plugins or configuration files. the common costmap yaml is included innavigation.launch. As for the measurements, my intention was to write down "0.3 meter", therefore I might have used the wrong words indeed

halberd gravatar image halberd  ( 2019-02-26 06:18:47 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2019-02-26 08:29:28 -0600

Delb gravatar image
footprint: [[-0.31, -0.69], [-0.31, 0.25], [0.31, 0,25], [0.31, -0.69]]
                                                   ^

Is this a typo when writing your question here ? That should return an error. But I believe you don't have any errors because you don't define the footprint in the correct scope. You define it inside the infaltion_layer, the footprint isn't a parameter related to the inflation_layer but a global one (global as common for the local and global costmaps).

Try putting the footprint and footprint_padding params with the other common params and it should define the footprint as desired.

edit flag offensive delete link more

Comments

...Oh dear, I overlooked that one. That was copied straight out of the configuration file.

Having made those amendments, I now have a rectangular footprint in rviz, apologies for the typo!

halberd gravatar image halberd  ( 2019-02-26 08:32:10 -0600 )edit

The issue was only due to the typo ? You didn't have to define the footprint outside the inflation layer ?

Delb gravatar image Delb  ( 2019-02-26 08:35:44 -0600 )edit

Most of it was due to the typo I'd imagine, I did move the footprint lines outside of the inflation_layer and defined them globally in the file since they're global parameters as you said.

halberd gravatar image halberd  ( 2019-02-27 03:03:22 -0600 )edit

Alright, good to know. Can you mark the question as answered (check mark icon next to answer) if your problem is fully solved ? That'll put more visibility for future readers encountering the same issue.

Delb gravatar image Delb  ( 2019-02-27 03:17:01 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-02-26 05:53:39 -0600

Seen: 6,614 times

Last updated: Feb 26 '19