Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Auxiliary control (servos and actuator)

auxiliary_control drives the servos and the linear actuator from the gamepad. It talks to a second Pico, separate from the thruster Pico. Run it on the Jetson, with joy messages arriving from topside.

ros2 launch controller_node auxiliary_control_launch.py \
  port:=/dev/serial/by-id/YOUR_AUX_PICO

The default port is /dev/ttyACM0 and the baud rate is 115200.

The launch file starts its own joy_linux_node. If topside is already publishing joy over the tether, run the executable directly instead so there is a single joy source:

ros2 run controller_node auxiliary_control --ros-args -p port:=/dev/serial/by-id/YOUR_AUX_PICO

Controls

InputAction
Left bumper (button 4)Toggle servo on GP20 between its min and max
Right bumper (button 5)Toggle servo on GP01 between its min and max
Right triggerActuator forward while held
Left triggerActuator back while held

A trigger counts as pressed when its axis drops below trigger_pressed_threshold (default 0.5). Pressing both stops the actuator. The triggers also drive the vertical thrusters through controller_node, so the robot moves vertically when you move the actuator.

Limits and wiring

OutputPico GPIORange sent
Servo 20GP200.42 to 0.54
Servo 01GP010.45 to 1.00
Actuator directionGP21 (actuator_direction_pin)1 forward, 0 back, 0.5 stop
Actuator speedGP28 (actuator_speed_pin)actuator_speed (default 1.0), 0 stop

The servo limits are constants in auxiliary_control.py. Change them there if the mechanism needs a different range.

Commands are sent as z<pin><value>x lines, for example z200.54x: a two-digit GPIO number, then a value from 0 to 1. The actuator is stopped when the node shuts down.