Skip to content

Commit 5ffc087

Browse files
authored
Add convenience script for Robotics. (#2399)
1 parent 7eba00a commit 5ffc087

4 files changed

Lines changed: 445 additions & 13 deletions

File tree

robotics-ai-suite/docs/index.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Robotics Documentation
2+
######################
3+
4+
This index is only used to enable building the documentation as part of the
5+
CI/CD pipeline.
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
:hidden:
10+
11+
robotics/index
12+
embodied/index
13+
rvc/index
14+
glossary
15+
legal

robotics-ai-suite/docs/robotics/gsg_robot/index.md

Lines changed: 92 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,86 @@ This Get Started Guide explains how to install the Autonomous Mobile Robot.
1414
```{include} ../shared/requirements_robot.md
1515
```
1616

17-
## 1. Install Canonical Ubuntu OS
17+
## Express Setup
18+
19+
The Express Setup will use a convenience script to automatically configure and install the necessary content on your system. If you prefer to perform the steps yourself, use the [Step-by-step Setup](#step-by-step-setup) guide.
20+
21+
### 1. Express Setup: Install Canonical Ubuntu OS
22+
23+
Intel recommends a fresh installation of the Ubuntu distribution of the Linux OS
24+
for your target system, but this is not mandatory.
25+
26+
Install Ubuntu 24.04 (Noble Numbat) or 22.04 (Jammy Jellyfish) based on your processor type. Your choice of OS version determines the compatible ROS distribution (Jazzy Jalisco or Humble Hawksbill, respectively).
27+
28+
::::{tab-set}
29+
:::{tab-item} **Ubuntu 24.04**
30+
:sync: jazzy
31+
32+
Depending on your processor type, select one of the following Canonical Ubuntu 24.04 LTS variants:
33+
34+
|Processor type|Canonical Ubuntu 24.04 LTS variant|ROS2 Compatibility|
35+
|-|-|-|
36+
|Intel® Core™ Ultra Processors|[Ubuntu OS version 24.04 LTS (Noble Numbat)](https://releases.ubuntu.com/24.04) Desktop image|Jazzy|
37+
38+
:::
39+
:::{tab-item} **Ubuntu 22.04**
40+
:sync: humble
41+
42+
Depending on your processor type, select one of the following Canonical Ubuntu 22.04 LTS variants:
43+
44+
|Processor type|Canonical Ubuntu 22.04 LTS variant|ROS2 Compatibility|
45+
|-|-|-|
46+
|11-13th Generation Intel® Core™ Processors,<br>Intel® Processor N-series (products formerly Alder Lake-N)|22.04 LTS image for Intel IoT platforms, available at [Download Ubuntu image for Intel® IoT platforms](https://ubuntu.com/download/iot/intel-iot)|Humble|
47+
48+
:::
49+
::::
50+
51+
Visit the Canonical Ubuntu website to see the detailed installation instructions: [Install Ubuntu desktop](https://ubuntu.com/tutorials/install-ubuntu-desktop).
52+
53+
### 2. Express Setup: Execute Convenience Script
54+
55+
Download and execute the convenience script. Note: This script may take anywhere from 10 to 30 minutes depending on your network and system performance.
56+
57+
::::{tab-set}
58+
:::{tab-item} **Jazzy**
59+
:sync: jazzy
60+
61+
> **Note:** The convenience script will first initialize the system by uninstalling any packages with names matching the following patterns:
62+
> ``*oneapi*`` ``ros-*`` ``intel-igc*`` ``*openvino*`` ``*gazebo*`` ``*realsense*`` ``*level-zero*`` ``libze1``
63+
64+
```bash
65+
wget https://raw.githubusercontent.com/open-edge-platform/edge-ai-suites/refs/heads/main/robotics-ai-suite/scripts/setup-robotics-jazzy.sh
66+
chmod +x setup-robotics-jazzy.sh
67+
export USE_PROXY=0
68+
./setup-robotics-jazzy.sh
69+
```
70+
71+
:::
72+
:::{tab-item} **Humble**
73+
:sync: humble
74+
75+
> **Note:** The convenience script will first initialize the system by uninstalling any packages with names matching the following patterns:
76+
> ``*oneapi*`` ``ros-*`` ``*openvino*`` ``*gazebo*`` ``*realsense*``
77+
78+
```bash
79+
wget https://raw.githubusercontent.com/open-edge-platform/edge-ai-suites/refs/heads/main/robotics-ai-suite/scripts/setup-robotics-humble.sh
80+
chmod +x setup-robotics-humble.sh
81+
export USE_PROXY=0
82+
./setup-robotics-humble.sh
83+
```
84+
85+
:::
86+
::::
87+
88+
> **Note:** If you are behind a network proxy, make sure you have
89+
> defined ``http_proxy`` and ``https_proxy`` environment variables and
90+
> modify the command above to be `export USE_PROXY=1`
91+
92+
## Step-by-step Setup
93+
94+
The Step-by-step Setup will present a series of steps to follow which will configure and install the necessary content on your system. If you prefer to perform the steps automatically, use the [Express Setup](#express-setup) guide.
95+
96+
### 1. Install Canonical Ubuntu OS
1897

1998
Intel recommends a fresh installation of the Ubuntu distribution of the Linux OS
2099
for your target system, but this is not mandatory.
@@ -46,7 +125,7 @@ Depending on your processor type, select one of the following Canonical Ubuntu 2
46125

47126
Visit the Canonical Ubuntu website to see the detailed installation instructions: [Install Ubuntu desktop](https://ubuntu.com/tutorials/install-ubuntu-desktop).
48127

49-
## 2. Install ROS 2 Distribution
128+
### 2. Install ROS 2 Distribution
50129

51130
To install ROS 2 on your system, follow the **ROS 2 setup guide**:
52131

@@ -65,7 +144,7 @@ To install ROS 2 on your system, follow the **ROS 2 setup guide**:
65144
:::
66145
::::
67146

68-
### 2.1 Prepare your ROS 2 Environment
147+
#### 2.1 Prepare your ROS 2 Environment
69148

70149
In order to execute any ROS 2 command in a new shell, you first have to source
71150
the ROS 2 ``setup.bash`` and set the individual ``ROS_DOMAIN_ID`` for your
@@ -113,7 +192,7 @@ Get more information about **The ROS_DOMAIN_ID** in:
113192
:::
114193
::::
115194

116-
### 2.2 Set up a permanent ROS 2 environment
195+
#### 2.2 Set up a permanent ROS 2 environment
117196

118197
To simplify the handling of your system, you may add these lines to ``~/.bashrc``
119198
file. In this way, the required settings are executed automatically
@@ -140,7 +219,7 @@ echo "export ROS_DOMAIN_ID=42" >> ~/.bashrc
140219
:::
141220
::::
142221

143-
### 2.3 Important Notes
222+
#### 2.3 Important Notes
144223

145224
- If you miss to source the ROS 2 setup bash script, you will not be able
146225
to execute any ROS 2 command.
@@ -155,7 +234,7 @@ echo "export ROS_DOMAIN_ID=42" >> ~/.bashrc
155234
graph, in order to avoid conflicts in message handling.
156235

157236

158-
## 3. Set up the Autonomous Mobile Robot APT Repositories
237+
### 3. Set up the Autonomous Mobile Robot APT Repositories
159238

160239
This section explains the procedure to configure the APT package manager to use the hosted APT repositories.
161240

@@ -197,7 +276,7 @@ This section explains the procedure to configure the APT package manager to use
197276
echo -e "Package: intel-oneapi-runtime-*\nPin: version 2025.3.*\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/oneapi > /dev/null
198277
```
199278

200-
## 4. Install OpenVINO™ Packages
279+
### 4. Install OpenVINO™ Packages
201280

202281
The following steps will add the OpenVINO™ APT repository to your package management.
203282

@@ -263,7 +342,7 @@ The following steps will add the OpenVINO™ APT repository to your package mana
263342
(``openvino-libraries-dev``, ``openvino``, ``ros-jazzy-openvino-wrapper-lib``,
264343
and ``ros-jazzy-openvino-node``) are pinned to the same OpenVINO™ version.
265344

266-
### 4.1 Install the OpenVINO™ Runtime and the ROS 2 OpenVINO™ Toolkit
345+
#### 4.1 Install the OpenVINO™ Runtime and the ROS 2 OpenVINO™ Toolkit
267346

268347
The following steps will install the OpenVINO™ packages:
269348

@@ -348,7 +427,7 @@ The following steps will install the OpenVINO™ packages:
348427
![configure_ros-2-openvino-node](../images/configure_ros-humble-openvino-node.png)
349428

350429

351-
### 4.2 OpenVINO™ Re-Installation and Troubleshooting
430+
#### 4.2 OpenVINO™ Re-Installation and Troubleshooting
352431

353432
If you need to reinstall OpenVINO™ or clean your system after a failed
354433
installation, run the following commands:
@@ -379,7 +458,7 @@ sudo apt install ros-humble-openvino-node
379458
::::
380459

381460

382-
## 5. Install Autonomous Mobile Robot Deb packages
461+
### 5. Install Autonomous Mobile Robot Deb packages
383462

384463
This section details steps to install Autonomous Mobile Robot Deb packages.
385464

@@ -591,7 +670,7 @@ This section details steps to install Autonomous Mobile Robot Deb packages.
591670
(``ros-jazzy-collab-slam-lze``) as described above.
592671
593672
594-
## 6. Install RealSense™ Camera SDK
673+
### 6. Install RealSense™ Camera SDK
595674
596675
RealSense™ SDK is a cross-platform library for RealSense™
597676
depth cameras. The SDK allows depth and color streaming, and provides
@@ -654,7 +733,7 @@ access to commonly used robotic functionality with ease.
654733
> **Note:** The pinned version ensures stability across tutorials. To upgrade in the future, update the version in `/etc/apt/preferences.d/librealsense` before installing.
655734
656735
657-
## 7. Install the Intel® NPU Driver on Intel® Core™ Ultra Processors
736+
### 7. Install the Intel® NPU Driver on Intel® Core™ Ultra Processors
658737
659738
If you want to run OpenVINO™ inferencing applications on the NPU device
660739
of Intel® Core™ Ultra processors, you need to install the Intel® NPU driver.
@@ -736,7 +815,7 @@ To install the Intel® NPU driver, complete the following steps:
736815
```
737816
738817
739-
## 8. Reboot to load latest Linux kernel and firmware
818+
### 8. Reboot to load latest Linux kernel and firmware
740819
741820
```bash
742821
sudo reboot
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
#!/bin/bash
2+
3+
set -e
4+
export DEBIAN_FRONTEND=noninteractive
5+
6+
DEBUG=${DEBUG:-0}
7+
if [ "$DEBUG" = "1" ]; then
8+
WGET_QUIET=""
9+
CURL_QUIET="-L"
10+
else
11+
WGET_QUIET="-q"
12+
CURL_QUIET="-sSL"
13+
fi
14+
15+
USE_PROXY=${USE_PROXY:-0}
16+
if [ "$USE_PROXY" = "1" ]; then
17+
OPENVINO_PROXY_SELECT="true"
18+
else
19+
OPENVINO_PROXY_SELECT="false"
20+
fi
21+
22+
run() {
23+
if [ "$DEBUG" = "1" ]; then
24+
"$@"
25+
else
26+
"$@" > /dev/null 2>&1
27+
fi
28+
}
29+
30+
STEP=0
31+
TOTAL=25
32+
step() {
33+
STEP=$((STEP + 1))
34+
echo "${STEP}/${TOTAL} ==> $1"
35+
}
36+
37+
# Function to handle the Ctrl+C event
38+
cleanup_handler() {
39+
printf "\\n** Ctrl+C detected. Performing cleanup...\\n" >&2
40+
41+
# Reset the trap to its default behavior and re-send the signal to terminate
42+
# This is a robust way to ensure the script properly exits
43+
trap - INT
44+
kill -INT "$$"
45+
}
46+
47+
# Trap the SIGINT signal and call the cleanup_handler function
48+
trap 'cleanup_handler' INT
49+
50+
step "Removing previously installed packages..."
51+
run sudo apt remove -y --purge "*oneapi*" "ros-*" "*openvino*" "*gazebo*" "*realsense*" || :
52+
run sudo apt remove -y --purge "intel-igc*" || :
53+
run sudo apt remove -y --purge "*level-zero*" || :
54+
run sudo apt remove -y --purge "libze1" || :
55+
sudo rm -f "/etc/apt/sources.list.d/*" || :
56+
57+
step "Updating package lists and cleaning up..."
58+
run sudo apt update
59+
run sudo apt autoremove -y
60+
61+
step "Installing GCC 12..."
62+
run sudo apt install -y gcc-12 g++-12
63+
run sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 60 --slave /usr/bin/g++ g++ /usr/bin/g++-12
64+
65+
step "Installing prerequisites..."
66+
run sudo apt install -y software-properties-common
67+
run sudo add-apt-repository -y universe
68+
69+
step "Installing curl and fetching ROS 2 apt source..."
70+
run sudo apt update
71+
run sudo apt install curl -y
72+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
73+
echo " ROS apt source version: ${ROS_APT_SOURCE_VERSION}"
74+
curl $CURL_QUIET -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
75+
run sudo dpkg -i /tmp/ros2-apt-source.deb
76+
77+
step "Upgrading system packages..."
78+
run sudo apt update
79+
run sudo apt upgrade -y
80+
81+
step "Installing ROS 2 Humble Desktop (this may take a while)..."
82+
run sudo apt install -y ros-humble-desktop
83+
84+
step "Configuring ROS 2 environment in ~/.bashrc..."
85+
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
86+
echo "export ROS_DOMAIN_ID=42" >> ~/.bashrc
87+
88+
step "Adding Intel ECI and AMR apt repositories..."
89+
sudo -E wget $WGET_QUIET -O- https://eci.intel.com/repos/gpg-keys/GPG-PUB-KEY-INTEL-ECI.gpg | sudo tee /usr/share/keyrings/eci-archive-keyring.gpg > /dev/null 2>&1
90+
echo "deb [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/$(source /etc/os-release && echo $VERSION_CODENAME) isar main" | sudo tee /etc/apt/sources.list.d/eci.list > /dev/null
91+
echo "deb-src [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://eci.intel.com/repos/$(source /etc/os-release && echo $VERSION_CODENAME) isar main" | sudo tee -a /etc/apt/sources.list.d/eci.list > /dev/null
92+
echo "deb [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://amrdocs.intel.com/repos/$(source /etc/os-release && echo $VERSION_CODENAME) amr main" | sudo tee /etc/apt/sources.list.d/amr.list > /dev/null
93+
echo "deb-src [signed-by=/usr/share/keyrings/eci-archive-keyring.gpg] https://amrdocs.intel.com/repos/$(source /etc/os-release && echo $VERSION_CODENAME) amr main" | sudo tee -a /etc/apt/sources.list.d/amr.list > /dev/null
94+
echo -e "Package: *\nPin: origin amrdocs.intel.com\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/amr > /dev/null
95+
96+
step "Configuring Intel ECI apt pinning..."
97+
echo -e "Package: *\nPin: origin eci.intel.com\nPin-Priority: 1000" | sudo tee /etc/apt/preferences.d/isar > /dev/null
98+
echo -e "\nPackage: libflann*\nPin: version 1.19.*\nPin-Priority: -1\n\nPackage: flann*\nPin: version 1.19.*\nPin-Priority: -1" | sudo tee -a /etc/apt/preferences.d/isar > /dev/null
99+
100+
step "Adding Intel oneAPI apt repository..."
101+
wget $WGET_QUIET -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor 2>/dev/null | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
102+
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list > /dev/null
103+
echo -e "Package: intel-oneapi-runtime-*\nPin: version 2025.3.*\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/oneapi > /dev/null
104+
105+
step "Adding Intel OpenVINO apt repository..."
106+
wget $WGET_QUIET -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor 2>/dev/null | sudo tee /usr/share/keyrings/openvino-archive-keyring.gpg > /dev/null
107+
echo "deb [signed-by=/usr/share/keyrings/openvino-archive-keyring.gpg] https://apt.repos.intel.com/openvino/2025 ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2025.list > /dev/null
108+
echo -e "\nPackage: openvino-libraries-dev\nPin: version 2025.3.0*\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/intel-openvino > /dev/null
109+
echo -e "\nPackage: openvino\nPin: version 2025.3.0*\nPin-Priority: 1001" | sudo tee -a /etc/apt/preferences.d/intel-openvino > /dev/null
110+
echo -e "\nPackage: ros-humble-openvino-wrapper-lib\nPin: version 2025.3.0*\nPin-Priority: 1002" | sudo tee -a /etc/apt/preferences.d/intel-openvino > /dev/null
111+
echo -e "\nPackage: ros-humble-openvino-node\nPin: version 2025.3.0*\nPin-Priority: 1002" | sudo tee -a /etc/apt/preferences.d/intel-openvino > /dev/null
112+
113+
step "Updating package lists with new repositories..."
114+
run sudo apt update
115+
116+
step "Installing Level Zero GPU drivers..."
117+
run sudo apt install -y libze1 libze-intel-gpu1
118+
119+
step "Preparing OpenVINO installation (purging old config)..."
120+
run sudo apt install -y debconf-utils
121+
run sudo apt purge -y ros-humble-openvino-node || :
122+
run sudo apt autoremove -y || :
123+
echo PURGE | sudo debconf-communicate ros-humble-openvino-node > /dev/null 2>&1 || true
124+
125+
step "Installing OpenVINO base package..."
126+
run sudo apt install -y openvino
127+
128+
step "Installing ROS 2 OpenVINO node..."
129+
echo "ros-humble-openvino-node openvino-node/pip-proxy select ${OPENVINO_PROXY_SELECT}" | sudo debconf-set-selections
130+
echo "ros-humble-openvino-node openvino-node/models select true" | sudo debconf-set-selections
131+
run sudo -E apt install -y ros-humble-openvino-node
132+
133+
step "Adding Gazebo apt repository..."
134+
run sudo apt-get update
135+
run sudo apt-get install -y curl lsb-release gnupg
136+
run sudo -E add-apt-repository ppa:openrobotics/gazebo11-gz-cli -y
137+
sudo -E curl -sS https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
138+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] https://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
139+
140+
step "Installing ROS 2 Robotics SDK..."
141+
run sudo apt-get update
142+
run sudo apt install -y ros-humble-robotics-sdk
143+
144+
step "Installing Collaborative SLAM (requires Intel Xe/UHD Graphics)..."
145+
run sudo apt-get install -y ros-humble-collab-slam-lze
146+
147+
step "Adding Intel RealSense apt repository..."
148+
sudo mkdir -p /etc/apt/keyrings
149+
curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | sudo tee /etc/apt/keyrings/librealsense.pgp > /dev/null
150+
echo "deb [signed-by=/etc/apt/keyrings/librealsense.pgp] https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/librealsense.list > /dev/null
151+
run sudo apt update
152+
echo -e "Package: librealsense2*\nPin: version 2.55.1-0~realsense.12474\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/librealsense > /dev/null
153+
154+
step "Installing Intel RealSense SDK..."
155+
run sudo apt install -y librealsense2-dkms
156+
run sudo apt install -y librealsense2
157+
158+
step "Installing Linux firmware..."
159+
run sudo apt install -y linux-firmware
160+
161+
step "Installing Intel NPU drivers and configuring permissions..."
162+
run sudo apt-get install -y intel-level-zero-npu intel-driver-compiler-npu
163+
sudo usermod -a -G render "$USER" || :
164+
sudo chown root:render /dev/accel/accel0 || :
165+
sudo chmod g+rw /dev/accel/accel0 || :
166+
sudo bash -c "echo 'SUBSYSTEM==\"accel\", KERNEL==\"accel*\", GROUP=\"render\", MODE=\"0660\"' > /etc/udev/rules.d/10-intel-vpu.rules"
167+
run sudo udevadm control --reload-rules || :
168+
run sudo udevadm trigger --subsystem-match=accel || :
169+
170+
step "Setup complete."

0 commit comments

Comments
 (0)