Skip to main content

ROS API Reference

This document defines the communication interface (topics and message types) between the React Native application and the robot's ROS environment. This "contract" allows the frontend to control the robot and receive real-time telemetry.

Command Topics (App -> Robot)

The application publishes the following topics to control various robot subsystems.

Topic NameMessage TypeDescription
/pat/control/pat_cmdpat_custom_msgs/PatJoyControlPrimary driving and fan control commands.
/pat/camera/controlpat_custom_msgs/CameraControlPan, tilt, zoom, and lighting controls for the PTZ camera.
/pat/control/raster_armpat_custom_msgs/RasterArmControlControls for the scanning raster arm.
/pat/control/motor_speedpat_custom_msgs/MotorSpeedSets the global scalar for motor speed.
/pat/control/fan_overridestd_msgs/BoolEmergency command to stop all fans.
/pat/control/ra_modestd_msgs/StringToggles between Manual and Automatic robot arm modes.

Telemetry Topics (Robot -> App)

The application subscribes to these topics to update the user interface with real-time data.

Topic NameMessage TypeDescription
/pat/info/device_monitorpat_custom_msgs/DeviceMonitorPhysical connection status (Ethernet, Controller, SBC).
/pat/info/mc_datapat_custom_msgs/McDataBattery voltages and driveline motor status.
/pat/control/live_datapat_custom_msgs/PatLiveDataReal-time telemetry (temp, power, rpm, pressure).
/scansensor_msgs/LaserScanRaw LIDAR data for visualization.
/imu_acc_arsensor_msgs/ImuAccelerometer and Gyroscope data.
/pat/control/raster_arm_feedbackpat_custom_msgs/RasterArmFeedbackStatus updates from the raster scanning process.

Key Message Definitions

PatJoyControl (pat_custom_msgs/PatJoyControl)

The primary structure for user input.

  • throttle (float64): Linear velocity.
  • steering (float64): Angular velocity.
  • fan_value (int8): Target power level for adhesion fans.
  • control_mode (string): Current operating mode (MANUAL, AUTOMATIC).

PatLiveData (pat_custom_msgs/PatLiveData)

Used for the high-fidelity telemetry dashboard.

  • v_in (float64): Input voltage.
  • current (float64): Total current draw.
  • temp_fet (float64): Temperature of the motor controller FETs.
  • pressure (float64): Suction pressure from the crawler fans.