ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Suggestion for Custom Behaviour and Clarification of FollowPath Action Node in Behaviour Tree

asked 2022-07-01 13:52:49 -0500

sbrills gravatar image

This is a question regarding the behaviour of the FollowPath action node in the nav2 behaviour tree.

In the default implementation of the navigate to pose behaviour, the FollowPath action node has a goal checker that calls the ComputeVelocity method of the plugin controller as long as the robot is outside the goal tolerance region. Now, as soon as the robot is inside the tolerance region, the goal checker registers a success and publishes a zero twist to stop the robot. Each subsequent tick then results in the goalchecker returning a success and publishing a zero twist.

In my particular use case, I'd like to perform a final orientation behaviour once the robot is within the goal region. I have made separate plugins for this behaviour that are attached to the parent pipeline sequence control node. Once the controller returns a success, this behaviour gets ticked but the controller also gets ticked since it is attached to a pipeline sequence node. This causes the zero twist to get published repeatedly.

Is there a suggested way to work around this or modify this behaviour so that subsequent actions on the robot can be implemented while a previously ticked node is halted after completion? I'm not sure if the single trigger would work here since my understanding dictates that it would tick the controller only once and never tick it again thus not permitting it to track the path.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-07-02 23:10:32 -0500

updated 2022-07-02 23:11:10 -0500

It sounds like you just need to modify the structure of your behavior tree with different control flow node types or shuffle things a little bit to get the logic you would like. I suggest reading "Behavior Trees in Robotics and AI: An Introduction" to get a good functional understanding of behavior trees in general before trying to design your own so you know the nomenclature, what your options are, and how to structure a customized BT. Unfortunately, I don't have the cycles to help design application-specific behavior trees for everyone so you should get comfortable with behavior trees in general and then come back to the specific problem you have now (and so that in the future, you know how to modify to continue to customize Nav2's logic to your needs!).

This is the text I used to learn about BT's myself and Michele is a great expert on this topic and did a fantastic job on this work.

edit flag offensive delete link more


Thank you for the input. What I needed were some of the other sequence control nodes from the default Behavior Tree package. I've now been able to implement the desired logic.

sbrills gravatar image sbrills  ( 2022-07-11 09:39:27 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-07-01 13:52:49 -0500

Seen: 29 times

Last updated: Jul 02