pyrcf.components.global_planners.ui_reference_generators.joystick_interface

A simple joystick interface following the GlobalMotionPlanner protocol.

This class allows using bindings to update a global motion plan from user joystick input. The modified global motion plan object can then be retrieved when generate_global_plan method is called in the control loop.

Classes

JoystickGlobalPlannerInterface

A simple joystick interface following the GlobalMotionPlanner protocol.

Module Contents

class pyrcf.components.global_planners.ui_reference_generators.joystick_interface.JoystickGlobalPlannerInterface(gamepad_mappings: pyrcf.components.global_planners.ui_reference_generators.key_mappings.GamePadMappings = DEFAULT_GAMEPAD_MAPPINGS, default_global_plan: pyrcf.core.types.GlobalMotionPlan = GlobalMotionPlan(), check_connection_at_init: bool = False)

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

A simple joystick interface following the GlobalMotionPlanner protocol.

_keep_alive = True
_runner_thread
_connection_verified = False
_global_plan
_mappings
_check_connection()
_read_thread()
process_user_input(robot_state: pyrcf.core.types.RobotState = None, 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.