-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve tutorials #21
Conversation
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
docs/source/howto.rst
Outdated
</state> | ||
</scxml> | ||
|
||
In this example, the SCXML model consists of three states, `s0`, `s1`, and `s2`, and three transitions, `e1`, `e2` and `e3`, that transition each state to the next one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this example, the SCXML model consists of three states, `s0`, `s1`, and `s2`, and three transitions, `e1`, `e2` and `e3`, that transition each state to the next one. | |
In this example, the SCXML model consists of three states, `s0`, `s1`, and `s2`, and three transitions, these transitions are triggered by the event `e1`, `e2` and `e3` respectively. |
docs/source/howto.rst
Outdated
|
||
The events are expected to be sent by another scxml model, similarly to how it is done in the `s2` state. | ||
|
||
In order to make it more appealing to robotics developers, we have extended the default SCXML language with some ROS and BT specific features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to make it more appealing to robotics developers, we have extended the default SCXML language with some ROS and BT specific features. | |
In order to fit the techstack of typical robotics developers, we have extended the default SCXML language to support ROS specific features and behavior trees. |
docs/source/howto.rst
Outdated
|
||
In AS2FM, we extended the SCXML language with some additional functionalities, to support the following ROS specific features: | ||
|
||
* :ref:`ROS Timers <ros_timers>`: to schedule events at a specific rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* :ref:`ROS Timers <ros_timers>`: to schedule events at a specific rate | |
* :ref:`ROS Timers <ros_timers>`: to trigger transitions at a specific rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, this would be fine. But since events are a concept in SCXML already, this could be misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but transitions are an SCXML concept, too! Will rework it a little
docs/source/howto.rst
Outdated
* :ref:`ROS Services <ros_services>`: to call a ROS service and implement service servers | ||
* :ref:`ROS Actions <ros_actions>`: to call a ROS action and implement action servers (under development) | ||
|
||
All functionalities require the interface to be declared before being used, similarly to variables in the SCXML datamodel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All functionalities require the interface to be declared before being used, similarly to variables in the SCXML datamodel. | |
All functionalities require the interface to be declared before being used, similarly to variables in the SCXML datamodel. | |
And similar to how ROS requires these interfaces to be declared in a node. |
docs/source/howto.rst
Outdated
ROS Timers | ||
___________ | ||
|
||
ROS Timers are used to schedule events at a specific rate. They can be declared as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ROS Timers are used to schedule events at a specific rate. They can be declared as follows: | |
ROS Timers are used to trigger transitions at a specific rate. They can be declared as follows: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are called Drainer ..
docs/source/tutorials.rst
Outdated
* a **battery_drainer**, that at each time step drains the battery by 1%, and each time the charge trigger is received, it recharges the battery to 100%. | ||
* a **battery_manager**, that at each time the battery level is received checks if it is below 30% and, if so, triggers the alarm. | ||
|
||
The **behavior tree** continuously checks the alarm topic and, once it is triggered, sends a charge trigger to the battery_drainer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* a **battery_drainer**, that at each time step drains the battery by 1%, and each time the charge trigger is received, it recharges the battery to 100%. | |
* a **battery_manager**, that at each time the battery level is received checks if it is below 30% and, if so, triggers the alarm. | |
The **behavior tree** continuously checks the alarm topic and, once it is triggered, sends a charge trigger to the battery_drainer. | |
* a **Battery Drainer**, that at each time step drains the battery by 1%, and each time the charge trigger is received, it recharges the battery to 100%. | |
* a **Battery Manager**, that at each time the battery level is received checks if it is below 30% and, if so, triggers the alarm. | |
The **Behavior Tree** continuously checks the alarm topic and, once it is triggered, sends a charge trigger to the battery_drainer. |
docs/source/tutorials.rst
Outdated
|
||
The JANI property given in `battery_depleted.jani <https://github.com/convince-project/as2fm/tree/main/jani_generator/test/_test_data/ros_example/battery_depleted.jani>`_ defines the property of interest to be model checked. In this case, it calculates the minimal probability that the battery level is below or equal to zero eventually, i.e., all we verify here is that the battery is empty at some point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we also provide a bt, it would make more sense to use the version where the battery is also charged and verify that it never runs out. I think this would make a bit more sense. Otherwise, people could get hung up on the point that the bt is useless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but we do not have that property implemented yet. We only have the emtpy, belowe 20% and alarm on.
I can implement one more property for the battery to get charged after a minimum amount of time
docs/source/tutorials.rst
Outdated
.. code-block:: bash | ||
|
||
scxml_to_jani path_to_main.xml | ||
In the `main.xml file <https://github.com/convince-project/as2fm/tree/main/jani_generator/test/_test_data/ros_example/main.xml>`_ introduced earlier, the maximum run time of the system is specified with ``max_time`` and shared across the components. To make sure that the model checked property makes sense, the allowed runtime needs to be high enough to have enough time to deplete the battery, i.e., in this example the maximal time needs to be at least 100s because the battery is depleted by 1% per second. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is maybe an aspect that goes a little too deep for a first tutorial. I mean we probably need a how-to for properties at some point anyway. Maybe we can mention this there? But just an idea. We can also keep it here for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can keep it as is, and point to some other reference in the how to for further info?
|
||
.. _jani_conversion: | ||
|
||
How to convert from CONVINCE robotic JANI to plain JANI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah .. maybe we can add a note that this is not really needed right now and completely independent of the ROS stuff
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]>
Signed-off-by: Marco Lampacrescia <[email protected]> Signed-off-by: Christian Henkel <[email protected]>
No description provided.