Add phone/waypoint_logger.py — interactive Termux CLI for recording,
managing, and publishing GPS waypoints:
GPS acquisition
- termux-location with gps/network/passive provider selection
- Falls back to network provider on GPS timeout
- Optional --live-gps flag: subscribes to saltybot/phone/gps MQTT
topic (sensor_dashboard.py stream) to avoid redundant GPS calls
Waypoint operations
- Record: acquires GPS fix, prompts for name + tags, appends to route
- List: table with lat/lon/alt/accuracy/tags + inter-waypoint
distance (haversine) and bearing (8-point compass)
- Delete: by index with confirmation prompt
- Clear: entire route with confirmation
- Rename: route name
Persistence
- Routes saved as JSON to ~/saltybot_route.json (configurable)
- Auto-loads on startup; survives session restarts
MQTT publish (saltybot/phone/route, QoS 1, retained)
- Full waypoint list with metadata
- nav2_poses array: flat-earth x/y (metres from origin),
quaternion yaw facing next waypoint (last faces prev)
- Compatible with Nav2 FollowWaypoints action input
Geo maths
- haversine_m(): great-circle distance
- bearing_deg(): initial bearing with 8-point compass label
- flat_earth_xy(): ENU metres for Nav2 pose export (<1% error <100km)
Flags: --broker, --port, --file, --route, --provider, --live-gps,
--no-mqtt, --debug
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SaltyBot Android/Termux Phone Node (Issue #420)
Android phone node for SaltyBot via Termux. Provides camera, GPS, IMU sensors and local OpenClaw LLM inference.
Setup
On phone (Termux):
bash termux-bootstrap.sh
mkdir -p ~/saltybot_workspace/src
cd ~/saltybot_workspace && colcon build
Running
cd ~/saltybot_workspace && source install/setup.bash
ros2 launch saltybot_phone phone_bringup.py
Topics
| Topic | Type | Description |
|---|---|---|
/phone/camera/image_raw |
Image | Camera frames 320x240@15Hz |
/phone/gps |
NavSatFix | GPS location |
/phone/imu |
Imu | Accelerometer data |
/saltybot/speech_text |
String | Input from Jetson |
/saltybot/chat_response |
String | LLM output to Jetson |
Power Management
nohup bash ~/power-management.sh > ~/power-mgmt.log 2>&1 &
Reduces CPU activity on low battery (<25%) or critical battery (<15%).
Configuration
Edit config/phone.yaml to adjust frame rates and LLM parameters.
Issue #420 Completion
✅ Termux bootstrap ✅ Camera / GPS / IMU nodes ✅ OpenClaw chat (local LLM) ✅ WebSocket bridge to Orin ✅ Termux:Boot auto-start ✅ Power management