DriveOnHeading
Invokes the DriveOnHeading ROS 2 action server, which causes the robot to drive on the current heading by a specific displacement. It performs a linear translation by a given distance. The nav2_behaviors module implements the DriveOnHeading action server.
Input Ports
dist_to_travel
- Type:
doubleDefault:0.15 -
Distance to travel (m).
speed
- Type:
doubleDefault:0.025 -
Speed at which to travel (m/s).
time_allowance
- Type:
doubleDefault:10.0 -
Time to invoke behavior for, if exceeds considers it a stuck condition or failure case (seconds).
disable_collision_checks
- Type:
boolDefault:false -
Disable collision checking.
server_name
- Type:
stringDefault:N/A -
Action server name. If not specified,
drive_on_headingis used.
server_timeout
- Type:
chrono::millisecondsDefault:N/A -
Action server timeout (ms). If not provided, uses the BT Navigator's
default_server_timeoutparameter value (20 ms by default).
Output Ports
error_code_id
- Type:
uint16Default:N/A -
Drive on heading error code. See
DriveOnHeadingaction message for the enumerated set of error codes.
error_msg
- Type:
stringDefault:N/A -
Drive on heading error message. See
DriveOnHeadingaction message for the enumerated set of error codes.
Example
<DriveOnHeading dist_to_travel="0.2" speed="0.05"
server_name="backup_server" server_timeout="10" disable_collision_checks="false"
error_code_id="{drive_on_heading_error_code}" error_msg="{drive_on_heading_error_msg}"/>