πŸš“D.16 Behavior Server

Source code on Github.

The Behavior Server implements the server for handling recovery behavior requests and hosting a vector of plugins implementing various C++ behaviors. It is also possible to implement independent behavior servers for each custom behavior, but this server will allow multiple behaviors to share resources such as costmaps and TF buffers to lower incremental costs for new behaviors.

Note: the wait recovery behavior has no parameters, the duration to wait is given in the action request. Note: pre-Rolling/Humble this was the Recovery server, not behavior server. Launch files, behaviors and tests were all renamed.

Behavior Server Parameters

Name
Description
Type
Default

local_costmap_topic

Raw costmap topic for collision checking on the local costmap.(costmap topic ထကြမ်းမှာ collision တွေကို check α€œα€―α€•α€Ία€•α€±α€Έα€α€šα€Ί (local costmap မှာပေ့ါ)

string

β€œlocal_costmap/costmap_raw”

global_costmap_topic

Raw costmap topic for collision checking on the global costmap.(global costmap ပုဢကြမ်းမှာ coll

string

β€œglobal_costmap/costmap_raw”

local_footprint_topic

Topic for footprint in the local costmap frame.( local costmap frame ထတွက် footprint topic)

string

β€œlocal_costmap/published_footprint”

global_footprint_topic

Topic for footprint in the global costmap frame.( global costmap frame ထတွက် footprint

string

β€œglobal_costmap/published_footprint”

cycle_frequency

Frequency to run behavior plugins. ( behavior plugin တွေ run α€–α€­α€―α€· ထတွက် frequency)

double

10.0

transform_tolerance

TF transform tolerance.

Double

0.1

local_frame

Local reference frame.

string

"odom"

global_frame

Global reference frame.

string

"map"

robot_base_frame

Robot base frame.

string

"base_link"

behavior_plugins

List of plugin names to use, also matches action server names. Note: Each plugin namespace defined in this list needs to have a plugin parameter defining the type of plugin to be loaded in the namespace. ( plugin တိုင်းမှာ plugin parameter α€žα€€α€Ία€™α€Ύα€α€Ία€•α€±α€Έα€›α€•α€«α€™α€šα€Ία‹ plugin α€α€½α€±α€™α€Ύα€¬α€œα€Šα€Ία€Έ namespace type α€‘α€Šα€Ία€·α€•α€±α€Έα€›α€™α€šα€Ία€•α€±α€«α€·α‹)

vector<string>

{β€œspin”, β€œback_up”, β€œdrive_on_heading”, β€œwait”}

behavior_server:
  ros__parameters:
    behavior_plugins: ["spin", "backup", "drive_on_heading", "wait"]
    spin:
      plugin: "nav2_behaviors/Spin"
    backup:
      plugin: "nav2_behaviors/BackUp"
    drive_on_heading:
      plugin: "nav2_behaviors/DriveOnHeading"
    wait:
      plugin: "nav2_behaviors/Wait"

Default Plugins

Spin Behavior Parameters

Name
Description
Type
Default

simulate_ahead_time

Time to look ahead for collisions (s).

double

2.00

max_rotational_vel

Maximum rotational velocity (rad/s).

double

1.0

min_rotational_vel

Minimum rotational velocity (rad/s).

double

0.4

rotational_acc_lim

maximum rotational acceleration (rad/s^2).

double

3.2

BackUp Behavior Parameters

Name
Description
Type
Default

simulate_ahead_time

Time to look ahead for collisions (s).

double

2.0

DriveOnHeading Behavior Parameters

Name
Description
Type
Default

simulate_ahead_time

Time to look ahead for collisions (s).

double

2.0

AssistedTeleop Behavior ParametersΒΆ

Name
Description
Type
Default

projection_time

Time to look ahead for collisions (s).

double

1.0

simulation_time_step

Time step for projections (s).

double

0.1

cmd_vel_teleop

Topic to listen for teleop messages.

string

cmd_vel_teleop

နမူနာ

behavior_server:
  ros__parameters:
    local_costmap_topic: local_costmap/costmap_raw
    local_footprint_topic: local_costmap/published_footprint
    global_costmap_topic: global_costmap/costmap_raw
    global_footprint_topic: global_costmap/published_footprint
    cycle_frequency: 10.0
    behavior_plugins: ["spin", "backup", "drive_on_heading", "wait", "assisted_teleop"]
    spin:
      plugin: "nav2_behaviors/Spin"
    backup:
      plugin: "nav2_behaviors/BackUp"
    drive_on_heading:
      plugin: "nav2_behaviors/DriveOnHeading"
    wait:
      plugin: "nav2_behaviors/Wait"
    assisted_teleop:
      plugin: "nav2_behaviors/AssistedTeleop"
    local_frame: odom
    global_frame: map
    robot_base_frame: base_link
    transform_timeout: 0.1
    simulate_ahead_time: 2.0
    max_rotational_vel: 1.0
    min_rotational_vel: 0.4
    rotational_acc_lim: 3.2

Last updated