robotics-upo / nav2_social_costmap_plugin

Plugin-based layer for social navigation in the Nav2 system of ROS2
MIT License
21 stars 8 forks source link

Nav2 social costmap plugin

Plugin-based layer for social navigation in the Nav2 system of ROS2 (tested in ROS2 Humble Distro).

It is based on the outdated social_navigation_layers package of ROS1 Melodic. In our case, the ProxemicsLayer and the PassingLayer have been joined in a single layer.

Dependencies

Subscribed Topic

Published Topic

Parameter configuration

NOTE: To be used as the previous ProxemicsLayer of ROS1, the user must set use_passing to False, use_vel_factor to True, and to use the same value for the parameters covariance_front_height, covariance_front_width, covariance_rear_height, covariance_rear_width and covariance_when_still.

Example of use in Nav2

In the XML configuration file of the Nav2 we must add (in the local_costmap and/or global_costmap section):

local_costmap:
  local_costmap:
    ros__parameters:
      plugins: [(other plugins..), "social_layer"]
      social_layer:
        plugin: "nav2_social_costmap_plugin::SocialLayer"
        enabled: True
        cutoff: 10.0
        amplitude: 255.0
        publish_occgrid: False
        use_passing: True
        use_vel_factor: True
        speed_factor_multiplier: 5.0
        covariance_front_height: 0.4
        covariance_front_width: 0.25
        covariance_rear_height: 0.25
        covariance_rear_width: 0.25
        covariance_right_height: 0.3
        covariance_right_width: 0.2
        covariance_when_still: 0.25