-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add CI Testing Section #87
Open
gramss
wants to merge
16
commits into
ros-navigation:master
Choose a base branch
from
gramss:CI-testing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
26b334f
small fix in rst highlighting
gramss aad3d13
fix the readme and build instructions to just use CI settings
gramss 17dd8e8
add CI Testing section to nav2-documentation incl. rewritting yaml parms
gramss ef3e83f
tried to improve all the points mentioned above
gramss e6b3615
add groot monitoring parameters to documentation
gramss 1f3081a
add linter section
gramss 97fe1c9
adding section about writing pytest test
gramss 7a22c28
misc - adding a few lines for clarification
gramss 01782d1
renaming files
gramss 7ee19cc
removing code_coverage_bump
gramss 9126c1b
add groot intro for BT editing and monitoring
gramss de7d27c
rename file
gramss 5b91f7a
add cleaned/generalized version of #88 - local code-cov tests
gramss 985cb1f
Update Groot to include the merged PR
gramss 1f028de
gtest + code coverage from #88
gramss fd7fd38
add Groot to foxy migration guide
gramss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
.. _groot_introduction: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Groot tutorial and deleted the CI testing tutorial? I'm confused, this is the CI testing section PR. |
||
|
||
Groot - The fancy BehaviorTree Editor | ||
************************************* | ||
- `Overview`_ | ||
- `Edit Custom Behavior Trees`_ | ||
- `Live Monitoring Behavior Trees`_ | ||
|
||
Overview | ||
======== | ||
|
||
.. image:: images/Groot/groot_start_menu.png | ||
|
||
`Groot <https://github.com/BehaviorTree/Groot>`_ is the companion application of | ||
`BehaviorTree.CPP <https://github.com/BehaviorTree/BehaviorTree.CPP>`_ to create, edit, and monitor behavior trees. | ||
With Groot one can visualize, edit and create new behavior trees. Also, complete new custom nodes except control flow nodes can be created using Groot. | ||
`Recently added <https://github.com/ros-planning/navigation2/pull/1958>`_ to the ROS2 and nav2 implementation of BT.cpp V3 is live monitoring of the current status of the behavior tree. | ||
|
||
Edit Custom Behavior Trees | ||
========================== | ||
|
||
.. .. image:: images/Groot/codecov.io_show_covered_code.png | ||
:width: 80% | ||
|
||
A few steps are necessary to view and edit existing behavior trees: | ||
|
||
1. Open Groot in editor mode | ||
2. Select the `Load palette from file` option (import button) near the top left corner. | ||
|
||
|
||
.. image:: images/Groot/groot_bt_editor.png | ||
:width: 49% | ||
|
||
.. image:: images/Groot/groot_with_nav2_custom_nodes.png | ||
:width: 49% | ||
|
||
3. Open the file `/path/to/navigation2/nav2_behavior_tree/nav2_tree_nodes.xml` to import all the behavior tree nodes used for navigation. | ||
4. Select `Load tree` option near the top left corner | ||
5. Browse the tree you want to visualize the select ok. | ||
|
||
.. image:: images/Groot/bt_w_replanning_and_recovery.png | ||
|
||
.. note:: | ||
If a tree cannot be visualized because some nodes are missing in the pallet, you might need to visit :ref:`plugins` and search for the plugin that is missing. | ||
If you got all the optional blackboard fields from the code of the plugin, you are free to go to add the description to ``/path/to/navigation2/nav2_behavior_tree/nav2_tree_nodes.xml``. | ||
Now you can reload the pallet from this updated file and should be able to work with the tree. | ||
|
||
Monitoring mode is unaffected from this, as the whole factory with sufficient meta data gets transferred upon connection. | ||
This is a known issue to reduce the overhead of creating additional xml-node-description files, when the data is also available in the shared object. | ||
Feel free to support adding this feature to the open source project Groot. The `feature request <https://github.com/BehaviorTree/Groot/issues/10>`_ already exists for this. | ||
|
||
Also, the Groot editor allows for creating new custom nodes via its graphical user interface. This also works with nav2 except custom control nodes. | ||
|
||
Live Monitoring Behavior Trees | ||
============================== | ||
|
||
.. raw:: html | ||
|
||
<a href="https://gifyu.com/image/cFdR"><img src="https://s7.gifyu.com/images/Groot-Test-5FPS.gif" alt="Groot-Test-5FPS.gif" border="0" /></a> | ||
|
||
In order to live monitor a running behavior tree, a few easy steps are necessary. | ||
|
||
Behavior trees of the BT.cpp V3 kind do not automatically include monitoring. | ||
This is and always should be an optional feature as it involves opening an additional communication layer: ``ZMQ``. | ||
|
||
Adding the monitoring feature to nav2 therefore involves activating a special parameter listed in :ref:`configuring_bt_navigator`. | ||
After activating ``enable_groot_monitoring``, the zmq network ports for a ``zmq-server`` and ``zmq-publisher`` can be set optionally. | ||
|
||
Given the launch-parameters are set correctly, the navigation2 stack has to be started normally first. | ||
Regardless of simulation or real hardware, **monitoring only works if the behavior tree is currently running!** | ||
|
||
A step-by-step guide for simulation can look like this: | ||
|
||
1. complete :ref:`getting_started` and be able to run the tb3 simulation | ||
2. set ``enable_groot_monitoring`` to ``True`` in the ``params.yaml`` file | ||
3. (re-)start the tb3 simulation (optionally with ``headless:=True`` for only RVIZ as GUI) | ||
4. set the initial pose of the robot -> this will activate the whole navigation2 stack (check if they are active) | ||
5. start Groot and choose the monitor mode | ||
6. press connect in the upper left corner (``Server IP``, ``Publisher Port``, and ``Server Port`` can all be left to the default for the simulation) | ||
7. the behavior tree should now be visible in Groot | ||
8. send a new goal to your robot (can also include a new behaviorTree.xml, which gets loaded automatically) | ||
9. watch your robot drive in simulation and see how Groot automatically watches the state of your behavior tree | ||
|
||
Real world robots can easily be adapted to this. Just change the ``Server IP`` | ||
and zmq network ports accordingly to your local environment. | ||
|
||
Reloading of the behavior tree in Groot is done on multiple occasions, | ||
but only when a new behavior tree is loaded by nav2 or Groot is restarted. More about `Groot reloading the BT <https://github.com/BehaviorTree/Groot/pull/96>`_ can be seen in the merged PR here. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Remove these optional fields, any parameter with a default is technically optional. As well with unit, please stick with the format unless you'd like to update all of the parameters in all of the guides to this new format 😉