0
$\begingroup$

Rosanswers logo

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_layers. 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!


Originally posted by alefag on ROS Answers with karma: 3 on 2017-01-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by spmaniato with karma: 1788 on 2017-01-26

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by alefag on 2017-01-30:
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

Comment by spmaniato on 2017-01-30:
One way would be this: After launching everything, type rosparam list | grep plugins and visually inspect the path / namespace of the relevant parameters.

Comment by alefag on 2017-01-31:
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.

Comment by spmaniato on 2017-01-31:
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!

Comment by alefag on 2017-01-31:
Exactly that was the problem, thanks for your help!

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.