Skip to content

Commit 2d1f4a4

Browse files
authored
Update Robotics Getting Started Guide to include ROS setup script. (#2407)
1 parent 5ffc087 commit 2d1f4a4

3 files changed

Lines changed: 59 additions & 4 deletions

File tree

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,49 @@ export USE_PROXY=0
8989
> defined ``http_proxy`` and ``https_proxy`` environment variables and
9090
> modify the command above to be `export USE_PROXY=1`
9191
92+
### 3. Express Setup: Prepare your ROS 2 Environment
93+
94+
In order to execute any ROS 2 command in a new shell, you first have to source
95+
the ROS 2 ``setup.bash`` and set the individual ``ROS_DOMAIN_ID`` for your
96+
ROS 2 communication graph.
97+
98+
::::{tab-set}
99+
:::{tab-item} **Jazzy**
100+
:sync: jazzy
101+
102+
```bash
103+
source /opt/ros/jazzy/setup.bash
104+
export ROS_DOMAIN_ID=42
105+
```
106+
107+
:::
108+
:::{tab-item} **Humble**
109+
:sync: humble
110+
111+
```bash
112+
source /opt/ros/humble/setup.bash
113+
export ROS_DOMAIN_ID=42
114+
```
115+
116+
:::
117+
::::
118+
119+
> **Note:** The value 42 serves just as an example. Use an individual ID for every ROS 2
120+
> node that is expected to participate in a given ROS 2 graph in order to avoid conflicts
121+
> in handling messages.
122+
123+
- If you miss to source the ROS 2 setup bash script, you will not be able
124+
to execute any ROS 2 command.
125+
126+
- If you forget to set a dedicated ``ROS_DOMAIN_ID``, the ROS 2 command will
127+
be executed and may partially behave as expected. But you have to expect a diversity of
128+
unexpected behaviors too.
129+
130+
- Ensure you use the same ``ROS_DOMAIN_ID`` for every ROS 2 node that is
131+
expected to participate in a given ROS 2 graph.
132+
- Ensure you use an individual ``ROS_DOMAIN_ID`` for every ROS 2 communication
133+
graph, in order to avoid conflicts in message handling.
134+
92135
## Step-by-step Setup
93136

94137
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.

robotics-ai-suite/scripts/setup-robotics-humble.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ run sudo apt-get install -y ros-humble-collab-slam-lze
146146

147147
step "Adding Intel RealSense apt repository..."
148148
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
149+
curl -sSf https://librealsense.realsenseai.com/Debian/librealsenseai.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/librealsenseai.gpg > /dev/null
150+
echo "deb [signed-by=/etc/apt/keyrings/librealsenseai.gpg] https://librealsense.realsenseai.com/Debian/apt-repo `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/librealsense.list > /dev/null
151151
run sudo apt update
152152
echo -e "Package: librealsense2*\nPin: version 2.55.1-0~realsense.12474\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/librealsense > /dev/null
153153

@@ -168,3 +168,9 @@ run sudo udevadm control --reload-rules || :
168168
run sudo udevadm trigger --subsystem-match=accel || :
169169

170170
step "Setup complete."
171+
echo ""
172+
echo "###########################################"
173+
echo " Source ROS setup script to use this shell:"
174+
echo " $ source /opt/ros/humble/setup.bash"
175+
echo " $ export ROS_DOMAIN_ID=42"
176+
echo "###########################################"

robotics-ai-suite/scripts/setup-robotics-jazzy.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ run sudo apt-get install -y ros-jazzy-collab-slam-lze
144144

145145
step "Adding Intel RealSense apt repository..."
146146
sudo mkdir -p /etc/apt/keyrings
147-
curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | sudo tee /etc/apt/keyrings/librealsense.pgp > /dev/null
148-
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
147+
curl -sSf https://librealsense.realsenseai.com/Debian/librealsenseai.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/librealsenseai.gpg > /dev/null
148+
echo "deb [signed-by=/etc/apt/keyrings/librealsenseai.gpg] https://librealsense.realsenseai.com/Debian/apt-repo `lsb_release -cs` main" | sudo tee /etc/apt/sources.list.d/librealsense.list > /dev/null
149149
run sudo apt update
150150
echo -e "Package: librealsense2*\nPin: version 2.56.5-0~realsense.17055\nPin-Priority: 1001" | sudo tee /etc/apt/preferences.d/librealsense > /dev/null
151151

@@ -166,3 +166,9 @@ run sudo udevadm control --reload-rules || :
166166
run sudo udevadm trigger --subsystem-match=accel || :
167167

168168
step "Setup complete."
169+
echo ""
170+
echo "###########################################"
171+
echo " Source ROS setup script to use this shell:"
172+
echo " $ source /opt/ros/jazzy/setup.bash"
173+
echo " $ export ROS_DOMAIN_ID=42"
174+
echo "###########################################"

0 commit comments

Comments
 (0)