Skip to content

Initial BT tutorial#141

Merged
SteveMacenski merged 29 commits intoros-navigation:masterfrom
vinnnyr:feature/behavior-tree-tutorial
Aug 21, 2021
Merged

Initial BT tutorial#141
SteveMacenski merged 29 commits intoros-navigation:masterfrom
vinnnyr:feature/behavior-tree-tutorial

Conversation

@vinnnyr
Copy link
Copy Markdown
Contributor

@vinnnyr vinnnyr commented Mar 2, 2021

Starting this PR to spark initial conversation and gather initial feedback.

Looking for initial feedback here for the BT tutorial. I have yet to go about and add the "custom BT" portion of the tutorial, but have so far covered the existing navigate_w_replanning_and_recovery.xml default BT.

Few concerns here:

  • Is this too dry for a tutorial? Am I going into the weeds too much? Am I not going into it enough? It is hard to gauge for me, and the tutorial seems quite long already.
  • Do I need more pictures or gifs to show what is going on? Is there a way I can get groot to help me with this (tagging @gramss for insight)

@SteveMacenski
Copy link
Copy Markdown
Member

Am I going into the weeds too much?

I think this tutorial, of any, should be more in the weeds since this is genuinely a new concept to most in robotics so very few will even know the vocabulary we're using.

Do I need more pictures or gifs to show what is going on?

These are good, take some groot screen shots or use the BT visualization script in /tools of Nav2 to generate some visualizations of the trees so people can see them. The XML is good, but its much easier for people to understand the tree structure looking at... well... trees. For instance in the "Navigate With Replanning and Recovery" section, you show the main Bt first thing, I think you should show the actual tree before that XML block so they can see how the tree goes into the XML. After that point, for any "complete" BT's I'd show the visualization of the tree. For any sub-trees or specific calls, show the XML.

Reviewing now for more detailed commentary...

Copy link
Copy Markdown
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a bit more organization, but this looks good. So far the document is mostly just walking through the existing BT but I get that your intent is to work from there to modify it to use a specific path below. I think you should continue working on this and we can figure out how to organize the pages later (might make sense to move the BT explanation into a subpage in concepts and then this builds from that or something - either way, work on it here and we can figure it out later)

vinnnyr and others added 2 commits March 12, 2021 20:45
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
* adding reference to the getting started guide

* fixed xml indentation

* adding images, test to see how it renders

* fixing XML, and BT rendering

* adding overview of custom BT nodes

* added pictures for pipeline sequence

* fixed typos on image, and guide

* added recovery node explaination

* addding round robin explaination
@vinnnyr
Copy link
Copy Markdown
Contributor Author

vinnnyr commented Mar 27, 2021

Just merged in something that walks through the custom BT nodes, wanted to push it here and make sure it renders properly before I go through and re-edit the navigate_w_replanning_and_recovery portion of the tutorial.

Does this new page (https://navigation.ros.org/behavior_trees/index.html) change the direction of this PR / this section I am about to go and edit?

I think it does, we will have a bit more duplicate ideas

@vinnnyr
Copy link
Copy Markdown
Contributor Author

vinnnyr commented Mar 27, 2021

Additionally, need some advice on how to get these images rendering nicely / professionally. (Currently just using a paint program to slap the labels “(running), (idle), (failure)” etc.

I will focus on this issue last, the images for now can serve as a “sketch” of what the end product would be .. but I cannot imagine it being this in the final version.

The Groot trees took a lot of manual manipulation to get into an aspect ratio that would look good on the webpage so I used the bt2img utility.

@SteveMacenski
Copy link
Copy Markdown
Member

can you give an example? I think how we've done it elsewhere is visualizing the behavior trees using Groot / that script you mentioned.

@vinnnyr
Copy link
Copy Markdown
Contributor Author

vinnnyr commented Mar 31, 2021

can you give an example? I think how we've done it elsewhere is visualizing the behavior trees using Groot / that script you mentioned.

Here is the latest build which has those trees: https://714-240847415-gh.circle-artifacts.com/0/html/tutorials/docs/custom_behavior_tree.html

Right now these are generated using the bt2img.py utility but manually marked up in a paint program for labels.

@SteveMacenski
Copy link
Copy Markdown
Member

SteveMacenski commented Mar 31, 2021

I think the python script does a reasonable job at making the tutorial-ready tree.

I might add the state on top of the BT node rather than overlapping/below so that its not overlapping in the box itself. Another option would be putting a border around the BT nodes rather than the (words). Green = success, red = failure, grey = idle, blue = running or something. While I think that would be more visually pleasing, I think the words, if put on top, would be totally sufficient and maybe better to just be more explicitly clear.

@vinnnyr
Copy link
Copy Markdown
Contributor Author

vinnnyr commented Apr 5, 2021

@SteveMacenski I have significantly edited this now to address your first round of comments, and I think it is worth another round of review from you before I move on to the "custom" portion of the tutorial.

Copy link
Copy Markdown
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, much better! Much smaller comments and alot fewer of them. This is a really great resource on the BTs of Nav2 and I super appreciate your attention to detail on this. It will help alot of folks!

I think the Bt node explanation section should be spun out as another page under the behavior trees section https://navigation.ros.org/behavior_trees/index.html of the site as an independent page.

@SteveMacenski
Copy link
Copy Markdown
Member

Hey! Just touching base on this

@vinnnyr
Copy link
Copy Markdown
Contributor Author

vinnnyr commented Aug 9, 2021

Hey @SteveMacenski , I apologize this slipped.

I believe I have addressed everything else so far, except I just posed some discussion for the PipelineSequence part of the tutorial.

I suggest that we punt the "custom BT" portion of the tutorial to a separate PR so we can at least get the work we did thus far released, as I am afraid I cannot predict a timeline for the other "custom BT" portion of this ticket.

If you agree, I can remove all reference to the "custom BT" part of the tutorial and we can pick that up at a separate time / someone else could pick it up if they so choose.

@vinnnyr vinnnyr marked this pull request as ready for review August 21, 2021 00:43
@SteveMacenski SteveMacenski merged commit ba2be8c into ros-navigation:master Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants