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

Problem with loading social navigation layer plugins on costmap

asked 2017-01-26 10:03:35 -0500

alefag gravatar image

Hello, I am currently using layered costmaps, specifically i am trying to use the social_navigation_layer as described here: http://wiki.ros.org/social_navigation... . The problem is that i can't figure it out what i do wrong; the plugin does not start. These are my .yaml files:

1) costmap_common_params.yaml

obstacle_range: 2.5
raytrace_range: 5.0
footprint: [[0.36,0.0], [0.28, 0.24],[0, 0.36], [-0.47, 0.15], [-0.47,-0.15], [0.0,-0.36], [0.28,-0.24]]

#robot_radius: ir_of_robot
inflation_radius: 0.45
cost_scaling_factor: 10

cost_factor: 0.8
neutral_cost: 50
lethal_cost: 253


obstacle_layer:
    observation_sources: ale_scan
    ale_scan: {data_type: LaserScan, sensor_frame: /robot/frontLaser/MountFrame, clearing: true, marking: true, topic: /ale_scan}

2) global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 10.0
  resolution: 0.05
  static_map: true

plugins:
    - {name: footprint_layer,         type: "costmap_2d::FootprintLayer"}
    - {name: inflation_layer,         type: "costmap_2d::InflationLayer", output: "screen"}
    - {name: static_map,             type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,        type: "costmap_2d::ObstacleLayer", output: "screen"}
    - {name: social_layer,           type: "social_navigation_layers::ProxemicLayer", output: "screen"}
    - {name: social_pass_layer,   type: "social_navigation_layers::PassingLayer", output: "screen"}

3) local_costmap_params.yaml

local_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 10.0
  publish_frequency: 10.0
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05

plugins:
    - {name: footprint_layer,        type: "costmap_2d::FootprintLayer", output: "screen"}
    - {name: inflation_layer,        type: "costmap_2d::InflationLayer", output: "screen"}
    - {name: obstacle_layer,         type: "costmap_2d::ObstacleLayer", output: "screen"}
    - {name: social_layer,           type: "social_navigation_layers::ProxemicLayer", output: "screen"}
    - {name: social_pass_layer,      type: "social_navigation_layers::PassingLayer", output: "screen"}

and this is the launch file:

<launch>
  <master auto="start"/>

  <arg name="map_file" default="$(find ale_coro)/launch/corridoio.yaml"/>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

<!--- Run AMCL -->
  <include file="$(find amcl)/examples/amcl_diff.launch" />
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find ale_coro)/launch/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find ale_coro)/launch/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find ale_coro)/launch/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find ale_coro)/launch/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find ale_coro)/launch/base_local_planner_params.yaml" command="load" />
     </node>
</launch>

When i launch it, only the footprint, obstacles and inflation layers are loaded. When i try to find the parameters of the social_navigation_layer, there is no trace of them. For that reason when i use rviz, the person is tracked correctly but there is no effect of the proxemic or passing layer.

Can you guys help me, please?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2017-01-26 11:13:36 -0500

spmaniato gravatar image

I suspect that the plugins param is not under the correct namespace. Not sure why the other layers do get loaded though.

edit flag offensive delete link more

Comments

Hi and thank you for the answer. I am sorry, but i'm starting programming with ros, so i ask you: how do i check o change the namespace? Thank you

alefag gravatar image alefag  ( 2017-01-30 10:33:57 -0500 )edit

One way would be this: After launching everything, type rosparam list | grep plugins and visually inspect the path / namespace of the relevant parameters.

spmaniato gravatar image spmaniato  ( 2017-01-30 10:52:28 -0500 )edit

I tried and i got: /costmap_node/costmap/plugins /move_base/global_costmap/plugins /move_base/local_costmap/plugins /move_base/plugins

Typing rosparam get /move_base/local_costmap/plugins , returns only two layers, the obstacle and the inflation layer, but there are no trace of others.

alefag gravatar image alefag  ( 2017-01-31 04:05:36 -0500 )edit
1

That's what I suspected. In your two *_costmap_params.yaml, place plugins under global_costmap: and local_costmap:. Just like you've done with your other parameters. It's YAML, so indentation matters!

spmaniato gravatar image spmaniato  ( 2017-01-31 09:24:40 -0500 )edit

Exactly that was the problem, thanks for your help!

alefag gravatar image alefag  ( 2017-01-31 09:54:46 -0500 )edit

Glad I could help @alefag :-) Could you please click on the checkmark icon next to my answer, which will mark it as accepted? Thanks

spmaniato gravatar image spmaniato  ( 2017-01-31 10:43:53 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2017-01-26 10:03:35 -0500

Seen: 2,715 times

Last updated: Jan 26 '17