Skip to content

feat: web app — planning viz, operate UI, looper support, nav improvements #94

Merged
dvorak0 merged 102 commits intomainfrom
xiaole/feat/planning-viz
Apr 24, 2026
Merged

feat: web app — planning viz, operate UI, looper support, nav improvements #94
dvorak0 merged 102 commits intomainfrom
xiaole/feat/planning-viz

Conversation

@xiaolefang-dm
Copy link
Copy Markdown
Contributor

@xiaolefang-dm xiaolefang-dm commented Apr 20, 2026

Description:
Complete Flutter web app with planning visualization, operate tab, camera preview, looper sensor support, and nav/cmd_vel improvements.

  • Split-screen operate view: global map + local planning (ESDF/obstacle/trajectory/global path layers, all on by default)
  • Nav target crosshair on planning view; map PiP on camera feed
  • STOP button disables nav nodes; nav nodes toggle; Sit/Stand actions; teleop joysticks
  • Camera preview: topic selector, fullscreen, auto-detects looper vs realsense
  • cmd_vel: adaptive stale thresholds (7–10 Hz planner), low-pass filter, min speed 0.2 m/s, corrected path pose dt (stride=10 → 1.0 s spacing, not 0.1 s)
  • Looper bridge: /insight/vio_* → /slam/*; map build isolated on ROS_DOMAIN_ID=231
  • Map archive + timestamp symlink; per-map POI CRUD; auto home POI after build
  • Fixed ros_domain_id AttributeError on /nav/nodes/enable; Roboto fonts bundled offline
  • Dockerfile: pre-build Flutter web at image build time (flutter build web --release)

view of navigation page:
img_v3_02112_f4b15a7e-6110-4390-9e6c-3bb8e00825hu

Quick View video

file_v3_00112_36d6d56e-9f4a-4686-9e78-2e1d81406ehu.mov

@xiaolefang-dm xiaolefang-dm requested a review from dvorak0 April 20, 2026 23:07
@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.15 s (269.8 files/s, 39325.5 lines/s)
Language files blank comment code
Python 12 575 247 3195
Markdown 4 154 6 425
C++ 4 60 38 409
Bourne Shell 14 28 7 213
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 880 339 4612

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.15 s (264.1 files/s, 38499.4 lines/s)
Language files blank comment code
Python 12 575 247 3195
Markdown 4 154 6 425
C++ 4 60 38 409
Bourne Shell 14 28 7 213
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 880 339 4612

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.12 s (330.4 files/s, 48171.0 lines/s)
Language files blank comment code
Python 12 575 247 3195
Markdown 4 154 6 425
C++ 4 60 38 409
Bourne Shell 14 28 7 213
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 880 339 4612

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.13 s (319.3 files/s, 46542.6 lines/s)
Language files blank comment code
Python 12 575 247 3195
Markdown 4 154 6 425
C++ 4 60 38 409
Bourne Shell 14 28 7 213
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 880 339 4612

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (257.5 files/s, 37541.1 lines/s)
Language files blank comment code
Python 12 575 247 3195
Markdown 4 154 6 425
C++ 4 60 38 409
Bourne Shell 14 28 7 213
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 880 339 4612

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (257.8 files/s, 37577.9 lines/s)
Language files blank comment code
Python 12 575 247 3195
Markdown 4 154 6 425
C++ 4 60 38 409
Bourne Shell 14 28 7 213
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 880 339 4612

@dvorak0 dvorak0 marked this pull request as draft April 21, 2026 06:19
xiaolefang-dm pushed a commit that referenced this pull request Apr 21, 2026
* Update README.md. bump v0.1

* reformat
@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.15 s (269.3 files/s, 38806.6 lines/s)
Language files blank comment code
Python 12 579 250 3202
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 37 11 261
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 894 346 4668

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.15 s (266.3 files/s, 38813.5 lines/s)
Language files blank comment code
Python 12 579 250 3202
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 45 16 316
Dockerfile 1 30 29 189
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 902 351 4723

@xiaolefang-dm xiaolefang-dm marked this pull request as ready for review April 21, 2026 12:32
@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (252.8 files/s, 37148.0 lines/s)
Language files blank comment code
Python 12 579 251 3203
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 48 20 353
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 905 356 4763

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (255.4 files/s, 37468.7 lines/s)
Language files blank comment code
Python 12 577 247 3201
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 48 20 353
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 17 12 49
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 903 352 4761

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (242.3 files/s, 35725.3 lines/s)
Language files blank comment code
Python 12 578 247 3204
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 355 4782

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.14 s (300.0 files/s, 44232.6 lines/s)
Language files blank comment code
Python 12 578 247 3204
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 355 4782

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (240.5 files/s, 35459.3 lines/s)
Language files blank comment code
Python 12 578 247 3204
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 355 4782

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (242.7 files/s, 35778.8 lines/s)
Language files blank comment code
Python 12 578 247 3204
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 355 4782

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (240.2 files/s, 35523.9 lines/s)
Language files blank comment code
Python 12 578 249 3221
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 357 4799

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (242.7 files/s, 35915.3 lines/s)
Language files blank comment code
Python 12 578 252 3222
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 360 4800

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (241.1 files/s, 35742.2 lines/s)
Language files blank comment code
Python 12 578 254 3230
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 362 4808

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.14 s (293.8 files/s, 43558.0 lines/s)
Language files blank comment code
Python 12 578 254 3230
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 362 4808

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (237.5 files/s, 35227.7 lines/s)
Language files blank comment code
Python 12 578 254 3233
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 362 4811

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.13 s (319.1 files/s, 47327.7 lines/s)
Language files blank comment code
Python 12 578 254 3233
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 362 4811

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (248.8 files/s, 36908.0 lines/s)
Language files blank comment code
Python 12 578 254 3233
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 51 20 365
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 908 362 4811

@xiaolefang-dm xiaolefang-dm changed the title feat(app): planning/localization visualization feat: web app — planning viz, operate UI, looper support, nav improvements Apr 24, 2026
Comment thread app/README.md Outdated
Comment thread scripts/run_web_app.sh Outdated
Comment thread tinynav/core/build_map_node.py Outdated
Comment thread tool/ros2_node_manager.py Outdated
xiaolefang and others added 2 commits April 24, 2026 14:02
- Auto-launch perception_node alongside realsense driver at backend startup
- Replace /camera/camera/depth/image_rect_raw with /slam/depth
- Terminate perception proc on NodeRunner.stop()

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
xiaolefang and others added 21 commits April 24, 2026 14:02
…at keyframe time

Global path was rotating with the robot because T_odom_map was recomputed
from live odomPose every frame. Now the backend snapshots odomPose at each
mapPose update (odom_pose_at_kf) and the painter uses that frozen transform,
so the path stays anchored in world frame between keyframes.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…xact T_odom_map

Replace approximate yaw-diff conversion in Dart with full 3D rotation
(R_kf @ R_mp.T) computed from quaternions in node_manager.py, so the
frontend can draw global_path directly in odom frame without any
coordinate conversion logic.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
When navigation is active (global path non-empty), the operate tab now
auto-switches to a full SLAM-map view that uses MapOverlayPainter to draw
the path in the correct map frame — eliminating the rotation artifact caused
by mixing map-frame paths with the odom-frame local canvas.  The local
planning view still shows obstacles/ESDF/trajectory but no longer draws
the global path.

ESDF colormap is inverted (BGR channel reversal) so near-obstacle regions
appear red and safe regions appear blue, matching intuitive danger semantics.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…cal plan right

When the robot is localized and a global path is active, the map section
switches to a side-by-side layout: the SLAM map with global path on the
left (MapOverlayPainter in map frame) and the local obstacle/ESDF/trajectory
view on the right.  The Global Path layer toggle controls whether the split
view is shown.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Replace the previous approximated pose-based transform with a tf2_ros
Buffer/TransformListener that looks up the live 'world'→'map' transform
broadcast by map_node.  The backend transforms each path point at snapshot
time so the frontend receives odom-frame coordinates directly.

Front-end reverts to single local planning canvas (no split screen);
global path is drawn by LocalPlanningPainter in odom frame without rotation.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Red circular STOP button between Sit/Stand controls. On press: sends zero
velocity via teleop WS and calls /nav/cancel to halt navigation immediately.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
call_soon_threadsafe(queue.put_nowait, item) causes unhandled QueueFull
exceptions in the event loop because the raise happens outside the
try/except in the ROS spin thread.  Wrap put in a closure that evicts
the oldest item when full, keeping only the latest pose/frame.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…in_id

- Revert tinynav/core/{build_map_node,map_node,math_utils,planning_node}.py to main
- Remove self.ros_domain_id = '0' from Ros2NodeManager; _spawn now inherits
  ROS_DOMAIN_ID from the environment (defaults to 0 in ROS 2)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Add _launch_proc() to unify subprocess.Popen + _make_log + lf.close() (8 call sites)
- Add _launch_sensor_procs() to merge duplicated sensor proc startup in _detect_and_init_sensor and _restart_sensor_procs
- Add _safe_put() in ws.py to deduplicate queue drop-oldest logic (2 call sites)
- Inline _finalize_bag_and_restart into a lambda (single-use wrapper)
- Merge two lock acquisitions in get_planning_snapshot into one
- Extract wait_and_convert() into named _on_build_map_done() method
After the revert that dropped hardcoded ros_domain_id, BackendNode no
longer has that attribute. os.environ.copy() already inherits
ROS_DOMAIN_ID from the environment, so the explicit assignments were
redundant and caused AttributeError on /nav/nodes/enable.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
STOP button now calls POST /nav/restart which kills and relaunches
map_node, planning_node, and cmd_vel_control, then resets state to idle.
Previously called /nav/cancel which only worked during navigation state.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…iltering

- Updated stale path thresholds to be dynamically scaled based on observed planner period.
- Introduced factors for slow and stop thresholds to improve responsiveness.
- Added exponential moving average for path period to smooth out updates.
- Implemented lookahead steps for better trajectory planning.
- Enhanced velocity command filtering to reduce jitter from frequent planner updates.
…r improved trajectory handling

- Reduced command publish rate from 20 Hz to 12 Hz to minimize jitter from planner updates.
- Updated lookahead steps from 3 to 1 for more responsive trajectory planning.
- Adjusted time delta calculation to align with actual path pose spacing.
…mum speed thresholds

- Increased path stale slow factor from 2.5 to 3.5 for better responsiveness.
- Raised maximum linear acceleration from 0.4 to 0.6 m/s² to allow for quicker movements.
- Added minimum effective linear speed and linear engage threshold to ensure robot movement at low speeds.
- Implemented logic to maintain a minimum forward speed when the planner requests motion and the path is fresh.
Subscribe to /control/target_pose (odom frame) from map_node and expose
it in the planning snapshot. Render as an orange crosshair marker on the
local planning view. Also default ESDF layer to visible.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ocity handling

- Added a fixed reverse speed parameter to ensure consistent backward movement.
- Updated velocity control logic to apply the fixed reverse speed when the requested forward speed is negative.
…speed 0.2

- Add 120×120 map picture-in-picture overlay (top-left of camera) showing
  occupancy map + robot arrow + global path, visible when localized
- Default trajectory layer to enabled
- Raise min_effective_linear_speed from 0.08 → 0.2 m/s

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Expose map_global_path (raw map frame) alongside global_path (odom frame)
  in planning snapshot; map PiP now uses mapGlobalPath for correct coords
- STOP button now calls /nav/nodes/disable instead of /nav/restart,
  stopping nav nodes entirely rather than restarting them

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- build_map_node: remove edges (already dropped from main)
- build_map_node: restore queue size 200 to match main
- unitree_control: revert to main (hardcoded enP8p1s0)
- run_web_app: strip Flutter build logic, keep serve-only
- run_web_app: remove UNITREE_NETWORK_INTERFACE hardcode
- ros2_node_manager: reuse run_rosbag_record.sh for topic list
- run_rosbag_record: add --output flag for programmatic use
- app/README: fix ASCII art alignment, update Quick start
@xiaolefang-dm xiaolefang-dm force-pushed the xiaole/feat/planning-viz branch from b13dc04 to 449e4e0 Compare April 24, 2026 08:32
@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (251.2 files/s, 36974.9 lines/s)
Language files blank comment code
Python 12 576 255 3227
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 46 20 331
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 901 363 4771

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.17 s (246.8 files/s, 36325.7 lines/s)
Language files blank comment code
Python 12 576 255 3227
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 15 46 20 331
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 41 901 363 4771

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.16 s (243.8 files/s, 36087.2 lines/s)
Language files blank comment code
Python 12 576 255 3227
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 14 32 9 242
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 887 352 4682

@github-actions
Copy link
Copy Markdown

cloc github.com/AlDanial/cloc v 2.04 T=0.15 s (275.0 files/s, 40800.9 lines/s)
Language files blank comment code
Python 12 580 257 3234
Markdown 4 155 6 426
C++ 4 60 38 409
Bourne Shell 14 32 9 242
Dockerfile 1 30 29 191
JSON 2 8 0 58
TOML 1 4 0 57
make 1 18 15 55
CMake 1 4 0 17
-------- -------- -------- -------- --------
SUM: 40 891 354 4689

@dvorak0 dvorak0 merged commit 3c46210 into main Apr 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants