Controller#
Local planning and control is essential for any mobile robot in real-world applications to deal with unexpected situations while tracking the global trajectory.
Controller is used for path tracking and control around dynamic obstacles during navigation.
Available Run Types#
Set from ControllerConfig class or directly from Controller ‘run_type’ property.
Timed |
Compute a new control command periodically if all inputs are available |
ActionServer |
Offers a ControlPath ROS action and continuously computes a new control once an action request is received until goal point is reached |
Controller Inputs#
Key |
Description |
Accepted Types |
Number of Topics |
Default Value |
---|---|---|---|---|
plan |
Path to reach the goal point from start location |
|
1 |
|
location |
Robot current location |
|
1 |
|
sensor_data |
Direct sensor input |
|
1 |
|
local_map |
Local occupancy map |
|
1 |
|
Controller Outputs#
Key |
Description |
Accepted Types |
Default Value |
---|---|---|---|
command |
One control command |
|
|
multi_command |
A set of future control commands |
|
|
interpolation |
Interpolated path |
|
|
tracked_point |
Tracked (closest) path point |
|
|
Available Algorithms:#
Usage Example:#
from kompass.components import ControllerConfig, Controller
from kompass.topic import Topic
# Setup custom configuration
my_config = ControllerConfig(loop_rate=10.0)
# Init a controller object
my_controller = Controller(component_name="controller", config=my_config)
# Change an input
my_controller.inputs(plan=Topic(name='/global_path', msg_type='Path'))
# Change run type (default "Timed")
my_controller.run_type = "ActionServer"
# Change plugin
my_controller.plugin = 'DWA'