Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Linux desktop UI runtime preparation for C3/C4.
This addresses two separate issues found while testing the desktop launchers on Arch Linux x86_64.
1. BLASFEO executable stack
The bundled x86_64
third_party/acados/x86_64/lib/libblasfeo.sohas itsGNU_STACKprogram header markedRWE(read/write/execute).On systems that reject shared libraries requiring an executable stack, this prevents BLASFEO from loading and causes both the lateral and longitudinal ACADOS Python extensions to fail at import time with:
The C3/C4 desktop launchers now detect
GNU_STACK ... RWEon Linux x86_64 and usepatchelf --clear-execstackto change the stack requirement fromRWEtoRWbefore loading the ACADOS runtime.2. msgq / VisionIPC linkage
The C3/C4 launchers were building the msgq Python extensions using
msgq_repo's standalone SConstruct. That environment does not provide StarPilot'scommonlibrary, sovisionipc_pyx.sowas linked withoutcommon/libcommon.a.This caused the extension to fail at runtime with an unresolved
cloudlog_esymbol:The msgq extensions are now built through StarPilot's root SConstruct instead. This correctly links
common/libcommon.aand resolves the missing symbol.Initial Testing
Tested on Arch Linux x86_64.
GNU_STACKis changed fromRWEtoRW.msgq.ipc_pyxandmsgq.visionipc.visionipc_pyxload successfully../onroad --c4 --demosuccessfully prepares the runtime, loads the demo route, initializes the camera streams, and launches the C4 UI.Desktop Replay Recording
This PR also adds optional recording features to the Linux desktop replay workflow.
The additional recording modes are guarded by the existing
PCruntime detection and are not enabled on comma hardware.Both desktop interfaces can be launched with:
Recording options
Recording is enabled with
RECORD=1.RECORD_COMBINED=1RECORD_HUD_ONLY=1RECORD_CAMERA_ONLY=1RECORD_METRIC=1RECORD_CAMERA_VIEW=autoRECORD_CAMERA_VIEW=standardRECORD_CAMERA_VIEW=wideRECORD_CAMERA_RESOLUTION=renderRECORD_CAMERA_RESOLUTION=sourceRECORD_DURATION=<seconds>RECORD_OUTPUT=<path>RECORD_QUALITY=<crf>RECORD_BITRATE=<bitrate>RECORD_CAMERA_VIEWsupportsauto,standard, andwideon both the C3 and C4 desktop interfaces.Combined camera + HUD recording
RECORD_COMBINED=1records the camera and complete rendered interface together.Example for C4:
Combined recordings use H.264 in an MP4 container.
C3 recording
The C3 desktop UI has a native 2160x1080 canvas.
It can be recorded at that resolution using
SCALE=1:Transparent HUD recording
RECORD_HUD_ONLY=1records the rendered HUD without the camera pixels.Camera frames continue to be processed internally so camera geometry, calibration, and model transformations remain correctly aligned.
The output uses lossless PNG/RGBA frames in a Matroska container, preserving the alpha channel.
Example:
The resulting
.mkvcan be composited over another video while retaining HUD transparency.Camera-only recording
On the C4/Mici UI,
RECORD_CAMERA_ONLY=1stops rendering after the transformed camera frame, omitting the HUD and other UI elements.The output uses lossless FFVHUFF in a Matroska container.
Example:
C4 near-source rendering
The C4/Mici UI uses a 536x240 base canvas.
For camera or combined recording:
uses a 2.5x rendering scale and produces a 1340x600 canvas.
This preserves the C4/Mici UI aspect ratio and geometry so the camera transformations and model overlays remain aligned.
It is intentionally not a raw 1344x760 camera export.
For a higher-resolution rendered C4 UI, normal scaling remains available. For example:
produces a 2412x1080 C4/Mici canvas.
Recording duration
RECORD_DURATIONstops recording based on the number of rendered recording frames rather than wall-clock time.For example:
stops after the number of rendered frames corresponding to 30 seconds at the normal recording frame rate.
Output formats
RECORDRECORD_COMBINEDRECORD_HUD_ONLYRECORD_CAMERA_ONLYLocal Routes from a comma Device
Desktop replay can also use route data copied directly from a comma device.
This makes it possible to work with local recordings without first downloading the route through a comma account.
Route location on the device
Recorded segments are stored under:
A route is split into numbered segment directories. For example:
A segment can contain files such as:
Copy a route over SSH
With SSH access already enabled on the comma, the route can be copied to the desktop with
rsync.For example:
This produces local directories such as:
Replay the copied route
The complete route can then be loaded directly:
The local-route fallback added in this PR recognizes this comma route naming format when
SegmentRangedoes not.This also allows the desktop replay configuration to load logged route parameters instead of silently falling back to desktop defaults.
Logged route configuration restoration
Previously, this local route format was accepted by replay itself but was not recognized by
SegmentRangewhile preparing the desktop onroad configuration. As a result, logged route parameters could fail to load and the desktop UI could silently use its local/default configuration instead.The fallback now locates
initDatafrom these local routes and restores the logged parameters available to the desktop replay configuration.In the tested route, this fixed driving-model identification: the route contained:
and the desktop C3/C4 UI correctly identified Pop Model V2 after the local-route fallback was added.
Other configuration values present in the logged route data can likewise be restored through the existing replay configuration path instead of being replaced by desktop defaults.
Additional Testing
Tested using local comma route data on Arch Linux x86_64.
C4/Mici
SCALE=4.5.C3
SCALE=1.Recording duration
A
RECORD_DURATION=5test at 60 FPS produced:Hardware isolation
The additional recording modes use the existing
PCruntime detection.The optional desktop recording flags therefore cannot enable these modes on comma hardware. Shared rendering paths retain their normal behavior when the desktop recording modes are disabled.
Commits
256ba5822— Fix BLASFEO loading on Linux desktopd32b0a348— Fix msgq host extension linkage215f647d1— Add desktop replay recording and local route supportbce28c0cd— Document desktop replay recording721df3e6b— Document local comma route replay