Skip to content

Add Localization History & Pose Visualization to Dreamview#6

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-localization-history-visualization
Draft

Add Localization History & Pose Visualization to Dreamview#6
Copilot wants to merge 2 commits intomainfrom
copilot/add-localization-history-visualization

Conversation

Copy link

Copilot AI commented Feb 26, 2026

Adds a toggleable "Pose History" layer to Dreamview's 3D scene: a TF-style axes helper at the current vehicle pose, plus fading breadcrumb trails for both the LiDAR and GNSS localizations to surface drift between the two sources.

New renderer: src/renderer/localization_history.js

  • RingBuffer — fixed-capacity circular buffer (600 slots = 60 s × 10 Hz); overwrites oldest entries in-place
  • Trail lines — two pre-allocated THREE.BufferGeometry / Float32Array lines; vertex brightness fades 0 → 1 from oldest to newest point:
    • LiDAR / main localization → light blue
    • GNSS / shadow localization → orange
  • THREE.AxesHelper — positioned and rotated to the current ADC pose each frame (X=red, Y=green, Z=blue)
  • 10 Hz downsampling — timestamp guard (Date.now() delta ≥ 100 ms) before pushing to either buffer
  • Visibility controlled by STORE.options.showPoseHistory

Configuration & menu wiring

  • src/store/config/MenuData.js — adds positionPoseHistory: 'Pose History' checkbox to the Position section
  • src/store/config/parameters.yml + config/parameters.js — registers showPoseHistory option (default: false, menuId: positionPoseHistory)

Renderer integration (src/renderer/index.js)

this.localizationHistory = new LocalizationHistory();
// …
this.localizationHistory.update(world, this.coordinates, this.scene);

Called after gnss.update and map.update in updateWorld().

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /usr/local/bin/yarn install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Implement a "Localization History & Pose Visualization" feature in Apollo Dreamview.</issue_title>
<issue_description>Implement a "Localization History & Pose Visualization" feature in Apollo Dreamview.

Requirement 1: TF-style Pose Display

  • Goal: Render a 3D coordinate frame (X-red, Y-green, Z-blue) at the vehicle's current location.
  • Input: apollo.localization.LocalizationEstimate (contains pose.position and pose.orientation).
  • UI: Use Three.js AxesHelper or a custom Shader to represent the orientation.

Requirement 2: Historical Trajectory (Breadcrumbs)

  • Goal: Store and render the past $N$ seconds (e.g., 60s) of localization points.
  • Buffer: Implement a ring buffer to store (x, y, z) coordinates to prevent memory leaks.
  • Visualization: * Use a Line or Points object in Three.js.
  • Fade Effect: Apply vertex colors where alpha decreases as the point gets older.
  • Comparison: Allow overlaying "LiDAR Localization" vs "GNSS-only" trajectories in different colors to spot drifts.

Requirement 3: Performance & Toggle

  • Provide a toggle in the Layer Menu to enable/disable "Pose History".
  • Downsample the history (e.g., only record at 10Hz even if localization is at 100Hz) to save GPU resources.
    </issue_description>

<agent_instructions>Task: Implement a "Localization History & Pose Visualization" feature in Apollo Dreamview.

Requirement 1: TF-style Pose Display

  • Goal: Render a 3D coordinate frame (X-red, Y-green, Z-blue) at the vehicle's current location.
  • Input: apollo.localization.LocalizationEstimate (contains pose.position and pose.orientation).
  • UI: Use Three.js AxesHelper or a custom Shader to represent the orientation.

Requirement 2: Historical Trajectory (Breadcrumbs)

  • Goal: Store and render the past $N$ seconds (e.g., 60s) of localization points.
  • Buffer: Implement a ring buffer to store (x, y, z) coordinates to prevent memory leaks.
  • Visualization: * Use a Line or Points object in Three.js.
  • Fade Effect: Apply vertex colors where alpha decreases as the point gets older.
  • Comparison: Allow overlaying "LiDAR Localization" vs "GNSS-only" trajectories in different colors to spot drifts.

Requirement 3: Performance & Toggle

  • Provide a toggle in the Layer Menu to enable/disable "Pose History".
  • Downsample the history (e.g., only record at 10Hz even if localization is at 100Hz) to save GPU resources.
    </agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: daohu527 <10419854+daohu527@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement localization history and pose visualization feature Add Localization History & Pose Visualization to Dreamview Feb 26, 2026
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.

Implement a "Localization History & Pose Visualization" feature in Apollo Dreamview.

2 participants