You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1668,6 +1668,8 @@ if __name__ == "__main__":
1668
1668
<details>
1669
1669
<summary>Click to expand</summary>
1670
1670
1671
+
> **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`, and `string`. Complex objects or ROS messages cannot be directly shared between Python and C++ states.
1672
+
1671
1673
```shell
1672
1674
ros2 run yasmin_demos factory_demo.py
1673
1675
```
@@ -3307,6 +3309,8 @@ int main(int argc, char *argv[]) {
3307
3309
<details>
3308
3310
<summary>Click to expand</summary>
3309
3311
3312
+
> **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`, and `string`. Complex objects or ROS messages cannot be directly shared between Python and C++ states.
3313
+
3310
3314
```shell
3311
3315
ros2 run yasmin_demos factory_demo
3312
3316
```
@@ -3449,4 +3453,4 @@ isbn="978-3-031-21062-4"
3449
3453
year = {2022},
3450
3454
copyright = {Creative Commons Attribution Non Commercial No Derivatives 4.0 International}
<p>If you use YASMIN in your research, please cite the following works:</p>
88
+
89
+
<h2>Conference Paper</h2>
90
+
<p><strong>González-Santamarta, M. Á., Rodríguez-Lera, F. J., Matellán-Olivera, V., & Fernández-Llamas, C. (2023). YASMIN: Yet Another State MachINe. In ROBOT2022: Fifth Iberian Robotics Conference (pp. 528-539). Springer International Publishing.</strong></p>
abstract="State machines are a common mechanism for defining behaviors in robots where each behavior is based on identifiable stages. There are several libraries available for easing the implementation of state machines in ROS 1, however, the community was focused on SMACH or SMACC. Although these tools are still predominant, there are fewer alternatives for ROS 2. Besides, Behavior Trees are spreading fast, but there is a niche for using State Machines. Here, YASMIN is presented as yet another library specifically designed for ROS 2 for easing the design of robotic behaviors using state machines. It is available in C++ and Python, and provides some default states to speed up the development, in addition to a web viewer for monitoring the execution of the system and helping in the debugging.",
109
+
isbn="978-3-031-21062-4"
110
+
}</div>
111
+
112
+
<h2>arXiv Preprint</h2>
113
+
<p><strong>González-Santamarta, M. Á., Rodríguez-Lera, F. J., Llamas, C. F., Rico, F. M., & Olivera, V. M. (2022). YASMIN: Yet Another State MachINe library for ROS 2. arXiv preprint arXiv:2205.13284.</strong></p>
114
+
115
+
<divclass="citation-box">@misc{yasmin,
116
+
doi = {10.48550/ARXIV.2205.13284},
117
+
url = {https://arxiv.org/abs/2205.13284},
118
+
author = {González-Santamarta, Miguel Ángel and Rodríguez-Lera, Francisco Javier and Llamas, Camino Fernández and Rico, Francisco Martín and Olivera, Vicente Matellán},
119
+
keywords = {Robotics (cs.RO), FOS: Computer and information sciences, FOS: Computer and information sciences},
120
+
title = {YASMIN: Yet Another State MachINe library for ROS 2},
121
+
publisher = {arXiv},
122
+
year = {2022},
123
+
copyright = {Creative Commons Attribution Non Commercial No Derivatives 4.0 International}
<p>If your operating system doesn't support ROS 2, Docker is a great alternative. You can use pre-built images from <ahref="https://hub.docker.com/r/mgons/yasmin/" target="_blank">DockerHub</a> or create your own custom images.</p>
88
+
89
+
<h2>Building the Docker Image</h2>
90
+
<p>To build the YASMIN Docker image from source, navigate to the YASMIN project directory and run the following command. This process will download the base ROS 2 image, install all YASMIN dependencies, and compile the packages. The build typically takes 5-10 minutes depending on your system:</p>
<p><strong>Note:</strong> The Dockerfile uses multi-stage builds to optimize the final image size. Ensure you have at least 10GB of free disk space for the build process.</p>
97
+
98
+
<h2>Running the Docker Container</h2>
99
+
<p>After building the image, start a Docker container with full GUI support and network access. The command below configures X11 forwarding for graphical applications like the YASMIN Viewer and Editor, enables host networking for ROS 2 communication, and provides necessary permissions:</p>
100
+
<pre><codeclass="language-bash">docker run -it --net=host --ipc=host --privileged \
101
+
--env="DISPLAY" \
102
+
--env="QT_X11_NO_MITSHM=1" \
103
+
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
104
+
--volume="${XAUTHORITY}:/root/.Xauthority" \
105
+
--entrypoint /bin/bash yasmin</code></pre>
106
+
107
+
<p>Or use the Makefile shortcut for a simpler command:</p>
<li><code>--ipc=host</code>: Allows shared memory communication for better performance</li>
114
+
<li><code>--privileged</code>: Grants extended privileges (required for some hardware access)</li>
115
+
<li><code>DISPLAY</code> and X11 volumes: Enable GUI applications to display on your host</li>
116
+
</ul>
117
+
118
+
<h2>Available Docker Images</h2>
119
+
<p>Pre-built images are available for multiple ROS 2 distributions on <ahref="https://hub.docker.com/r/mgons/yasmin/" target="_blank">DockerHub</a>. These images include all YASMIN packages pre-compiled and ready to use, saving you build time:</p>
120
+
<ul>
121
+
<li><ahref="https://hub.docker.com/r/mgons/yasmin/tags?name=foxy" target="_blank">Foxy</a> - ROS 2 LTS (Long Term Support)</li>
122
+
<li><ahref="https://hub.docker.com/r/mgons/yasmin/tags?name=galactic" target="_blank">Galactic</a> - Standard release</li>
123
+
<li><ahref="https://hub.docker.com/r/mgons/yasmin/tags?name=humble" target="_blank">Humble</a> - ROS 2 LTS (Recommended for production)</li>
124
+
<li><ahref="https://hub.docker.com/r/mgons/yasmin/tags?name=iron" target="_blank">Iron</a> - Standard release</li>
<li><ahref="https://hub.docker.com/r/mgons/yasmin/tags?name=kilted" target="_blank">Kilted</a> - Standard release</li>
127
+
<li><ahref="https://hub.docker.com/r/mgons/yasmin/tags?name=rolling" target="_blank">Rolling</a> - Latest development version (unstable)</li>
128
+
</ul>
129
+
130
+
<h2>Using Pre-built Images</h2>
131
+
<p>Skip the build process entirely by using pre-built images. Simply pull the image for your desired ROS 2 distribution and run it. This is the fastest way to get started with YASMIN:</p>
docker run -it --net=host mgons/yasmin:humble</code></pre>
134
+
135
+
<p><strong>Tip:</strong> Replace <code>humble</code> with any supported ROS 2 distribution tag (foxy, galactic, iron, jazzy, kilted, or rolling) to use a different version.</p>
136
+
137
+
<h2>Notes</h2>
138
+
<ul>
139
+
<li>The <code>--net=host</code> flag allows the container to use the host's network stack.</li>
140
+
<li>Display forwarding is configured with <code>DISPLAY</code> and X11 volume mounts for GUI applications.</li>
141
+
<li>The <code>--privileged</code> flag gives extended privileges to the container (use with caution).</li>
0 commit comments