![]() |
CloudTwin
ROS2 Humble
Digital twin for path and trajectory optimisation
|
This project is a proof-of-concept for a Digital Twin application applied to mobile robotics. The core idea is that budget robots with limited onboard processing power offload heavy computation (trajectory planning, dynamic obstacle avoidance, predictive navigation) to their digital twin running on a cloud server — in our case, the local computer.
The digital twin receives real-time data from the robot and the environment, computes the optimal path, and sends back motion commands. This creates a closed-loop feedback system (boucle de rétroaction) detailed in Documentation/pages/architecture.md.
Since we do not have a physical robot, Gazebo Classic 11 simulates the robot navigating a hospital environment. The simulation represents what would be a real robot connected via a 5G local network to the cloud.
For the full system architecture, feedback loop, and data flow diagrams, see Documentation/pages/architecture.md
For the AI intelligence layer (crowd avoidance, room commands, voice control), see Documentation/pages/ai_layer.md
For the Foxglove user interface (layout, panels, topic visualisation), see Documentation/pages/foxglove.md
For known issues and their solutions, see Documentation/pages/troubleshooting.md
The project is organised in the following ROS2 packages:
robot_simulation** : World files (.world), saved maps, and the obstacle spawner that injects dynamic human models into the simulation. In a real deployment, this package would be replaced by the physical robot and its sensors.digital_twin** : The core of the project. Cloud-side intelligence that the robot cannot run onboard. Contains Nav2 configuration, hospital map, launch files, and the AI intelligence layer (crowd monitor, room interpreter, speech node).bcr_bot** : The simulated robot. A differential drive robot with 2D lidar, camera, and IMU. Used in Gazebo Classic mode.| Component | Technology | Role |
|---|---|---|
| Framework | ROS2 Humble | Robotics middleware |
| Simulation | Gazebo Classic 11 | Robot and environment simulation |
| Robot | bcr_bot | Differential drive with lidar and camera |
| Navigation | Nav2 (DWB local planner) | Path planning and obstacle avoidance |
| Mapping | slam_toolbox | SLAM for map generation |
| Visualisation | Foxglove (web) | Real-time monitoring and user interface |
| Speech | faster-whisper | Local speech-to-text for voice commands |
| Perception | OpenCV | Crowd density computation |
Note: Gazebo Classic and Gazebo Harmonic (gz-tools2) cannot coexist. If Harmonic is installed, remove it first:
sudo apt remove gz-harmonic gz-tools2 ros-humble-ros-gzharmonic*
If bcr_bot is not already in src/:
Install ROS dependencies:
Xacro needs to be installed for this repo. Check the installation process depending on your system.
Build:
Add to ~/.bashrc if not already there:
Starts Gazebo with the hospital world, bcr_bot, Nav2 navigation, obstacle spawner, cmd_vel relay, initial pose publisher, and Foxglove bridge:
Wait approximately 30 seconds for everything to initialise.
Starts the crowd monitor (dynamic map overlay), room interpreter (text commands), and speech node (voice commands):
ws://<ip>:8765 (use localhost if on the same machine, or the digital twin's IP if remote).foxe file) for voice/text destination commandsYou can also send a goal from the terminal:
The hospital map was generated using slam_toolbox. To recreate it or create a map for a different world:
odom, add /map and /bcr_bot/scan topics.| Version | Details |
|---|---|
| V0.1.0 | Repo initialisation with Doxygen configuration |
| V0.1.1 | Tested Doxygen |
| V1.0.1 | Created test Gazebo world and launch script |
| V1.1.0 | Started building the robot_simulation package |
| V2.1.1 | Created kick_off package for centralised launch |
| V2.1.2 | Renamed kick_off to launch_project |
| V2.2.1 | Created the digital_twin package |
| V2.3.0 | Updated setup.py for the digital_twin package |
| V2.3.1 | Created the visualisation package |
| V2.3.2 | Modified Gazebo world for sun/lighting. Updated launch file for Gazebo server |
| V2.3.3 | Created map using SLAM toolbox |
| V3.0.0 | Migration to Gazebo Harmonic + bcr_bot + small_warehouse. Nav2 integration. Foxglove bridge. Removed launch_project |
| V3.1.0 | Removed AMCL startup, increased acceleration and speed |
| V3.2.0 | Custom warehouse for better navigation, applied planning |
| V4.0.0 | Changed to Gazebo Classic from Gazebo Harmonic, hospital world with bcr_bot |
| V4.0.1 | Added goal_pose relay for Foxglove timestamp fix |
| V4.1.0 | Added bcr_bot to project tree, first version of people spawner |
| V4.1.1 | Updated human spawner logic, fixed non-moving cylinders |
| V4.1.2 | Changed cylinder SDF to Scrub person model |
| V4.1.3 | Updated Nav2 params for narrow doors |
| V4.1.4 | Added /people_positions publisher to obstacle spawner |
| V5.0.0 | YAML registry files for intersections and rooms |
| V6.0.1 | Smart automatic re-navigation based on crowd affluence data |
| V6.0.2 | Foxglove layout V1 saved |
| V6.1.0 | Custom Foxglove panel for voice/text room commands |
| V6.1.1 | Released version 1.0.0 of Foxglove panel |
| V6.2.1 | hospital.launch.py updated to include obstacle_spawner |
| V6.2.2 | Speech node for voice commands, integrated into logic.launch.py and Foxglove panel |