This project supports running a complete self-adaptive system for handling LiDAR occulusion anomolies for a Turtlebot4. This includes a self-adaptive MAPLE-K loop implemented using the RoboSapiens Adaptive Platform, Gazebo simulation of the TurtleBot 4.
The repository provides a devcontainer providing all of the services required to run the system. Opening one of the devcontainers launches the entire project along with all its dependencies (ROS, MQTT, etc.).
This repository has been developed and tested primarily on Linux. It depends on Docker to run the images, x11 to display graphical applications, and Visual Studio Code to launch the devcontainers.
You must have Nvidia container toolkit installed to use this option.
In order for the container to launch graphical applications, you grant x11 authentication permissions using the following command:
xhost +This must be run after every reboot before launching the containers.
-
Open the Full DevContainer: You can open the Visual Studio Code devcontainer for the project in order to run the necessary services, and use the development environment for the adaptive loop. To do this, first open the folder for the repository in Visual Studio Code. It should prompt you to "Reopen in Container" or alternatively, you can open the dev container by pressing Ctrl+Shift+P and selecting "Rebuild and Reopen in Container". You should select one of the full devcontainer configurations which matches your hardware (e.g.,
.devcontainer/nvidia-full-tb3/devcontainer.jsonor.devcontainer/mesa-full-tb3/devcontainer.json) in Visual Studio Code (see Devcontainer Variants). -
Services in the Container:
The devcontainer setup automatically starts all the necessary services for:- Simulation (Gazebo)
- ROS integration
- MQTT communication
But you will need to launch the self-adaptive loop and trustworthiness checker yourself (see below).
To launch the self-adaptive loop:
cd maple-loops/HelloWorld
python3 main.pyThis will log its progress in maple-loops/HelloWorld/MAPE_test.log.
You can also launch a live dashboard showing the current loop stage and LiDAR mask using:
cd maple-loops/HelloWorld
python3 LiveDashboard.pyThe Trustworthiness Checker is available as a separate Docker Compose service. You can run it independently in a host terminal by running e.g.
cd docker/
docker compose run --rm trustworthiness-checker /mnt/host_models/maple_seq.lola --input-mqtt-topics stage --output-stdoutThis example runs the trustworthiness checker on the model trustworthiness-specs/maple_seq.lola from the input MQTT topic stage (provided by the self-adaptive loop) and outputs verdicts to STDOUT.
You can also change this to output to MQTT topics via the command:
cd docker/
docker compose run --rm trustworthiness-checker /mnt/host_models/maple_seq.lola --input-mqtt-topics stage --output-mqtt-topics m a p l e mapleThis repository includes several devcontainer variants to support different hardware and simulation configurations:
Provides a full development environment for running the TurtleBot 4 simulation using Gazebo on systems with NVIDIA GPUs. It automatically builds and starts all necessary services and installs the required dependencies after container start-up.
Tailored for running TB3 (TurtleBot 3) simulations with NVIDIA GPU support. Features similar configurations as the TB4 variant but adapted for TB3 simulation parameters.
Designed for systems without NVIDIA GPUs. This variant uses the MESA graphics stack to enable full Gazebo simulation for TurtleBot 4. It still provides all the integrated services to run the adaptive platform.
Tailored for running TB3 (TurtleBot 3) simulations with MESA graphics. Features similar configurations as the TB4 variant but adapted for TB3 simulation parameters.
Provides a complete Gazebo simulation environment for TurtleBot 4 for machines without GPU acceleration. It ensures that users without any graphics hardware can still run the full self-adaptive system, but may be painfully slow.
Tailored for running TB3 (TurtleBot 3) simulations with no GPU acceleration. Features similar configurations as the TB4 variant but adapted for TB3 simulation parameters.
These variants just run the main devcontainer without any dependencies. They are useful when separately developing new versions of these dependencies, or for running Gazebo locally.
It is also possible to run the project without Visual Studio code by using the commandline devcontainers tool. You can install this tool using
npm install -g @devcontainers/cliThen you can launch the devcontainer using e.g.
devcontainer up --workspace-folder $(pwd) --config .devcontainer/mesa-full-tb3/devcontainer.jsonand open a shell in the devcontainer using
devcontainer exec --workspace-folder $(pwd) --config .devcontainer/mesa-full-tb3/devcontainer.json /bin/bash