fix: detect remote SLAM bridge and clear loading state on response

This commit is contained in:
2026-10-13 15:08:12 +09:00
parent b0a4c2b1e6
commit debb38a29b
27 changed files with 270 additions and 100 deletions
+3 -1
View File
@@ -3135,6 +3135,9 @@ renderer.domElement.addEventListener('click', async (event) => {
});
function applySlamState(state) {
// Any valid state payload confirms that the bridge is responding. Missing
// ROS data is reported separately by the topic status indicators.
markVisualizationResponseReceived();
latestSlamState = state;
latestSlamStateReceivedAt = Date.now();
resetNavigationPoseForNewSession(state);
@@ -3150,7 +3153,6 @@ function applySlamState(state) {
clearNavigationGoalMarker();
navigationGoalId = null;
}
if (state?.pose || state?.pose_3d || state?.scan || state?.map || state?.point_cloud || state?.sensor_point_cloud) markVisualizationResponseReceived();
if (NAV2_VIEW_MODE === 'navigation' && state?.tf?.map_to_odom) {
navigationMapToOdom = state.tf.map_to_odom;
updateNavigationMapTransform();