Skip to content

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/.


Each view connects to the WebSocket handlers it needs via the :topics prop on BaseGridView:

  • arm, drive
  • arm, drive, chassis, nav
  • drive, nav, science, chassis
  • arm, chassis, drive, nav, science

WebSocket: arm

  • /arm_thr_cmd (Throttle)
  • /ik_pos_cmd (IK)
  • /ik_vel_cmd (Twist)
  • /arm_controller_state -> arm_state
  • /arm_ik -> ik_target
  • ra_controller - gamepad axes and buttons

WebSocket: drive

  • /joystick_vel_cmd (Twist)
  • /controller_vel_cmd (Twist)
  • /left_controller_state -> drive_left_state
  • /right_controller_state -> drive_right_state
  • joystick - drive joystick axes and buttons
  • controller - drive controller axes and buttons

WebSocket: science

  • /sp_thr_cmd (Throttle)
  • /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
  • sp_controller - science arm gamepad axes and buttons

WebSocket: nav

  • /gps/fix -> gps_fix
  • basestation/position -> basestation_position
  • /drone_odometry -> drone_waypoint
  • /led -> led_color
  • /nav_state - triggers LED manager state updates
  • Publishes TF-based localization data (orientation) at 10 Hz

WebSocket: chassis

  • /gimbal_controller_state -> gimbal_controller_state

WebSocket: auton

  • code - typing code string or cancel command
  • /es_typing_code (TypingCode action)
  • Sends back: typing_error, typing_accepted, typing_feedback, typing_cancelled

WebSocket: latency

  • ping - timestamp, sequence, payload
  • pong - server timestamp, mock motor data