ObstacleLayer parameters - where to set them?
Hi folks,
I'm trying to migrate my costmap_2d
setup to ROS Hydro which involves configuring layer plugins. Loading the plugins is working so far. But the ObstacleLayer that I use in my local costmap won't subscribe to a observation source topic that is configured in another YAML file.
This is how I've configured my move_base
(launch file):
<node pkg="move_base" name="MoveBase" type="move_base" output="screen">
<rosparam file="$(find otter4_tf)/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find otter4_tf)/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find otter4_tf)/local_costmap_params.yaml" command="load" />
<rosparam file="$(find otter4_tf)/global_costmap_params.yaml" command="load" />
<rosparam file="$(find otter4_tf)/base_local_planner_params.yaml" command="load" />
<param name="base_local_planner" value="base_local_planner/TrajectoryPlannerROS" />
<param name="controller_frequency" type="double" value="5.0" />
</node>
Here's the part of the costmap_common_params.yaml with the configured observation source ir_sensors
:
ir_sensors: {
sensor_frame: 'base_link',
data_type: PointCloud,
topic: '/ir_sensors',
marking: true,
clearing: true,
obstacle_range: 0.8,
raytrace_range: 0.8,
expected_update_rate: 15,
}
And here's the configuration of my local costmap (local_costmap_params.yaml):
local_costmap:
robot_base_frame: 'base_link'
update_frequency: 2.0
publish_frequency: 1.0
static_map: false
rolling_window: true
width: 3
height: 2
resolution: 0.05
plugins:
-
name: footprint
type: "costmap_2d::FootprintLayer"
-
name: obstacles
type: "costmap_2d::ObstacleLayer"
observation_sources: ir_sensors
-
name: inflater
type: "costmap_2d::InflationLayer"
The plugins load but the ObstacleLayer doesn't subscribe to the /ir_sensors topic. It looks like it can't find the observation source setup. I've got a strong feeling that it's some namespace related issue. But I haven't figured out yet how to configure it properly.
Thanks in advance for helping me again!
Cheers, Hendrik