Skip to content

Commit

Permalink
deploy: ebed41a
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzs13 committed Dec 26, 2024
1 parent a9c6edd commit 2994261
Show file tree
Hide file tree
Showing 44 changed files with 363 additions and 313 deletions.
3 changes: 3 additions & 0 deletions yasmin_cpp/html/doxygen_crawl.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@
<a href="index.html#autotoc_md19"/>
<a href="index.html#autotoc_md2"/>
<a href="index.html#autotoc_md20"/>
<a href="index.html#autotoc_md21"/>
<a href="index.html#autotoc_md22"/>
<a href="index.html#autotoc_md23"/>
<a href="index.html#autotoc_md3"/>
<a href="index.html#autotoc_md4"/>
<a href="index.html#autotoc_md5"/>
Expand Down
97 changes: 53 additions & 44 deletions yasmin_cpp/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,35 +136,44 @@ <h1><a class="anchor" id="autotoc_md2"></a>
</ul>
<h1><a class="anchor" id="autotoc_md3"></a>
Installation</h1>
<div class="fragment"><div class="line">$ cd ~/ros2_ws/src</div>
<div class="line">$ git clone https://github.com/uleroboticsgroup/yasmin.git</div>
<div class="line">$ cd ~/ros2_ws</div>
<div class="line">$ rosdep install --from-paths src --ignore-src -r -y</div>
<div class="line">$ cd ~/ros2_ws</div>
<div class="line">$ colcon build</div>
</div><!-- fragment --><p>If you are using a deprecated ROS 2 distro (like Foxy or Galactic) or the Rolling distro, you may need to install the example interfaces:</p>
<div class="fragment"><div class="line">$ sudo apt install -y ros-$ROS_DISTRO-example-interfaces</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md4"></a>
<h2><a class="anchor" id="autotoc_md4"></a>
Debian Packages</h2>
<p>To install YASMIN and its packages, use the following command:</p>
<div class="fragment"><div class="line">sudo apt install ros-$ROS_DISTRO-yasmin ros-$ROS_DISTRO-yasmin-*</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md5"></a>
Building from Source</h2>
<p>Follow these steps to build the source code from this repository:</p>
<div class="fragment"><div class="line">cd ~/ros2_ws/src</div>
<div class="line">git clone https://github.com/uleroboticsgroup/yasmin.git</div>
<div class="line">cd ~/ros2_ws</div>
<div class="line">rosdep install --from-paths src --ignore-src -r -y</div>
<div class="line">cd ~/ros2_ws</div>
<div class="line">colcon build</div>
</div><!-- fragment --><h3><a class="anchor" id="autotoc_md6"></a>
Note for Deprecated or Rolling ROS 2 Distros</h3>
<p>If you are using a deprecated ROS 2 distribution (e.g., Foxy or Galactic) or the Rolling distribution, install the example interfaces:</p>
<div class="fragment"><div class="line">sudo apt install -y ros-$ROS_DISTRO-example-interfaces</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md7"></a>
Docker</h1>
<p>If your operating system doesn't support ROS 2, docker is a great alternative. You can use an image from <a href="https://hub.docker.com/r/mgons/yasmin/">Dockerhub</a> or create your own images. First of all, to build the image you have to use the following command:</p>
<div class="fragment"><div class="line">## Assuming you are in the YASMIN project directory</div>
<div class="line">$ docker build -t yasmin .</div>
<div class="line">docker build -t yasmin .</div>
</div><!-- fragment --><p>To use a shortcut the docker build, you may use the following command:</p>
<div class="fragment"><div class="line">## Assuming you are in the YASMIN project directory</div>
<div class="line">$ make docker_build</div>
<div class="line">make docker_build</div>
</div><!-- fragment --><p>After the image is created, run a docker container with the following command:</p>
<div class="fragment"><div class="line">$ docker run -it --net=host --ipc=host --privileged --env=&quot;DISPLAY&quot; --env=&quot;QT_X11_NO_MITSHM=1&quot; --volume=&quot;/tmp/.X11-unix:/tmp/.X11-unix:rw&quot; --volume=&quot;${XAUTHORITY}:/root/.Xauthority&quot; --entrypoint /bin/bash yasmin</div>
<div class="fragment"><div class="line">docker run -it --net=host --ipc=host --privileged --env=&quot;DISPLAY&quot; --env=&quot;QT_X11_NO_MITSHM=1&quot; --volume=&quot;/tmp/.X11-unix:/tmp/.X11-unix:rw&quot; --volume=&quot;${XAUTHORITY}:/root/.Xauthority&quot; --entrypoint /bin/bash yasmin</div>
</div><!-- fragment --><p>To use a shortcut the docker run, you may use following command:</p>
<div class="fragment"><div class="line">## Assuming you are in the YASMIN project directory</div>
<div class="line">$ make docker_run</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md5"></a>
<div class="line">make docker_run</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md8"></a>
Demos</h1>
<p>There are some examples, for both Python and C++, that can be found in <a href="./yasmin_demos/">yasmin_demos</a>.</p>
<h2><a class="anchor" id="autotoc_md6"></a>
<h2><a class="anchor" id="autotoc_md9"></a>
Python</h2>
<h3><a class="anchor" id="autotoc_md7"></a>
<h3><a class="anchor" id="autotoc_md10"></a>
Vanilla Demo (FSM)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos yasmin_demo.py</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos yasmin_demo.py</div>
</div><!-- fragment --><p><img src="./docs/demo.gif" alt="" width="65%" class="inline"/> </p>
<details >
<summary >
Expand Down Expand Up @@ -323,10 +332,10 @@ <h3><a class="anchor" id="autotoc_md7"></a>
<div class="ttc" id="aclassyasmin_1_1State_html_a99401305d1648ff131344229e72cdf35"><div class="ttname"><a href="classyasmin_1_1State.html#a99401305d1648ff131344229e72cdf35">yasmin::State::State</a></div><div class="ttdeci">State(std::set&lt; std::string &gt; outcomes)</div><div class="ttdoc">Constructs a State with a set of possible outcomes.</div><div class="ttdef"><b>Definition</b> state.cpp:27</div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md8"></a>
<h3><a class="anchor" id="autotoc_md11"></a>
Service Demo (FSM + ROS 2 Service Client)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos add_two_ints_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">$ ros2 run yasmin_demos service_client_demo.py</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos add_two_ints_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">ros2 run yasmin_demos service_client_demo.py</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -509,10 +518,10 @@ <h3><a class="anchor" id="autotoc_md8"></a>
<div class="ttc" id="aservice__client__demo_8cpp_html_ad7658a89fcb000382a8345891e0dda91"><div class="ttname"><a href="service__client__demo_8cpp.html#ad7658a89fcb000382a8345891e0dda91">print_sum</a></div><div class="ttdeci">std::string print_sum(std::shared_ptr&lt; yasmin::blackboard::Blackboard &gt; blackboard)</div><div class="ttdoc">Prints the sum stored in the blackboard.</div><div class="ttdef"><b>Definition</b> service_client_demo.cpp:60</div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md9"></a>
<h3><a class="anchor" id="autotoc_md12"></a>
Action Demo (FSM + ROS 2 Action)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos fibonacci_action_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">$ ros2 run yasmin_demos action_client_demo.py</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos fibonacci_action_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">ros2 run yasmin_demos action_client_demo.py</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -717,9 +726,9 @@ <h3><a class="anchor" id="autotoc_md9"></a>
<div class="ttc" id="aclassyasmin__ros_1_1ActionState_html_aa7902878db3392a3e00613a68e23b4d0"><div class="ttname"><a href="classyasmin__ros_1_1ActionState.html#aa7902878db3392a3e00613a68e23b4d0">yasmin_ros::ActionState&lt; Fibonacci &gt;::ActionState</a></div><div class="ttdeci">ActionState(std::string action_name, CreateGoalHandler create_goal_handler, std::set&lt; std::string &gt; outcomes, int timeout=-1.0)</div><div class="ttdef"><b>Definition</b> action_state.hpp:88</div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md10"></a>
<h3><a class="anchor" id="autotoc_md13"></a>
Monitor Demo (FSM + ROS 2 Subscriber)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos monitor_demo.py</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos monitor_demo.py</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -862,9 +871,9 @@ <h3><a class="anchor" id="autotoc_md10"></a>
<div class="ttc" id="aclassyasmin__ros_1_1MonitorState_html_a8df77197e3a40a3a6229969e1a6da9a5"><div class="ttname"><a href="classyasmin__ros_1_1MonitorState.html#a8df77197e3a40a3a6229969e1a6da9a5">yasmin_ros::MonitorState&lt; nav_msgs::msg::Odometry &gt;::MonitorState</a></div><div class="ttdeci">MonitorState(std::string topic_name, std::set&lt; std::string &gt; outcomes, MonitorHandler monitor_handler, rclcpp::QoS qos, int msg_queue)</div><div class="ttdef"><b>Definition</b> monitor_state.hpp:63</div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md11"></a>
<h3><a class="anchor" id="autotoc_md14"></a>
Nav2 Demo (Hierarchical FSM + ROS 2 Action)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos nav_demo.py</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos nav_demo.py</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -1087,11 +1096,11 @@ <h3><a class="anchor" id="autotoc_md11"></a>
<div class="line"> <a class="code hl_function" href="action__client__demo_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a>()</div>
</div><!-- fragment --><p></p>
</details>
<h2><a class="anchor" id="autotoc_md12"></a>
<h2><a class="anchor" id="autotoc_md15"></a>
Cpp</h2>
<h3><a class="anchor" id="autotoc_md13"></a>
<h3><a class="anchor" id="autotoc_md16"></a>
Vanilla Demo</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos yasmin_demo</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos yasmin_demo</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -1210,10 +1219,10 @@ <h3><a class="anchor" id="autotoc_md13"></a>
<div class="ttc" id="ayasmin__viewer__pub_8hpp_html"><div class="ttname"><a href="yasmin__viewer__pub_8hpp.html">yasmin_viewer_pub.hpp</a></div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md14"></a>
<h3><a class="anchor" id="autotoc_md17"></a>
Service Demo (FSM + ROS 2 Service Client)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos add_two_ints_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">$ ros2 run yasmin_demos service_client_demo</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos add_two_ints_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">ros2 run yasmin_demos service_client_demo</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -1349,10 +1358,10 @@ <h3><a class="anchor" id="autotoc_md14"></a>
<div class="ttc" id="aservice__state_8hpp_html"><div class="ttname"><a href="service__state_8hpp.html">service_state.hpp</a></div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md15"></a>
<h3><a class="anchor" id="autotoc_md18"></a>
Action Demo (FSM + ROS 2 Action)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos fibonacci_action_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">$ ros2 run yasmin_demos action_client_demo</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos fibonacci_action_server</div>
</div><!-- fragment --><div class="fragment"><div class="line">ros2 run yasmin_demos action_client_demo</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -1500,9 +1509,9 @@ <h3><a class="anchor" id="autotoc_md15"></a>
<div class="ttc" id="ayasmin__node_8hpp_html"><div class="ttname"><a href="yasmin__node_8hpp.html">yasmin_node.hpp</a></div></div>
</div><!-- fragment --><p></p>
</details>
<h3><a class="anchor" id="autotoc_md16"></a>
<h3><a class="anchor" id="autotoc_md19"></a>
Monitor Demo (FSM + ROS 2 Subscriber)</h3>
<div class="fragment"><div class="line">$ ros2 run yasmin_demos monitor_demo</div>
<div class="fragment"><div class="line">ros2 run yasmin_demos monitor_demo</div>
</div><!-- fragment --><details >
<summary >
Click to expand</summary>
Expand Down Expand Up @@ -1619,20 +1628,20 @@ <h3><a class="anchor" id="autotoc_md16"></a>
</div><!-- fragment --><p></p>
</details>
<p><a class="anchor" id="#YASMIN-Viewer"></a></p>
<h1><a class="anchor" id="autotoc_md17"></a>
<h1><a class="anchor" id="autotoc_md20"></a>
YASMIN Viewer</h1>
<p>The <b>YASMIN Viewer</b> provides a convenient way to monitor <b>YASMIN</b>'s Finite State Machines (FSM). It is built using <b>Flask</b> and <b>ReactJS</b> and includes a filter to focus on a single FSM at a time.</p>
<p><img src="./docs/viewer.gif" alt="" class="inline"/></p>
<h2><a class="anchor" id="autotoc_md18"></a>
<h2><a class="anchor" id="autotoc_md21"></a>
Getting Started</h2>
<div class="fragment"><div class="line">$ ros2 run yasmin_viewer yasmin_viewer_node</div>
<div class="fragment"><div class="line">ros2 run yasmin_viewer yasmin_viewer_node</div>
</div><!-- fragment --><p>Once started, open <a href="http://localhost:5000/">http://localhost:5000/</a> in your browser to view your state machines.</p>
<h2><a class="anchor" id="autotoc_md19"></a>
<h2><a class="anchor" id="autotoc_md22"></a>
Custom host and port</h2>
<p>You can specify a custom host and port by using the following command:</p>
<div class="fragment"><div class="line">$ ros2 run yasmin_viewer yasmin_viewer_node --ros-args -p host:=127.0.0.1 -p port:=5032</div>
<div class="fragment"><div class="line">ros2 run yasmin_viewer yasmin_viewer_node --ros-args -p host:=127.0.0.1 -p port:=5032</div>
</div><!-- fragment --><p>After running the command, access your state machines at <a href="http://127.0.0.1:5032/">http://127.0.0.1:5032/</a>.</p>
<h1><a class="anchor" id="autotoc_md20"></a>
<h1><a class="anchor" id="autotoc_md23"></a>
Citations</h1>
<div class="fragment"><div class="line">@InProceedings{10.1007/978-3-031-21062-4_43,</div>
<div class="line">author=&quot;Gonz{\&#39;a}lez-Santamarta, Miguel {\&#39;A}.</div>
Expand Down
7 changes: 4 additions & 3 deletions yasmin_cpp/html/search/all_0.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var searchData=
[
['2_20action_0',['2 Action',['../index.html#autotoc_md9',1,'Action Demo (FSM + ROS 2 Action)'],['../index.html#autotoc_md15',1,'Action Demo (FSM + ROS 2 Action)'],['../index.html#autotoc_md11',1,'Nav2 Demo (Hierarchical FSM + ROS 2 Action)']]],
['2_20service_20client_1',['2 Service Client',['../index.html#autotoc_md8',1,'Service Demo (FSM + ROS 2 Service Client)'],['../index.html#autotoc_md14',1,'Service Demo (FSM + ROS 2 Service Client)']]],
['2_20subscriber_2',['2 Subscriber',['../index.html#autotoc_md10',1,'Monitor Demo (FSM + ROS 2 Subscriber)'],['../index.html#autotoc_md16',1,'Monitor Demo (FSM + ROS 2 Subscriber)']]]
['2_20action_0',['2 Action',['../index.html#autotoc_md12',1,'Action Demo (FSM + ROS 2 Action)'],['../index.html#autotoc_md18',1,'Action Demo (FSM + ROS 2 Action)'],['../index.html#autotoc_md14',1,'Nav2 Demo (Hierarchical FSM + ROS 2 Action)']]],
['2_20distros_1',['Note for Deprecated or Rolling ROS 2 Distros',['../index.html#autotoc_md6',1,'']]],
['2_20service_20client_2',['2 Service Client',['../index.html#autotoc_md11',1,'Service Demo (FSM + ROS 2 Service Client)'],['../index.html#autotoc_md17',1,'Service Demo (FSM + ROS 2 Service Client)']]],
['2_20subscriber_3',['2 Subscriber',['../index.html#autotoc_md13',1,'Monitor Demo (FSM + ROS 2 Subscriber)'],['../index.html#autotoc_md19',1,'Monitor Demo (FSM + ROS 2 Subscriber)']]]
];
16 changes: 8 additions & 8 deletions yasmin_cpp/html/search/all_1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2994261

Please sign in to comment.