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 Name | Message Type | Description |
|---|---|---|
/pat/control/pat_cmd | pat_custom_msgs/PatJoyControl | Primary driving and fan control commands. |
/pat/camera/control | pat_custom_msgs/CameraControl | Pan, tilt, zoom, and lighting controls for the PTZ camera. |
/pat/control/raster_arm | pat_custom_msgs/RasterArmControl | Controls for the scanning raster arm. |
/pat/control/motor_speed | pat_custom_msgs/MotorSpeed | Sets the global scalar for motor speed. |
/pat/control/fan_override | std_msgs/Bool | Emergency command to stop all fans. |
/pat/control/ra_mode | std_msgs/String | Toggles 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 Name | Message Type | Description |
|---|---|---|
/pat/info/device_monitor | pat_custom_msgs/DeviceMonitor | Physical connection status (Ethernet, Controller, SBC). |
/pat/info/mc_data | pat_custom_msgs/McData | Battery voltages and driveline motor status. |
/pat/control/live_data | pat_custom_msgs/PatLiveData | Real-time telemetry (temp, power, rpm, pressure). |
/scan | sensor_msgs/LaserScan | Raw LIDAR data for visualization. |
/imu_acc_ar | sensor_msgs/Imu | Accelerometer and Gyroscope data. |
/pat/control/raster_arm_feedback | pat_custom_msgs/RasterArmFeedback | Status 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.