Skip to content

Commit a6dd43f

Browse files
jb-balajijouillet
andauthored
[Robotics] feat: Enhance Follow-Me Demo with Audio and Gesture Control (#2109)
Co-authored-by: Jeremy Ouillette <jeremy.ouillette@intel.com>
1 parent 04ad417 commit a6dd43f

File tree

69 files changed

+2436
-2347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2436
-2347
lines changed

robotics-ai-suite/components/adbscan/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ debhelper-build-stamp
3232
.debhelper
3333
*.build
3434
*.substvars
35-
/*/debian/files
35+
/*/debian/files
36+
37+
followme_venv/
38+
.vscode/
39+
*.logs
Lines changed: 194 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,247 @@
11
<!--
2-
Copyright (C) 2025 Intel Corporation
2+
Copyright (C) 2026 Intel Corporation
33
44
SPDX-License-Identifier: Apache-2.0
55
-->
66

7-
# Intel's Robotics AI Suite : Follow-me with gesture-control
7+
# Intel's Robotics AI Suite: Follow-Me with Gesture and Audio Control
88

9-
This release version contains `debian` package building rules. `dpkg-buildpackage` is automatically triggered in the CI/CD pipeline and the created debian packages are pushed to Intel's AMR repo.
9+
A Gazebo simulation of a TurtleBot3 Waffle autonomously following a guide robot using Intel's
10+
ADBSCAN (Adaptive DBSCAN) algorithm. Supports two sensor modes — 2D LiDAR and Intel RealSense
11+
depth camera — with optional hand-gesture control and voice audio control.
12+
13+
## Demo Modes
14+
15+
| Mode | Sensor | Gesture | Audio | Script |
16+
|------|--------|---------|-------|--------|
17+
| LiDAR + Gesture | 2D LiDAR | Yes | No | `demo_lidar.sh` |
18+
| LiDAR + Gesture + Audio | 2D LiDAR | Yes | Yes | `demo_lidar_audio.sh` |
19+
| RealSense + Gesture | Depth camera | Yes | No | `demo_RS.sh` |
20+
| RealSense + Gesture + Audio | Depth camera | Yes | Yes | `demo_RS_audio.sh` |
21+
22+
---
1023

1124
## Prerequisites
1225

13-
Please make sure to include intel's AMR repo to `/etc/apt/sources.list.d/`
26+
### Supported ROS 2 Distributions
1427

15-
### Install debian packages
28+
| ROS 2 | Gazebo | Status |
29+
|-------|--------|--------|
30+
| Jazzy | Harmonic | Recommended |
31+
| Humble | Fortress | Supported |
1632

17-
Install `ros-humble-followme-turtlebot3-gazebo` debian package
33+
### System Packages
1834

1935
```bash
20-
sudo apt update
21-
sudo apt install ros-humble-followme-turtlebot3-gazebo
36+
sudo apt install python3-colcon-common-extensions python3-pip
37+
# For ROS 2 Humble only:
38+
sudo apt install ros-humble-gazebo-* ros-humble-dynamixel-sdk \
39+
ros-humble-turtlebot3-msgs ros-humble-turtlebot3 ros-humble-xacro
2240
```
2341

24-
### Create Python Virtual Environment
42+
### Python Virtual Environment
43+
44+
Create a virtual environment **outside** the colcon workspace to avoid build interference:
2545

2646
```bash
2747
sudo apt install pipx
2848
pipx install virtualenv
2949
pipx ensurepath
3050
source ~/.bashrc
31-
virtualenv venv_followme
32-
source venv_followme/bin/activate
51+
52+
# Create venv (example location):
53+
virtualenv ~/followme_env
54+
source ~/followme_env/bin/activate
3355
```
3456

35-
### Install Python modules
57+
### Python Packages
3658

37-
This application uses [Mediapipe Hands Framework](https://mediapipe.readthedocs.io/en/latest/solutions/hands.html) for hand gesture recognition. Please install the following python packages as a pre-requisite
59+
This application uses the [MediaPipe Hands Framework](https://mediapipe.readthedocs.io/en/latest/solutions/hands.html)
60+
for hand gesture recognition.
3861

39-
For ROS Jazzy:
62+
For ROS 2 **Jazzy** (gesture only):
4063
```bash
41-
pip3 install numpy==1.26.4
42-
pip3 install mediapipe==0.10.31
43-
pip3 install opencv-python==4.8.0.76
44-
pip3 install pyyaml
64+
pip3 install numpy==1.26.4 mediapipe==0.10.31 opencv-python==4.8.0.76 pyyaml
4565
```
4666

47-
For ROS Humble:
67+
For ROS 2 **Jazzy** (gesture + audio):
4868
```bash
49-
pip3 install numpy==1.24.3
50-
pip3 install mediapipe==0.10.9
51-
pip3 install opencv-python==4.8.0.76
52-
pip3 install pyyaml
69+
pip3 install numpy==1.26.4 mediapipe==0.10.31 opencv-python==4.8.0.76 pyyaml \
70+
librosa openvino==2025.3.0 simpleaudio sounddevice tqdm inflect
5371
```
5472

55-
## Run gazebo simulator with 2D lidar
56-
73+
For ROS 2 **Humble** (gesture only):
5774
```bash
58-
sudo chmod +x /opt/ros/humble/share/followme_turtlebot3_gazebo/scripts/demo_lidar.sh
59-
/opt/ros/humble/share/followme_turtlebot3_gazebo/scripts/demo_lidar.sh
75+
pip3 install numpy==1.24.3 mediapipe==0.10.9 opencv-python==4.8.0.76 pyyaml tensorflow
6076
```
6177

62-
## Run gazebo simulator with RealSense
63-
64-
Open three terminals and run the following commands
65-
Terminal 1: This command will open gazebo simulator and rviz
66-
78+
For ROS 2 **Humble** (gesture + audio):
6779
```bash
68-
sudo chmod +x /opt/ros/humble/share/followme_turtlebot3_gazebo/scripts/demo_RS.sh
69-
/opt/ros/humble/share/followme_turtlebot3_gazebo/scripts/demo_RS.sh
80+
pip3 install numpy==1.24.3 mediapipe==0.10.9 opencv-python==4.8.0.76 pyyaml tensorflow \
81+
librosa openvino==2025.3.0 simpleaudio sounddevice tqdm inflect
7082
```
7183

72-
Terminal 2: This command will run the ADBSCAN package
73-
74-
```bash
75-
source /opt/ros/humble/setup.bash
76-
ros2 run adbscan_ros2_follow_me adbscan_sub_w_gesture --ros-args --params-file /opt/ros/humble/share/adbscan_ros2_follow_me/config/adbscan_sub_RS.yaml -r cmd_vel:=tb3/cmd_vel
77-
```
84+
---
7885

79-
Terminal 3: This command will run the gesture recognition package
86+
## Build
8087

8188
```bash
82-
source /opt/ros/humble/setup.bash
83-
ros2 run gesture_recognition_pkg traj_and_img_publisher_node.py --ros-args --params-file /opt/ros/humble/share/gesture_recognition_pkg/config/gesture_recognition.yaml
84-
```
85-
86-
## Robotic SDK 2023.1 Release: Follow-me
87-
88-
## Hardware
89-
90-
1. Turn off Pengo;
91-
2. Unplug HDMI cable and replace with dungo;
92-
3. Unplug power cable and replace it with battery;
93-
4. Turn on the robot by pressing the switch button;
94-
95-
To check if RealSense camera is working, type:
96-
realsense-viewer
89+
cd Follow_me_RS_2D
90+
source /opt/ros/<distro>/setup.bash
91+
source ~/followme_env/bin/activate
92+
colcon build --symlink-install
93+
source install/setup.bash
94+
```
9795

98-
## To Run Follow-me on Pengo with RealSense
96+
---
9997

100-
note: the Kobuki chassis needs to be turned on for the motor to run.
98+
## Running the Demos
10199

102-
Step 1: Enable Kobuki (only needed when moving the actual Pengo robot chassis’s Kobuki chassis):
103-
cd /home/awm/project/robotic/ati/iotg_workloads-robotic_platform_poc
104-
source ./setup.sh
105-
./run_kobuki.sh
100+
All demo scripts auto-detect the installed ROS 2 distribution, source the workspace, kill any
101+
stale Gazebo processes, and launch the full stack (Gazebo, ROS-Gazebo bridges, ADBSCAN, gesture,
102+
trajectory, and optionally audio nodes) with RViz.
106103

107-
Step 2: Start RealSense ROS2 publication:
104+
### 2D LiDAR — Gesture only
108105

109-
1. . /opt/ros/foxy/setup.sh
110-
2. ros2 launch realsense2_camera rs_launch.py serial_no:="_109622074344" depth_module.profile:=640x480x6 pointcloud.enable:=true camera_namespace:=/
106+
```bash
107+
source ~/followme_env/bin/activate
108+
./src/turtlebot3_simulations/followme_turtlebot3_gazebo/scripts/demo_lidar.sh
109+
```
111110

112-
Step 3: To run RealSense version of Follow-me:
113-
cd /home/awm/project/robotic/ati/Follow_me_demo/Follow_me_configurable_2/src
114-
. ./install/setup.sh
115-
./start_adbscan_sub_RS.sh
111+
### 2D LiDAR — Gesture + Audio
116112

117-
## To Run Follow-me on Pengo with 2D lidar
113+
```bash
114+
source ~/followme_env/bin/activate
115+
./src/turtlebot3_simulations/followme_turtlebot3_gazebo/scripts/demo_lidar_audio.sh
116+
```
118117

119-
note: the Kobuki chassis needs to be turned on for the motor to run.
118+
### RealSense — Gesture only
120119

121-
Step 1: Enable Kobuki (only needed when moving the actual Pengo robot chassis’s Kobuki chassis):
122-
cd /home/awm/project/robotic/ati/iotg_workloads-robotic_platform_poc
123-
source ./setup.sh
124-
./run_pengo_lslam.sh
120+
```bash
121+
source ~/followme_env/bin/activate
122+
./src/turtlebot3_simulations/followme_turtlebot3_gazebo/scripts/demo_RS.sh
123+
```
125124

126-
Step 2: To run RealSense version of Follow-me:
127-
cd /home/awm/project/robotic/ati/Follow_me_demo/Follow_me_configurable_2/src
128-
. ./install/setup.sh
129-
./start_adbscan_sub_2.sh
125+
### RealSense — Gesture + Audio
130126

131-
## To configure
127+
```bash
128+
source ~/followme_env/bin/activate
129+
./src/turtlebot3_simulations/followme_turtlebot3_gazebo/scripts/demo_RS_audio.sh
130+
```
132131

133-
The configuration file for 2D lidar version is: adbscan_sub_2D.yaml
134-
The configuration file for RealSense camera version is: adbscan_sub_RS.yaml
132+
> **Note:** Allow ~10 seconds after launch for Gazebo and all nodes to initialize before the
133+
> TurtleBot3 begins following. The guide robot trajectory runs for ~45 seconds.
134+
135+
---
136+
137+
## Architecture
138+
139+
Each demo runs in a single terminal using a two-phase launch sequence:
140+
141+
1. **Shared launch** (`*_shared.launch.py`) — Gazebo world, robot state publishers,
142+
Gazebo↔ROS bridges, and spawn of both the TurtleBot3 Waffle and guide robot.
143+
2. **Perception launch** (`*_gesture.launch.py` or `*_gesture_audio.launch.py`) — ADBSCAN
144+
node, gesture recognition, trajectory publisher, and (for audio modes) speech recognition
145+
and audio file publisher.
146+
147+
### Launch Files
148+
149+
| Launch File | Phase | Description |
150+
|-------------|-------|-------------|
151+
| `lidar_shared.launch.py` | 1 | Gazebo world + bridges for 2D LiDAR |
152+
| `rs_shared.launch.py` | 1 | Gazebo world + bridges for depth camera |
153+
| `lidar_gesture.launch.py` | 2 | ADBSCAN + gesture + trajectory (LiDAR) |
154+
| `lidar_gesture_audio.launch.py` | 2 | ADBSCAN + gesture + audio + trajectory (LiDAR) |
155+
| `rs_gesture.launch.py` | 2 | ADBSCAN + gesture + trajectory (RS) |
156+
| `rs_gesture_audio.launch.py` | 2 | ADBSCAN + gesture + audio + trajectory (RS) |
157+
158+
```text
159+
┌─────────────────────────────────────────────┐
160+
│ Gazebo Harmonic / Fortress │
161+
│ ┌─────────────┐ ┌──────────────────┐ │
162+
│ │ Guide Robot │────▶│ TurtleBot3 Waffle │ │
163+
│ │ (traj node) │ │ (ADBSCAN follower)│ │
164+
│ └─────────────┘ └──────────────────┘ │
165+
└───────────┬─────────────────────────────────┘
166+
│ /camera/points OR /scan
167+
168+
┌─────────────────────┐
169+
│ ADBSCAN Node │ ◀── gesture_recognition_node
170+
│ adbscan_sub_w_ │ ◀── speech_recognition_node (audio modes)
171+
│ gesture[_audio] │
172+
└──────────┬──────────┘
173+
│ /tb3/cmd_vel
174+
175+
TurtleBot3 Waffle
176+
```
135177

136-
Parameters such as subsample ratio, filter range, sensor type etc. can be configured in this file.
178+
### Key Nodes
179+
180+
| Node | Package | Description |
181+
|------|---------|-------------|
182+
| `adbscan_sub_w_gesture` | `adbscan_ros2_follow_me` | ADBSCAN follower (gesture mode) |
183+
| `adbscan_sub_w_gesture_audio` | `adbscan_ros2_follow_me` | ADBSCAN follower (gesture + audio) |
184+
| `gesture_recognition_node.py` | `gesture_recognition_pkg` | MediaPipe hand gesture classifier |
185+
| `traj_and_img_publisher_node.py` | `gesture_recognition_pkg` | Guide robot trajectory publisher |
186+
| `speech_recognition_node.py` | `speech_recognition_pkg` | Voice command recognizer |
187+
| `audio_publisher_node.py` | `speech_recognition_pkg` | Audio file publisher |
188+
189+
---
190+
191+
## Key Configuration Parameters
192+
193+
### Sensor Config Files
194+
195+
| Sensor | Config File |
196+
|--------|-------------|
197+
| 2D LiDAR | `src/adbscan_ros2/config/adbscan_sub_2D.yaml` |
198+
| RealSense | `src/adbscan_ros2/config/adbscan_sub_RS.yaml` |
199+
200+
### Important Parameters
201+
202+
| Parameter | Description | Recommended Value |
203+
|-----------|-------------|-------------------|
204+
| `tracking_radius` | Search radius (m) around last known target each frame | `1.0` |
205+
| `init_tgt_loc` | Initial target distance (m) the follower aims to maintain | `0.8` (hardware) / `0.5` (Gazebo sim) |
206+
| `max_dist` | Maximum follow distance (m) — no command if guide is farther | `3.0` |
207+
| `min_dist` | Minimum follow distance (m) — slow/stop when guide is closer | `0.5` (hardware) / `0.3` (Gazebo sim) |
208+
| `max_linear` | Maximum linear velocity (m/s) | `0.8` |
209+
| `max_angular` | Maximum angular velocity (rad/s) | `0.6` |
210+
| `max_frame_blocked` | Frames without detection before target is considered lost | `5` |
211+
| `z_filter` | Minimum Z height (m) for RS point cloud — filters ground | `-0.15` |
212+
| `subsample_ratio` | Keep 1 in N points (RS point cloud subsampling) | `15.0` |
213+
| `gesture_enable` | Enable hand gesture start/stop control | `true` |
214+
| `audio_enable` | Enable voice command start/stop control | `true` |
215+
216+
> **Important:** `tracking_radius` must be large enough to cover the guide's lateral movement
217+
> between frames. Values that are too small (e.g. `0.2`) cause the tracker to lose the target
218+
> during turns, making the follower go straight instead of turning.
219+
>
220+
> **Gazebo simulation note:** The RealSense launch files (`rs_gesture.launch.py`,
221+
> `rs_gesture_audio.launch.py`) override three parameters for the simulated depth camera:
222+
> `optical_frame: False` (Gazebo publishes in body frame, not optical frame),
223+
> `min_dist: 0.3` (guide robot front surface appears at ~0.44 m, below the YAML default 0.5),
224+
> and `init_tgt_loc: 0.5` (matching the actual cluster centroid distance). These overrides are
225+
> not needed on real hardware with an Intel RealSense camera.
226+
227+
---
228+
229+
## Guide Robot
230+
231+
The guide robot (airport-style follow-me car) uses a black-and-yellow checkerboard visual
232+
pattern and follows a pre-programmed S-curve trajectory lasting ~50 seconds. It starts facing
233+
the `+X` direction (yaw = 0) so it is immediately visible in the TurtleBot3's sensor FOV.
234+
235+
---
236+
237+
## Troubleshooting
238+
239+
| Symptom | Likely Cause | Fix |
240+
|---------|-------------|-----|
241+
| TurtleBot3 goes straight, no turning | `tracking_radius` too small | Set `tracking_radius: 1.0` in YAML |
242+
| TurtleBot3 does not move at all | Guide robot facing away | Verify `spawn_gbot.launch.py` uses `-Y 0.0` |
243+
| Target lost immediately (RS) | `z_filter` too high | Set `z_filter: -0.15` in `adbscan_sub_RS.yaml` |
244+
| Gesture node not starting | Python venv not active | Run `source ~/followme_env/bin/activate` first |
245+
| Audio commands not reaching ADBSCAN | Speech node overloaded | Ensure `speech_recognition_pkg` is rebuilt; the node skips empty filenames and holds valid commands for 3 s |
246+
| TTS node fails to start | Missing audio packages | Install audio requirements: `pip3 install librosa openvino simpleaudio sounddevice tqdm inflect` |
247+
| Gazebo fails to start | Stale `gz` process | Run `sudo killall -9 gz ruby` before launching |

0 commit comments

Comments
 (0)