From b72e435bf33de2d72ebd3468932574a20832e43c Mon Sep 17 00:00:00 2001 From: sl-webui Date: Sat, 4 Apr 2026 10:01:57 -0400 Subject: [PATCH] fix: Update tracker GPS topic to match phone bridge (Issue #681) --- ui/sultee-tracker.html | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/ui/sultee-tracker.html b/ui/sultee-tracker.html index a5a8e1f..93d2d1d 100644 --- a/ui/sultee-tracker.html +++ b/ui/sultee-tracker.html @@ -723,9 +723,10 @@ function connectRos(url) { } function setupRobotTopics() { - // /gps/fix — sensor_msgs/NavSatFix (SIM7600X / Pixel 5 GPS) + // /saltybot/phone/gps — sensor_msgs/NavSatFix published by the Pixel 5 + // MQTT-to-ROS2 bridge (saltybot_phone package). No velocity topic. new ROSLIB.Topic({ - ros, name: '/gps/fix', + ros, name: '/saltybot/phone/gps', messageType: 'sensor_msgs/NavSatFix', throttle_rate: 500, }).subscribe(msg => { robot.lat = msg.latitude ?? robot.lat; @@ -741,24 +742,6 @@ function setupRobotTopics() { $('last-msg').textContent = 'Robot: ' + new Date().toLocaleTimeString('en-US', { hour12: false }); render(); }); - - // /gps/vel — geometry_msgs/TwistStamped (east/north m/s + heading in radians) - new ROSLIB.Topic({ - ros, name: '/gps/vel', - messageType: 'geometry_msgs/TwistStamped', throttle_rate: 500, - }).subscribe(msg => { - const vx = msg.twist.linear.x; // east m/s - const vy = msg.twist.linear.y; // north m/s - const spd = Math.sqrt(vx * vx + vy * vy) * 3.6; // → km/h - const hdg = (msg.twist.angular.z * 180 / Math.PI + 360) % 360; // radians → degrees - robot.spd = spd; - robot.hdg = hdg; - robot.tsvel = Date.now(); - if (robotMarker && robot.lat != null) { - robotMarker.setIcon(makeRobotIcon(robot.hdg)); - } - render(); - }); } // ── Stale refresh ───────────────────────────────────────────────────────────── -- 2.47.2