Releases: BehaviorTree/BehaviorTree.CPP
4.3.2: More nodes and better error messages
Changes since version 4.3.1
- Added ParallelAll node
- Much better error messages when there is an error in the scripting language
- Fix issues preventing Parallel (and probably other nodes) from using correctly
_skipIf
4.3 Bug fixes and a ton of refactoring
Important
This release is not ABI compatible with the previous one! Please recompile all your plugins, when updating.
Bug fix: Subtree "_autoremap"
This is related to #563 .
I realized that Subtree::_autoremap in V4.x was not an exact drop-in replacement of Subtree::__shared_blackboard in V3.X.
The main problem was that port remapping may not work properly if there is a subtree of a subtree (see this unit test).
To solve this problem, the implementation of the Blackboard and port remapping had to change considerably.
A nice side effect is that not TreeNode::getInput and TreeNode::setOutput is now actually more efficient.
Bug fix: default value for custom types
This solves #580. Note that it also required some radical changes in the Blackboard.
The user facing API did not change, but the internal one did; therefore, those users which use directly the Blackboard (something that is discouraged), might be affected.
Refactoring: Pimpl
To prevent more ABI compatibility issues in the future, we started using the PImpl idiom in multiple classes (TreeNode and BehaviorTreeFactory in particular).
New logger: FileLogger2
This is a replacement of the old FileLogger using Flatbuffers. This version will generate smaller logs and is compatible with the latest version of Groot2 (to be released soon).
4.2 : Important change in Sequence and Fallback!
Breaking change
Since version 4.0, the behavior of Sequence and Fallback was changes, compared to 3.x.
The new implementation would return RUNNING after executing a Synchronous child.
This new behavior was reverted in 4.2.
Now the default behavior is the same as 3.8.
If you want to use the new behavior, you should switch to AsyncSequence and AsyncFallback.
Thread-safe access to ports with reference semantic
It is not uncommon to store objects with reference semantic (for instance std::shared_ptr<T>) in the blackboard.
Unfortunately, this makes it impossible for the setter and getter of the Blackboard to make the access to the object T thread-safe.
We propose a solution to this problem that uses:
Blackboard::getAnyLockedTreeNode::getLockedPortContent
These new interfaces return an object called AnyPtrLocked.
This contains the pointer to the object Any, but will also keep the a mutex locked as long as the object exist.
To see a practical example, check LoopNode and the example 4 (ex4_waypoints).
Other changes
- New
FileLogger2, replacing the old (and deprecated) one. RunOncenode added.Tree::getNodesByPathadded.
4.1.1: bug fixes and SQLIte logger
I must admit that 4.1.0 was kind of a misfire.
Some important bugs were fixed since that release, and you should probably NOT use it.
Notable changes
-
ManualNode and dependency to ncurses . I am assuming that nobody uses that node. If you do... I am sorry? NCurses is a dependency I don't want to have.
-
New logger based on SQLite, that will allow users to log multiple runs in the same database. It is meant to be used with Groot2
-
Now substitution rules can be loaded from JSON at runtime (see tutorial 11)
-
Fixed issue #530
-
some header files (3rd party dependencies) moved from folder util to contrib
Release 4.1... getting ready for Groot2
New features / important changes
Identifying Nodes
- The unique ID of the Nodes, i.e.
TreeNode::UID(), is now deterministic and based on the Depth-first Traversal order (starting at 1). - Struct
Tree::Subtreehas now a unique human-readable identifier calledtree_ID. - The
Tree::Subtree::tree_IDis used to generate theTreeNode::fullPath(), which is also a uniquely identified string, that contains the hierarchy in the tree and the name of the Node.
A great way to get familiar with the new UID and fullPath is to look at Tutorial 10, where a TreeObserver is introduced too.
Tools to make debugging easier.
Version 4.1 introduces a new concept: node replacement. At deployment time, i.e. before the tree is instantiated, we can add "rules" to the BT factory to substitute certain Nodes with another implementations.
This is particularly useful when generating unit tests, i.e. when we want to substitute Nodes with dummy ones.
We provide a specific "dummy node" called TestNode that should cover the vast majority of the use cases.
Also, the TreeObserver is a great tool to create unit tests: it allows the user to check which Nodes have been ticked, and what they returned, in a non-intrusive way.
Dependencies and build
-
We removed the dependency from Boost, which was used only for its coroutine library. We use now minicoro. Boost is a "commodity" in Linux, but quite annoying for Windows users.
-
We now use conan to download dependencies in non-ROS builds.
Groot2 interface
We included the first, preliminary version of the Groot2Publisher, which can be used to communicate in real-time with Groot2 to do amazing things:
- real-time visualization of the BT status
- blackboard visualization
- insert breakpoints in the tree and wait for "Continue" in Groot2
- mocking of Nodes at run-time (force FAILURE or SUCCESS)
- fault injection: make a node fail to trigger the execution of recovery branches.
Important bug fixes
- #525 Pre-Condition : _skipIf NOT working with ReactiveSequence
- #517 Halting the tree doesn't set the root node to idle
- #515 "ReactiveSequence is not supposed to reach this point"
- #514 Changed behavior of tickOnce
- #507 _skipIf precondition does not work with SubTree
- #506 Floating point values set by Script cause Floating point truncated
- #505 'std::bad_alloc' when using Script node on Raspberry Pi
- #492 Threads::Threads errors when building a project based on BT.CPP
- #489 Port type mismatch between blackboard and subtree port
And probably others that I can't remember here
Lot of interesting stuff
Noteworthy changes:
- A better way to include BTs from multiple files, either manually or using the <include> tag
- Adding a new Tree::sleep() method (experimental) to create event-driven trees.
- Example showing how to effectively use queues to do a "for-loop"
- Bug fixes
Important changes
In this new release, there are many changes (including few that are breaking in API).
- New Switch ControlNode.
- Tree now provides two public methods: tickRoot() and haltTree()
- CoroAction (coroutines) now need Boost.
- most importantly, TreeNode::setStatus() is protected now!
The last change will be annoying for many people, but it is the only way to avoid nasty antipatterns.
Version 2.3.0: API change in BehaviorTreeFactory::registerBuilder
There are few bugs fixed since version 2.2.0 (see CHANGELOG).
Someone code may break because the signature of the method registerBuilder had to change since the manifest was not created nor added to the manifest list.
See commit 6181d87 for details.
Version 2.2: SimpleNodes + NodeParameters = ❤
This release includes a few changes that you can read in the CHANGELOG.rst.
The most notable is that SimpleActions, SimpleDecorators and SimpleConditions will not allow NodeParameters.
Check the tutorial T06 out to see a practical example of how this helps wrapping legacy code into a TreeNode.
Version 2.1: Change in directory structure
With the latest change in CMake to support the installation of the library, it became apparent that the include needed some refactoring.
This will break the code of people using the previous version, sorry :(
Bear with me