Skip to content

Releases: BehaviorTree/BehaviorTree.CPP

4.6.2

26 Jun 10:02
Compare
Choose a tag to compare

Noteworthy

  1. Re-added support for custom JSOn convertion functions.
  2. Fix in minitrace logger
  3. Removed singleton protection from various Loggers
  4. nonstd::expectedupdated
  5. More checks in VerifyXML to check that Subtree don't use names already recistered and regular Nodes
  6. New callback TickMonitorCallback called at each tick
  7. Fix ament_export_targets

4.6.1: Small bug fix and flatbuffers deprecation

20 May 09:10
Compare
Choose a tag to compare

The main change is a bug fix related to #823

Additionally, the old FileLogger and the flatbuffers files have been deprectaed and removed from the public API

4.6: Lot of new features and tutorials

28 Apr 14:17
Compare
Choose a tag to compare

This release includes a lot of important changes. This is a non comprehensive list.

With my great surprise, this release seems to be ABI compatible with 4.5.2

Default behavior of ReactiveSequence and ReactiveFallback

ReactiveSequence and ReactiveFallback are unfortunately hard to use correctly.
There was a long discussion about what should happen when one of these nodes has multiple asynchronous children and there is no easy answer.

The default behavior is not more similar to version 3.8, but this also means that users must be very careful.
Read this issue for details: #755

The "global blackboard" idiom

We introduce here a new idiom and syntax: the global blackboard.
Usually each Subtree (including the main tree) has its own blackboard, isolated from the others, unless we do remapping.

We additionally provide a top-level blackboard that can be accessed from everywhere, without any manual remapping, using the prefix "@"

See example: https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/examples/t19_global_blackboard.cpp

Entries of the blackboard are now timestamped!

We added a timestamp and a sequence number to each entry in the blackboard (both updated when we set the value).

This allow use to determine if the value we are reading in the blackboard is "new" (since the last time we accessed it) or "obsolate".

We added the methods Blackboard::getStamped and TreeNode::getInputStamped.

Additionally, we added 3 new builtin nodes that use this functionality:

  • SkipUnlessUpdated: decorator that skip the execution of the children unless an entry was updated, since the last time.
  • WaitValueUpdate: decorator that remains in RUNNING state, unless an entry was updated. Executes the child if it did.
  • WasEntryUpdated: action that returns SUCCESS if an entry was updated, FAILURE otherwise.

String + number concatenation in the scripting language

Details: #802

We use the operator ".." to concatenate strings and numbers (inspired by Lua).
Give this:

prefix := 'value_';
val := 42;
str:= prefix .. val

The variable "str" should contain the string "value_42"

Enhanced SQlite logger

We added a method to send comands directly to the database and to append extra information to a state transition in the Transitions table.

See example https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/examples/t16_sqlite_log.cpp

Refactored API to register JSON convertions.

We simplified the way a custom type can be converted from/to JSON. See the example here:
https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/examples/t11_groot_howto.cpp#L13-L27

Blackup / restore a blackboard state.

Related somehow to the JSON convertion mentioned earlier.
We add some methods to save/load the state of a blackboard. usefull if you want to reset it correctly, withour destrying it and rebuilding it from scratch.

See this tutorial: https://github.com/BehaviorTree/BehaviorTree.CPP/blob/master/examples/t17_blackboard_backup.cpp

convertToString

Added more convertToString specializations

4.5.2: Bug fixes

07 Mar 11:53
Compare
Choose a tag to compare

Bug fix

This release fix some important bugs in the scripting language, most notably in the equal operators, that now support enums and boolean more correctly.

New features

The way default port values is specified is also being changed, to include default pointers to the blackboard too.

Example of how ports with complex types can be initialized.
Note that the case represented in pointC requires the implementation of convertFromString<Point2D>()

  static PortsList providedPorts()
  {
    return {BT::InputPort<Point2D>("input", "no default value"),
            BT::InputPort<Point2D>("pointA", Point2D{1, 2}, "default value is [1,2]"),
            BT::InputPort<Point2D>("pointB", "{point}", "default value inside blackboard {point}"),
            BT::InputPort<Point2D>("pointC", "5,6", "default value is [5,6]"),
            BT::InputPort<Point2D>("pointD", "{=}", "default value inside blackboard {pointD}")};
  }

But this new syntax is still experimental and will become stable in release 4.6.0

4.5.1: access the blackboard by pointer

23 Jan 12:06
Compare
Choose a tag to compare
  • Example 6 updated and improved API of LockedPtr
  • Fix Switch node when using enums and integers
  • basic static_assert when trying to register a derived TreeNode with abstract methods

4.5.0: Ports with Any type and Metadata

16 Jan 14:36
574a34f
Compare
Choose a tag to compare

Noteworthy changes

  • It is now possible to create ports with type BT::Any. These ports can connect to each other or to strongly typed ports
  • Optional metadata can be added to the manifest, implementing the static method KeyValueVector metadata() in your custom TreeNode.
  • Any::castPtr added, to access the content of Any without copying.
  • Any::isType() will now compare to the original type, not the casted one
  • Function writeTreeXSD() added

4.4.2: Prevent empty output ports

06 Dec 11:20
Compare
Choose a tag to compare

The most notable addition in this release is related to this issue: #702

The only valid ports are those remapped to a port entry.

4.4.0: SubTree Model added

16 Oct 15:02
Compare
Choose a tag to compare

This version introduces some refactoring of the Blackboard class and other minor bug fixes.

But the most important change is the introduction of the SubTree Model.

See example ex05_subtree_mode.cpp for details

4.3.8: Bug fixes and Reactive nodes

09 Oct 12:27
Compare
Choose a tag to compare
  • fixed a potential busy look caused by WakeUpSignal
  • Added tutorial 13 (how to build your own plugins)
  • The scripting language can now accept (and ignore) newlines.

Important

Both ReactiveSequence and ReactiveFallback were updated to better resemble each other and, partially, the logic they add in version 3.8.

Report any issue you may have.

4.3.7: Fixing generic port type matching

12 Sep 16:56
Compare
Choose a tag to compare

This is the most improtant change in this release: 57a2663

Related to this issue: #653

Previously, ports created by SetBlackboard would be recognized as strings instead of being considered "typeless" (as they should).