pyrcf.components.global_planners.ui_reference_generators.keyboard_interface

A simple keyboard interface following the GlobalMotionPlanner protocol.

Classes

KeyboardGlobalPlannerInterface

A simple keyboard interface inheriting from the GlobalMotionPlanner format.

Functions

blit_multiline_text(surface, text, pos, font[, ...])

Function to display multiline text in pygame screen.

Module Contents

pyrcf.components.global_planners.ui_reference_generators.keyboard_interface.blit_multiline_text(surface, text, pos, font, line_spacing=3, color=pygame.Color('white'))

Function to display multiline text in pygame screen.

class pyrcf.components.global_planners.ui_reference_generators.keyboard_interface.KeyboardGlobalPlannerInterface(key_mappings: Dict[str, Callable[[pyrcf.core.types.GlobalMotionPlan], pyrcf.core.types.GlobalMotionPlan]] = None, default_global_plan: pyrcf.core.types.GlobalMotionPlan = GlobalMotionPlan(), window_size: Tuple[int, int] = (1000, 1000), parallel_mode: bool = False, verbose: bool = False)

Bases: pyrcf.components.global_planners.ui_reference_generators.ui_base.UIBase

A simple keyboard interface inheriting from the GlobalMotionPlanner format.

_global_plan
_key_mappings
_parallel_mode
_verbose
_display
_font
_update_global_plan_from_user_input() None
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:

GlobalMotionPlan

shutdown()

Cleanly shutdown the PyRCF component. Override in child class if required. The base class implements an empty function.