pyrcf.components.global_planners.ui_reference_generators.ui_base
Base class for creating user interfaces (UI) to act as fake Global Plan generators.
This interface is for generating a fake global plan to be used by local planners from user input and ‘translating’ the input to references that can be used by local planners for generating control references.
In fully autonomous systems, this will be replaced by a true global planner.
e.g. read joystick input and translate to base velocity commands (as GlobalMotionPlan message)
Classes
Simple protocol and base class for a global motion planner interface. |
|
Simple protocol and base class for a global motion planner interface. |
Module Contents
- class pyrcf.components.global_planners.ui_reference_generators.ui_base.UIBase
Bases:
pyrcf.components.global_planners.global_planner_base.GlobalMotionPlannerBaseSimple protocol and base class for a global motion planner interface.
This protocol has to be respected by all classes that generate a GlobalMotionPlan object to be used in the control loop by local planners. (e.g. user interfaces such as keyboard_interface).
- INFO: A general ‘global motion planner’ is a planner that performs high-level planning that is
dependent on the task the robot has to perform. For e.g. for a A->B locomotion, the global planner might generate a sequence of collision-aware waypoints for the local planner to respect.
- abstract process_user_input(robot_state: pyrcf.core.types.RobotState, t: float = None, dt: float = None) pyrcf.core.types.GlobalMotionPlan
Processes user input and returns a GlobalMotionPlan object.
The method that should be implemented by child classes where a user input is processed and appropriate GlobalMotionPlan is returned.
- Returns:
the generated motion plan object.
- Return type:
- generate_global_plan(robot_state: pyrcf.core.types.RobotState, t: float = None, dt: float = None) pyrcf.core.types.GlobalMotionPlan
This method is following the global planner protocol.
Internally this just calls the process_user_input() method.
- Returns:
the generated motion plan object.
- Return type:
- class pyrcf.components.global_planners.ui_reference_generators.ui_base.DummyUI(squawk: bool = True)
Bases:
UIBaseSimple protocol and base class for a global motion planner interface.
This protocol has to be respected by all classes that generate a GlobalMotionPlan object to be used in the control loop by local planners. (e.g. user interfaces such as keyboard_interface).
- INFO: A general ‘global motion planner’ is a planner that performs high-level planning that is
dependent on the task the robot has to perform. For e.g. for a A->B locomotion, the global planner might generate a sequence of collision-aware waypoints for the local planner to respect.
- _squawk = True
- process_user_input(robot_state: pyrcf.core.types.RobotState, t: float = None, dt: float = None) pyrcf.core.types.GlobalMotionPlan
Processes user input and returns a GlobalMotionPlan object.
The method that should be implemented by child classes where a user input is processed and appropriate GlobalMotionPlan is returned.
- Returns:
the generated motion plan object.
- Return type: