Repository navigation
Conversation
Signed-off-by: Samele1234 <18435600211@163.com>
[High impact] The PR reaches ROS-driven simulation, multiview model output, and shared Web serving. Do not merge until the Wan startup failure, gamepad gear loop, actor recording errors, and cross-site driving access are fixed. Findings
SummaryThis PR adds ROS 2 driving, a browser cockpit, session recordings, and comparison videos. It also adds mixed-resolution camera generation and changes vehicle timing.
DiagramsequenceDiagram
participant Driver as Browser or ROS driver
participant Host as Interactive Drive
participant Model as Camera model
participant Files as Recording files
Driver->>Host: Driving controls or reset
Host->>Host: Sample vehicle trajectory
Host->>Model: Poses and scene controls
Model-->>Host: Camera frames and BEV
Host-->>Driver: Video and vehicle state
Host->>Files: Frames, poses, controls, actors
Files-->>Driver: Completed archive
Reviews (1) · Last reviewed commit: "Add ROS 2 driving and dynamic cockpit ca..." · Reviewed by Greptile |
| "transformer/diffusion_pytorch_model.safetensors.index.json" | ||
| ) | ||
| _WAN22_VAE_PATH = "https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B/resolve/main/Wan2.2_VAE.pth" | ||
| _WAN22_TEXT_ENCODER = None |
There was a problem hiding this comment.
| if (el) el.classList.toggle('active', gear.toLowerCase() === g); | ||
| }); | ||
|
|
||
| this.updateControls(); |
There was a problem hiding this comment.
pollGamepad() calls setGear(), which calls updateControls() and starts another gamepad poll before the first finishes. Holding a D-pad direction repeats this until the browser throws a stack overflow. B/X shifts also repeat before lastGamepadButtons is updated. New steering and pedal commands are not sent. Change the gear without starting another poll.
| return web.json_response( | ||
| {"sdp": local_description.sdp, "type": local_description.type} | ||
| {"sdp": local_description.sdp, "type": local_description.type}, | ||
| headers={"Access-Control-Allow-Origin": "*"}, |
There was a problem hiding this comment.
Other websites gain driving control
If an unrelated website can reach the backend on a known port, such as the documented 8089, wildcard CORS lets it read the WebRTC answer and complete a connection. _offer() checks neither the origin nor a session secret, and the new connection replaces the current driver. The page can then receive video and send driving controls. Allow only configured cockpit origins or require a session secret before accepting an offer.
How this was verified: The offer endpoint accepts unauthenticated offers, returns its answer to every origin, and routes the resulting data channel directly to driving inputs.
| "translation_world": actor.translations_world[i].tolist(), | ||
| "orientation_xyzw": actor.orientations_xyzw[i].tolist(), |
There was a problem hiding this comment.
Recorded actors use wrong frames
append() uses the current chunk's frame index for every actor track. But build_trajectories() also returns full recorded tracks for actors outside the active physics window. These tracks restart at index zero in every saved chunk, giving actors the wrong positions. A short track can also raise IndexError and stop recording. Sample each actor at the frame timestamp using actor.timestamps_us.
| else: | ||
| query_times = query_times.clamp_max(self._at(int(self._map[-1]))) |
There was a problem hiding this comment.
With the ego car enabled, render_bev() never caps scene time at the last source frame. The normal cockpit uses this branch, while RGB controls keep showing the last source frame after the clip ends. Prepared scenes allow no extrapolation, so traffic disappears from the BEV even though it remains in the controls. Keep the ego pose current, but sample recorded objects at the same capped time as RGB.
| private connectionStatus(message: string, failed = false): void { | ||
| const status = document.getElementById('connection-status'); | ||
| if (status) { | ||
| status.textContent = message; | ||
| status.dataset.state = failed ? 'error' : 'info'; | ||
| } |
There was a problem hiding this comment.
renderTelemetry() hides the connection banner after connecting, but connectionStatus() never makes it visible again. Later disconnects and failed reconnects update a hidden element, leaving users with frozen video and no error message. Restore the banner when reporting connection progress or errors.
No description provided.