Commit fb767a9
{BugFix} Allow Aria Data Plotter to connect to existing rerun instance
Summary:
This diff implements the fix for streaming in Electron frozen Linux build.
**Problem:**
In the frozen Electron build, streaming data does not flow because the Rerun viewer is not started via the frozen-safe pattern. The streaming worker process calls `rr.spawn()` which cannot launch the bundled binary correctly in frozen mode.
**Solution:**
Modify both Aria Studio and the ClientSDK to use the frozen-safe pattern for streaming:
1. **Aria Studio (`device_manager_new.py`)**:
- Added `await rerun_manager.start_frozen_rerun()` before `start_viewer()` in `start_streaming()`,
- Added `await rerun_manager.start_frozen_rerun()` before `start_viewer()` in `reopen_streaming_viewer()`,
- This matches the VRS playback pattern and ensures the viewer is available for gRPC connection.
2. **Aria Studio (`streaming_rerun_task.py`)**:
- Added frozen mode detection (`is_frozen = getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS')`),
- Pass `connect_to_existing_viewer=is_frozen` to `AriaStreamManager`.
3. **ClientSDK (`aria_streaming_viewer.py`)**:
- Added `connect_to_existing_viewer: bool = False` parameter to `AriaStreamManager.__init__()`,
- Added `connect_to_existing_viewer: bool = False` parameter to `AriaStreamingViewer.__init__()`,
- Pass the flag through to `AriaDataViewerConfig`.
4. **Project Aria Tools (`aria_data_plotter.py`)**:
- Added `connect_to_existing: bool = False` field to `AriaDataViewerConfig`,
- Modified `AriaDataViewer.__init__()` to call `rr.connect_grpc()` instead of `rr.spawn()` when `config.connect_to_existing` is `True`,
- The change is backward compatible (default `False` preserves existing behavior)
DevMate plan: {F1991375964}
Reviewed By: SeaOtocinclus
Differential Revision: D108909540
fbshipit-source-id: ccf3a653f0044f5e4855f90cdfc1abc4fc5dcba81 parent c3bd395 commit fb767a9
1 file changed
Lines changed: 11 additions & 0 deletions
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
169 | 174 | | |
170 | 175 | | |
171 | 176 | | |
| |||
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
261 | 272 | | |
262 | 273 | | |
263 | 274 | | |
| |||
0 commit comments