Drive Manager#
DriveManager is responsible for direct control communication with the robot. It is used to perform last checks on any control command before passing it to the robot to ensure that the commands falls within the robot control limits, satisfies smoothness conditions and does not lead to a collision with a nearby obstacle.
The DriveManager component can perform one or multiple of the following functionalities based on the desired config:
Control limiting |
Checks that the incoming control is within the robot control limits. If a control command is outside the robot control limits, the DriveManager limits the value to the maximum/minimum allowed value before passing the command to the robot |
Emergency stopping |
Checks the direct sensor information from the configured proximity sensors and performs an emergency stop if an obstacle is closer than the allowed safety limit |
Control Smoothing (Filtering) |
Performs smoothing filtering on the incoming control commands before sending the commands to the robot |
Robot Unblocking |
Moves the robot forward, backwards or rotates in place if the space is free to move the robot away from a blocking point. This action can be configured to be triggered with an external event |
DriveManager also includes built-in movement actions used for directly control the robot or unblocking the robot in certain conditions:
Action |
Function |
---|---|
Moves the robot forward for |
|
Moves the robot backwards for |
|
Rotates the robot in place for |
|
Moves the robot forward, backwards or rotates in place if the space is free to move the robot away from a blocking point. |
Note
All the previous movement actions require LaserScan
information to determine if the movement direction is collision-free
See also
Check an example on configuring the robot unblocking functionality with an external event in this tutorial
Available Run Types#
Timed |
Sends incoming command periodically to the robot |
Inputs#
Key Name |
Allowed Types |
Number |
Default |
---|---|---|---|
command |
1 |
|
|
multi_command |
1 |
|
|
sensor_data |
|
1 + (10 optional) |
|
location |
|
1 |
|
Outputs#
Key Name |
Allowed Types |
Number |
Default |
---|---|---|---|
robot_command |
|
1 |
|
emergency_stop |
|
1 |
|
Configuration Parameters:#
Usage Example:#
from kompass.components import DriveManager, DriveManagerConfig
from kompass.topic import Topic
# Setup custom configuration
# cmd_rate: rate for sending commands to the robot (Hz)
# critical_zone_distance: for emergency stp (m)
my_config = DriveManagerConfig(cmd_rate=10.0, critical_zone_distance=0.05)
driver = DriveManager(component_name="driver", config=my_config)
# Change the robot command output
driver.outputs(robot_command=Topic(name='/my_robot_cmd', msg_type='Twist'))