move_base footprint connection error

asked 2021-06-11 06:19:36 -0600

Py gravatar image

When running move_base, I'm getting a roswtf error suggesting that my robot footprint cannot be found and connected despite specifying it in the costmap_common_params.yaml file, as shown below. Could anyone suggest what may be wrong with my configuration?

roswtf error:

ERROR The following nodes should be connected but aren't:
 * /move_base->/move_base (/move_base/global_costmap/footprint)
 * /move_base->/move_base (/move_base/local_costmap/footprint)

costmap_common_params.yaml:

origin_z: 0.0
z_resolution: 1
z_voxels: 2

obstacle_range: 2.5
raytrace_range: 3.0

publish_voxel_map: false
transform_tolerance: 0.5
meter_scoring: true

footprint: [[-0.21, -0.165], [-0.21, 0.165], [0.21, 0.165], [0.21, -0.165]]
footprint_padding: 0.1

plugins:
  - {name: obstacles_layer, type: "costmap_2d::ObstacleLayer"}
  - {name: inflater_layer, type: "costmap_2d::InflationLayer"}

obstacles_layer:
  observation_sources: scan
  scan: {sensor_frame: front_laser, data_type: LaserScan, topic: front/scan, marking: true, clearing: true, min_obstacle_height: -2.0, max_obstacle_height: 2.0, obstacle_range: 2.5, raytrace_range: 3.0}

inflater_layer:
  inflation_radius: 0.30
edit retag flag offensive close merge delete

Comments

rosparam get /move_base/global_costmap/footprint

Are you able to read the value you set when you did the above?

miura gravatar image miura  ( 2021-06-12 09:10:17 -0600 )edit

Yes I can read the set values like this.

Py gravatar image Py  ( 2021-06-12 09:29:56 -0600 )edit

'[[-0.21, -0.165], [-0.21, 0.165], [0.21, 0.165], [0.21, -0.165]]'

I think it is a string as shown above. I tried varying the parameters and found that roswtf does not give an error if it is displayed as an array like this.

- [-0.21, -0.165]
- [-0.21, 0.165]
- [0.21, 0.165]
- [0.21, -0.165]

I have not been able to identify what separates an array from a string, but I hope this helps.

miura gravatar image miura  ( 2021-06-13 05:24:28 -0600 )edit

Thats very interesting.... thanks! How exactly do I write it like this in costmap_common_params.yaml? Would the footprint line be replaced with this for example:

footprint: [[-0.21, -0.165],
                [-0.21, 0.165],
                [0.21, 0.165],
                [0.21, -0.165]]
Py gravatar image Py  ( 2021-06-13 11:45:43 -0600 )edit

The only thing I can remember that worked was changing the plugins. I did the following, and set the topic used by static_layer2 to something that did not exist. At that time, there was no error in footprint.

plugins:
  - {name: static_layer1, type: "costmap_2d:: StaticLayer"}
  - {name: static_layer2, type: "costmap_2d:: StaticLayer"}
  - {name: obstacles_layer, type: "costmap_2d::ObstacleLayer"}
  - {name: inflater_layer, type: "costmap_2d::InflationLayer"}

I haven't been able to figure out why.

miura gravatar image miura  ( 2021-06-13 18:58:01 -0600 )edit