Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds a new shell script to automate the installation of Intel RealSense (Librealsense) on NVIDIA Jetson devices within Docker environments.
- Introduces
jetson_realsense.shto set up swap, install dependencies, and build librealsense v2.50.0 - Suppresses initial device errors, prompts for camera removal, and applies udev rules
- Cleans and organizes build directory in the user's home
Comments suppressed due to low confidence (1)
scripts/jetson_realsense.sh:6
- [nitpick] The variable name 'con_dev' is unclear; consider renaming it to something more descriptive like 'video_device_count'.
con_dev=$(ls /dev/video* | wc -l)
| #Locally suppress stderr to avoid raising not relevant messages | ||
| exec 3>&2 | ||
| exec 2> /dev/null | ||
| con_dev=$(ls /dev/video* | wc -l) | ||
| exec 2>&3 |
There was a problem hiding this comment.
Suppressing stderr globally may hide important errors; consider redirecting stderr only for the specific command (e.g., ls /dev/video* 2>/dev/null).
| #Locally suppress stderr to avoid raising not relevant messages | |
| exec 3>&2 | |
| exec 2> /dev/null | |
| con_dev=$(ls /dev/video* | wc -l) | |
| exec 2>&3 | |
| # Suppress stderr for the specific command to avoid raising not relevant messages | |
| con_dev=$(ls /dev/video* 2>/dev/null | wc -l) |
|
|
||
| if [ $(sudo swapon --show | wc -l) -eq 0 ]; | ||
| then | ||
| echo "No swapon - setting up 1Gb swap file" |
There was a problem hiding this comment.
The message says '1Gb' but the script allocates 2G of swap; update the text to match the actual size.
| echo "No swapon - setting up 1Gb swap file" | |
| echo "No swapon - setting up 2G swap file" |
|
|
||
| echo Installing Librealsense-required dev packages | ||
| sudo apt-get install git cmake libssl-dev freeglut3-dev libusb-1.0-0-dev pkg-config libgtk-3-dev unzip -y | ||
| rm -f ./master.zip |
There was a problem hiding this comment.
This removes 'master.zip', but the script downloads 'v2.50.0.zip'; either remove the correct file or drop this line.
| rm -f ./master.zip |
| lsb_release -a | ||
| echo "Kernel version $(uname -r)" | ||
| sudo apt-get update | ||
| cd ~/ |
There was a problem hiding this comment.
Using '~/' may fail if HOME isn’t set; consider using "$HOME" for portability.
| cd ~/ | |
| cd $HOME/ |
add realsense install script for jetson for docker builds