π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
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
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
simulate_ahead_time
Time to look ahead for collisions (s).
double
2.0
DriveOnHeading Behavior Parameters
simulate_ahead_time
Time to look ahead for collisions (s).
double
2.0
AssistedTeleop Behavior ParametersΒΆ
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