pyrcf.components.controllers.controller_base
Classes
Base class defining the interface for all controllers that can be used in the control loop. |
|
Dummy controller for testing pipeline. |
Module Contents
- class pyrcf.components.controllers.controller_base.ControllerBase
Bases:
pyrcf.components.pyrcf_component.PyRCFComponentBase class defining the interface for all controllers that can be used in the control loop.
- abstract update(robot_state: pyrcf.core.types.RobotState, local_plan: pyrcf.core.types.LocalMotionPlan, t: float = None, dt: float = None) pyrcf.core.types.RobotCmd
The main control update method to be called in the loop.
This method will be called after the global plan and local plan are generated in the loop.
This method should be implemented by any controller implementation.
- Parameters:
robot_state (RobotState) – The current state information from the robot.
local_plan (LocalMotionPlan) – the latest local plan generated by the local planner used in the loop.
t (float, optional) – the current time signature of the control loop. Defaults to None (controllers may or may not need this).
dt (float, optional) – the time since the last control loop. Defaults to None (controllers may or may not need this).
- Raises:
NotImplementedError – Raised if this method is not implemented by the child class.
- Returns:
The output control command to be sent to the robot.
- Return type:
- class pyrcf.components.controllers.controller_base.DummyController(squawk: bool = True)
Bases:
ControllerBaseDummy controller for testing pipeline.
- _squawk = True
- update(robot_state: pyrcf.core.types.RobotState, local_plan: pyrcf.core.types.LocalMotionPlan, t: float = None, dt: float = None) pyrcf.core.types.RobotCmd
This is a dummy method for sanity checking the control loop.