A meta-controller implementation for ROS2
This branch is highly experimental and unstable
mros_reasoner
, for example: mkdir -p ~/mros_reasoner_ws/src
cd mros_reasoner_ws
mc_mros_reasoner
into the reasoner workspace (ie: mros_reasoner_ws
).humble
cd ~/mros_reasoner_ws/src
git clone --branch humble https://github.com/meta-control/mc_mros_reasoner.git
Install deps:
cd ~/mros_reasoner_ws/
vcs import src < src/mc_mros_reasoner/mros2_reasoner.rosinstall
rosdep install --from-paths src --ignore-src -r -y
mros_reasoner_ws
cd ~/mros_reasoner_ws/src
source /opt/ros/humble/setup.bash
colcon build --symlink-install
~/mros_reasoner_ws/
)Disclaimer: The example might not work for all ros2 versions supported by MROS. Check the example page to find out which versions are supported.
Make sure to rebuild the workspace after you get the example code.
cd ~/mros_reasoner_ws/src
source /opt/ros/hubmle/setup.bash
colcon build --symlink-install
Launch turtlebot3 world in gazebo sim
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:[ros2_ws]/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models
export TURTLEBOT3_MODEL=${TB3_MODEL}
ros2 launch pilot_urjc_bringup tb3_sim_launch.py
Turtlebot3 Navigation launcher
This launcher includes rviz, nav2, amcl, map-server, system-modes, etc.
The system_modes mode_manager takes the modes description from params/pilot_modes.yaml
.
export TURTLEBOT3_MODEL=${TB3_MODEL}
ros2 launch pilot_urjc_bringup nav2_turtlebot3_launch.py
Launch the mros2 metacontroller
This step launches the mros2_metacontroller
, it launches by default the kb.owl
ontology and connects to the
system_modes created by the pilot_urjc
fd
names of the kb.owl
ontology. ros2 launch mros2_reasoner launch_reasoner.launch.py
By default it sets the f3_v3_r1
mode which corresponds to the NORMAL mode.
With all the above, we will have enough to test some navigation actions and experiment changing the current mode and seeing how this change affects the navigation.
To get a reconfiguration, we need to Publish some fake qa_values. This node sends a DiagnosticArray
message, with increasing energy value.
ros2 run mros2_reasoner mros2_publish_qa_node