This repository contains ROSA, a knowledge-based framework for robotics self-adaptation. ROSA is implemented as a ROS 2-based system, with its knowledge base implemented with TypeDB.
This is still a work in progress, therefore the repository is unstable.
This package was tested with ROS 2 Humble and TypeDB 2.27.0
Install TypeDB:
sudo apt install software-properties-common apt-transport-https gpg
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 8F3DA4B5E9AEF44C
gpg --export 8F3DA4B5E9AEF44C | sudo tee /etc/apt/trusted.gpg.d/vaticle.gpg > /dev/null
echo "deb https://repo.vaticle.com/repository/apt/ trusty main" | sudo tee /etc/apt/sources.list.d/vaticle.list > /dev/null
sudo apt update
sudo apt install openjdk-11-jre
sudo apt install typedb-server=2.24.17 typedb-console=2.24.15 typedb-bin=2.24.16
pip3 install typedb-driver==2.24.15
Download ROSA:
mkdir -p ~/rosa_ws/src
cd ~/rosa_ws/src
git clone git@github.com:kas-lab/rosa.git
vcs import . < rosa/rosa.rosinstall
Install dependencies:
cd ~/rosa_ws/
source /opt/ros/humble/setup.bash
rosdep install --from-paths src --ignore-src -r -y
Build ROSA:
cd ~/rosa_ws/
source /opt/ros/humble/setup.bash
colcon build --symlink-install
Start typedb:
typedb server
Run ROSA:
ros2 launch rosa_bringup rosa_bringup.launch.py
An example of how to use ROSA can be found in the suave_rosa repo, where ROSA was applied to the SUAVE examplar.
To use ROSA to solve self-adaptation in a ROS 2-based robotic system, the following steps must be followed:
Step 1) Model the use case conforming to ROSA's knowledge model: Model and implement the use case with TypeDB conforming to ROSA's knowledge model, capturing the robot's architecture, possible adaptations, the reasons to perform adaptation, and how to select adaptations. Check suave.tql for an example.
Step 2) Model use case mission: Model and implement how the robot's mission is accomplished as a BT, reusing RosaAction action node. Check SearchPipeline for an example.
Step 3) Implement monitor nodes: Implement the monitor nodes required for the specific application. Check WaterVisibilityObserver
Step 4) Setup ROS launch files: Configure ROS launch files to start ROSA with the knowledge model files (from Step 1), the BT node (from Step 2), and the monitor nodes (from Step 3). Check suave_rosa.launch.py
Start typedb:
typedb server
colcon test --event-handlers console_cohesion+ --packages-select rosa_kb rosa_plan rosa_execute
This work is part of the Reliable AI for Marine Robotics (REMARO) Project. For more info, please visit: https://remaro.eu/
This project has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 956200.