I started to experiment with navigation2 and especialy the BT part for more complex behaviors and recoveries. It somehow expected to also find a debug and visualization tool, but so far I couldn’t find one. Groot does not work directly, so I wanted to know if there are plans to make it usable or how other developers use BTs in ROS2
There is an open PR working on this: https://github.com/ros-planning/navigation2/pull/1958
Hi,
my ability to support Groot is limited and usually I prioritize my open source projects based on the feeling of their usefulness to the community. I was not sure about how many people where actually using Groot.
I was not aware of the open issue in navigation2… interesting to know.
I haven’t maintained much this part. If you find any actual bug, let me know.
Hey there…
Cool to see my PR spotted.
I’m currently stuck on 2 things:
That the Groot PR (mentioned by me in this PR above) including my PR of this Groot PR gets accepted by @facontidavide . That way reloading of the BT does not crash Groot… I just extended the PR for this a little bit, this way I was not able to manually crash it with random connects / disconnects / reset of Nav2 lifecycle nodes etc.
The second thing is CI:
I went a little bit too far down the rabbit hole and got confused why there is ros2/launch and ros2/ros_launch …
What I want to implement is testing with the optional parameter “enable_groot_monitoring” while not creating a new complete param file of the nav2 parameters…
So basically substituting this one paramerter with the value “True” while keeping the rest of the params.yaml untouched. = With existing ROS2 tools. #helpwanted !! @mikeferguson ?
(Alternatively fixing the original nav2-thing for this: https://github.com/ros-planning/navigation2/blob/main/nav2_common/nav2_common/launch/rewritten_yaml.py )
Also, documentation for how to use Groot with nav2 is happening this weekend. (not hard at all )
So the PR is sort of ready, just need to add the nice last bits.
Also @NikolasE are you already in the navigation2 slack? Would be cool to know what you are up to with BTs!
Merged. Better late than never.
Hey,
Thanks! There are just some small fixes missing. I put them all together in https://github.com/BehaviorTree/Groot/pull/96
@facontidavide Would be cool if you could merge this as well. I took the earlier file conflicts of #61 into account and retested it with nav2:main .
On the launch_file param substitution:
I found the root cause.The rewritten_yaml.py works fine, but only for 1-dimensional dicts and not
params = {'bt_navigator':{'ros__parameters':{'enable_groot_monitoring' : 'True'}}}
If I use this, the value for ‘bt_navigator’ gets completely replaced with just ‘ros__parameters’ as a value and not the rest of the multi-dimensional dict. I’m currently thinkering on this issue… maybe somebody else has a hint or something completely else that gets the job done?
Maybe @wjwwood, do you know something/someone that could help here?
(tl;dr Rest of the issue is mentioned in my previous post, the CI section)
Cheers,
Florian
Update:
CI / YAML Parameter Substitution user-“bug”: I found it
I was to focused on getting the multi-dimensional key as an Input of RewrittenYaml()… But, RewrittenYaml has a recursive iterator built-in that searches for the key on any level of the yaml-params dict… But this happens only when the sub-function
perform(context)
with a given LaunchContext
is triggered, which did not happen in the existing CI tests I skimmed through…
@smac probably also interesting for you - will be included in the PR and probably worth some docu as well.
Looks like this PR is getting finished soon…
Hey @facontidavide,
just a friendly ping!
As my PR of nav2 and its documentation are slowly reaching a finish line, it would be cool if you have a moment to merge my PR for Groot!
Thank you!
Cheers