feathersdk.cli.control.ps4 Module

PS4 controller teleop for navigation, torso, and neck.

Requires pygame: pip install pygame

Controls:

Left stick — holonomic translate: forward/back = vx, left/right = vy (m/s). Right stick — yaw: left = CCW, right = CW. Up/down is ignored. L2 / R2 — torso down / up (analog; clamped to TORSO_MIN/MAX). D-pad — neck pitch (up/down) and yaw (left/right). Circle (O) — abort robot and exit Ctrl+C — quit (also stops base + torso).

Connect the PS4 controller by holding Share + PS button on the controller until lights blink, and doing: ` bluetoothctl power on agent on default-agent scan on # wait for "Wireless Controller" pair XX:XX:XX:XX:XX:XX trust XX:XX:XX:XX:XX:XX connect XX:XX:XX:XX:XX:XX `

class feathersdk.cli.control.ps4.PadState

Bases: object

Normalized pad inputs in [-1, 1] sticks / [0, 1] triggers.

class feathersdk.cli.control.ps4.AxisMap(lx: int, ly: int, rx: int, ry: int, l2: int, r2: int, rest: list)

Bases: object

Parameters:
lx: int
ly: int
rx: int
ry: int
l2: int
r2: int
rest: list
feathersdk.cli.control.ps4.control_loop(robot)

Interactive PS4 controller teleop.

Parameters:

robot (FeatherRobot)

Return type:

None

feathersdk.cli.control.ps4.control_ps4(config_path)
Parameters:

config_path (str | None)

Return type:

None