|
Python YASMIN (Yet Another State MachINe)
|
YASMIN is a project focused on implementing robot behaviors using Finite State Machines (FSM). It is available for ROS 2, Python and C++.
To install YASMIN and its packages, use the following command:
Follow these steps to build the source code from this repository:
Then, you can run the tests as follow:
If your operating system doesn't support ROS 2, docker is a great alternative. You can use an image from Dockerhub or create your own images. First of all, to build the image you have to use the following command:
To use a shortcut the docker build, you may use the following command:
After the image is created, run a docker container with the following command:
To use a shortcut the docker run, you may use following command:
There are some examples, for both Python and C++, that can be found in yasmin_demos.
Note: When mixing Python and C++ states in the same state machine, they can communicate through the blackboard, but only with primitive data types:
int,float,bool, andstring. Complex objects or ROS messages cannot be directly shared between Python and C++ states.
Note: When mixing Python and C++ states in the same state machine, they can communicate through the blackboard, but only with primitive data types:
int,float,bool, andstring. Complex objects or ROS messages cannot be directly shared between Python and C++ states.
The YASMIN Editor is a graphical user interface application for building YASMIN state machines using state plugins. It enables intuitive creation of state machines through drag-and-drop functionality, allowing you to:
State machines can be exported and saved in XML format for reuse and sharing.

The YASMIN Viewer provides a convenient way to monitor YASMIN's Finite State Machines (FSM). It is built using Flask and ReactJS and includes a filter to focus on a single FSM at a time.

Once started, open http://localhost:5000/ in your browser to view your state machines.
You can specify a custom host and port by using the following command:
After running the command, access your state machines at http://127.0.0.1:5032/.