Configuring robot footprint in costmap_2d
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"?
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.Also:
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.
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 in
navigation.launch
. As for the measurements, my intention was to write down "0.3 meter", therefore I might have used the wrong words indeed