WebSocket Handlers Lookup
WebSocket handlers manage communication between the frontend and ROS2. Each handler maintains a persistent WebSocket connection for a specific subsystem, forwarding ROS2 topics to the GUI and publishing GUI inputs to ROS2.
Handlers are defined in teleoperation/basestation_gui/backend/ws/.
WebSocket Usage per View
Section titled “WebSocket Usage per View”Each view connects to the WebSocket handlers it needs via the :topics prop on BaseGridView:
ESView (Equipment Servicing)
Section titled “ESView (Equipment Servicing)”arm,drive
DMView (Delivery Mission)
Section titled “DMView (Delivery Mission)”arm,drive,chassis,nav
AutonView (Autonomy Mission)
Section titled “AutonView (Autonomy Mission)”drive,nav,science,chassis
ScienceView (Science Mission)
Section titled “ScienceView (Science Mission)”arm,chassis,drive,nav,science
Handler Reference
Section titled “Handler Reference”ArmHandler
Section titled “ArmHandler”WebSocket: arm
Publishing
Section titled “Publishing”/arm_thr_cmd(Throttle)/ik_pos_cmd(IK)/ik_vel_cmd(Twist)
Forwarding
Section titled “Forwarding”/arm_controller_state->arm_state/arm_ik->ik_target
Receiving
Section titled “Receiving”ra_controller- gamepad axes and buttons
DriveHandler
Section titled “DriveHandler”WebSocket: drive
Publishing
Section titled “Publishing”/joystick_vel_cmd(Twist)/controller_vel_cmd(Twist)
Forwarding
Section titled “Forwarding”/left_controller_state->drive_left_state/right_controller_state->drive_right_state
Receiving
Section titled “Receiving”joystick- drive joystick axes and buttonscontroller- drive controller axes and buttons
ScienceHandler
Section titled “ScienceHandler”WebSocket: science
Publishing
Section titled “Publishing”/sp_thr_cmd(Throttle)
Forwarding
Section titled “Forwarding”/sp_humidity_data->sp_humidity/sp_temp_data->sp_temp/sp_oxygen_data->sp_oxygen/sp_uv_data->sp_uv/sp_ozone_data->sp_ozone/sp_co2_data->sp_co2/sp_pressure_data->sp_pressure/sp_controller_state->sp_controller_state
Receiving
Section titled “Receiving”sp_controller- science arm gamepad axes and buttons
NavHandler
Section titled “NavHandler”WebSocket: nav
Forwarding
Section titled “Forwarding”/gps/fix->gps_fixbasestation/position->basestation_position/drone_odometry->drone_waypoint/led->led_color
Subscribing
Section titled “Subscribing”/nav_state- triggers LED manager state updates
Additional
Section titled “Additional”- Publishes TF-based localization data (orientation) at 10 Hz
ChassisHandler
Section titled “ChassisHandler”WebSocket: chassis
Forwarding
Section titled “Forwarding”/gimbal_controller_state->gimbal_controller_state
AutonHandler
Section titled “AutonHandler”WebSocket: auton
Receiving
Section titled “Receiving”code- typing code string or cancel command
Actions
Section titled “Actions”/es_typing_code(TypingCode action)- Sends back:
typing_error,typing_accepted,typing_feedback,typing_cancelled
LatencyHandler
Section titled “LatencyHandler”WebSocket: latency
Receiving
Section titled “Receiving”ping- timestamp, sequence, payload
Responding
Section titled “Responding”pong- server timestamp, mock motor data