Welcome to ROS MAPE-K Framework’s documentation!

ROS MAPE-K Framework is a simple framework that help developers build ROS applications based on the MAPE-K pattern.

How to install

  1. Install ROS. The full version is required.
  1. Set up a catkin workspace (see this tutorial). Make sure that the workspace path does not contains any special characters.
  1. Clone this repository into the src/ folder. It should look like /path/to/your/catkin_workspace/src/ros_mapek_framework.
  2. Activate your workspace.
cd /path/to/your/catkin_workspace
source devel/setup.bash
  1. Build.
catkin_make

Demo

The demo aims to emulate a sequence of light poles along a path. To save energy, the light poles are turned on in an alternate fashion (in this specific case one on and one off, but it is possible to change criterion). If, for some reasons, a light bulbs went out the system will be able to self-heal himself by adjusting the list of lights on to reduce at least the discomfort due to the breakage of the bulb.

Run the demo

  1. Activate your workspace.
cd /path/to/your/catkin_workspace
source devel/setup.bash
  1. Launch the demo using roslaunch.
roslaunch mapek_framework_demo demo.launch
  1. (Optional) Inspect nodes using rqt_graph and rosrun rqt_console rqt_console.
_images/rqt_graph_screenshot.png _images/rqt_console_screenshot.png

Docstrings

interaction.py

class mapek_framework.interaction.Interaction(name, data_class)[source]

Class that rappresents an interaction between instances of mape elements.

Parameters:
  • name (str) – Name of the interaction.
  • data_class – ROS message type associated with the interaction.

managed_system.py

class mapek_framework.managed_system.ManagedSystem[source]

Abstract class supposed to be extended to implement a particular managed system.

group.py

class mapek_framework.group.Group(node_name, **kwargs)[source]

Class that rappresents a group of mape elements.

Parameters:
  • node_name (str) – The desired ROS node name.
  • **kwargs – Custom parameters to use to initialize the ROS node.
elements = []

Elements that are part of the group.

knowledge = {}

A dictionary-like object that rappresents the group knowledge.

managed_system = None

The managed system that interacts with the group.

spin()[source]

Start the group.