-
Notifications
You must be signed in to change notification settings - Fork 111
Add BlueOS recorder #3422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BlueOS recorder #3422
Conversation
Reviewer's GuideThis PR introduces a bootstrap installer script for the BlueOS recorder that auto-detects Linux architecture, constructs the download URL, and installs the prebuilt binary into either the active virtual environment or /usr/bin with progress feedback. It also integrates the recorder binary into the existing Docker build and static installation tooling. Class diagram for BlueOS recorder installer script structureclassDiagram
class BootstrapInstaller {
+VERSION: string
+PROJECT_NAME: string
+REPOSITORY_ORG: string
+REPOSITORY_NAME: string
+REPOSITORY_URL: string
+install()
+detect_architecture()
+construct_download_url()
+determine_bin_dir()
+download_and_install()
}
Flow diagram for BlueOS recorder bootstrap installer scriptflowchart TD
A[Start Installation] --> B[Detect Linux Architecture]
B --> C{Supported Architecture?}
C -- Yes --> D[Select Build Name]
C -- No --> E[Exit with Error]
D --> F[Construct Download URL]
F --> G{Virtual Environment Active?}
G -- Yes --> H[Set BIN_DIR to $VIRTUAL_ENV/bin]
G -- No --> I[Set BIN_DIR to /usr/bin]
H --> J[Download Binary]
I --> J[Download Binary]
J --> K[Set Executable Permissions]
K --> L[Show File Type]
L --> M[Finish Installation]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
4bbc649
to
385891f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @patrickelectric - I've reviewed your changes - here's some feedback:
- Consider adding a CLI flag or environment variable to override the hard-coded VERSION so users can install different releases without editing the script.
- Installing to /usr/bin will fail without root privileges—either prompt for sudo, detect elevation, or fall back to a user‐writable location like ~/.local/bin when appropriate.
- Improve portability by checking for wget or curl and using whichever is available rather than assuming wget is installed.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a CLI flag or environment variable to override the hard-coded VERSION so users can install different releases without editing the script.
- Installing to /usr/bin will fail without root privileges—either prompt for sudo, detect elevation, or fall back to a user‐writable location like ~/.local/bin when appropriate.
- Improve portability by checking for wget or curl and using whichever is available rather than assuming wget is installed.
## Individual Comments
### Comment 1
<location> `core/tools/recorder/bootstrap.sh:28` </location>
<code_context>
+ BUILD_NAME="aarch64-unknown-linux-musl"
+ ;;
+ *)
+ echo "Architecture: $ARCH is unsupported, please create a new issue on https://github.com/bluerobotics/BlueOS/issues"
+ exit 1
+ ;;
</code_context>
<issue_to_address>
Exit code 1 is appropriate, but consider printing supported architectures.
Including supported architectures in the error message will make it easier for users to resolve compatibility issues.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
BUILD_NAME="aarch64-unknown-linux-musl" | ||
;; | ||
*) | ||
echo "Architecture: $ARCH is unsupported, please create a new issue on https://github.com/bluerobotics/BlueOS/issues" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Exit code 1 is appropriate, but consider printing supported architectures.
Including supported architectures in the error message will make it easier for users to resolve compatibility issues.
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
385891f
to
28adedc
Compare
'nginx',250,"nice -18 nginx -g \"daemon off;\" -c $TOOLS_PATH/nginx/nginx.conf" | ||
'log_zipper',250,"nice -20 $SERVICES_PATH/log_zipper/main.py '/shortcuts/system_logs/\\\\*\\\\*/\\\\*.log' --max-age-minutes 60" | ||
'bag_of_holding',250,"$SERVICES_PATH/bag_of_holding/main.py" | ||
'recorder',250,"blueos-recorder --recorder-path /usr/blueos/userdata/recorder" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add --verbose
in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be working well. Testedo n Pi5 w/ 1xUSBCam (1080p) + 1xRadcam (4k + 1080p);
-
~5% CPU use
-
341MB in 3.4 seconds, which gives us ~100MB/s for this case
-
A small limitation, that we must consider: FoxGlove format expects
baseline
profile, and radcam is by default using themain
profile. In the end, Foxglove can't display it:

-
The USB camera video was fine
-
I started and ended many files by arming/disarming, and it seems solid!
With all that said, someone should test it on a Pi4 and check the CPU usage.
Signed-off-by: Patrick José Pereira patrickelectric@gmail.com
Summary by Sourcery
Add BlueOS recorder support by incorporating its binary into the Docker image, updating the static binaries installer, and supplying a versioned bootstrap installer for different CPU architectures.
New Features: