pyrcf.control_loop.minimal_ctrl_loop ==================================== .. py:module:: pyrcf.control_loop.minimal_ctrl_loop Classes ------- .. autoapisummary:: pyrcf.control_loop.minimal_ctrl_loop.MinimalCtrlLoop Module Contents --------------- .. py:class:: MinimalCtrlLoop(robot_interface: pyrcf.components.robot_interfaces.robot_interface_base.RobotInterface, state_estimator: pyrcf.components.state_estimators.state_estimator_base.StateEstimatorBase, controller: pyrcf.components.controllers.controller_base.ControllerBase, local_planner: pyrcf.components.local_planners.LocalPlannerBase, global_planner: pyrcf.components.global_planners.global_planner_base.GlobalMotionPlannerBase, verbose: bool = True) Bases: :py:obj:`pyrcf.control_loop.simple_managed_ctrl_loop.SimpleManagedCtrlLoop` A minimal control loop with only 1 controller and 1 local planner. The run method runs the following in a loop of specified frequency. 1. read robot state from robot interface 2. update robot state with state estimates from state estimator 3. get global plan message from global planner / user interface 4. generate local plan using the global plan message 5. compute control command to track the local plan 6. write control command to robot .. py:attribute:: controller_manager .. py:method:: useWithDefaults(robot_interface: pyrcf.components.robot_interfaces.robot_interface_base.RobotInterface, controller: pyrcf.components.controllers.controller_base.ControllerBase, global_planner: pyrcf.components.global_planners.global_planner_base.GlobalMotionPlannerBase = None, local_planner: pyrcf.components.local_planners.LocalPlannerBase = BlindForwardingPlanner(), state_estimator: pyrcf.components.state_estimators.state_estimator_base.StateEstimatorBase = DummyStateEstimator(squawk=False), verbose: bool = True) -> MinimalCtrlLoop :classmethod: Create a control loop default values for planners and state estimators. Default local planner: BlindForwardingPlanner Default global planner: Try JoystickGlobalPlannerInterface; fallback KeyboardGlobalPlannerInterface Default state estimator: DummyStateEstimator :param robot_interface: The robot interface to use in the loop. :type robot_interface: RobotInterface :param controller: The controller to be used. :type controller: ControllerBase :param global_planner: The global planner to use. If None provided, will try to first find a joystick, and then creates a keyboard interface if joystick is not found. :type global_planner: GlobalMotionPlannerBase, optional :param local_planner: Local planner to use. Defaults to BlindForwardingPlanner. :type local_planner: LocalPlannerBase, optional :param state_estimator: State estimator to use. Defaults to DummyStateEstimator(squawk=False). :type state_estimator: StateEstimatorBase, optional :returns: returns a valid control loop object with planners and state estimators automatically defined. :rtype: MinimalCtrlLoop