Features¶
Behaviours¶
py_trees_ros.actions.ActionClient (…[, …]) |
A generic action client interface. |
py_trees_ros.battery.ToBlackboard (name[, …]) |
Subscribes to the battery message and writes battery data to the blackboard. |
py_trees_ros.subscribers.CheckData ([name, …]) |
Check a subscriber to see if it has received data. |
py_trees_ros.subscribers.EventToBlackboard ([…]) |
Listen for events (std_msgs.msg.Empty ) on a subscriber and writes the result to the blackboard. |
py_trees_ros.subscribers.ToBlackboard ([…]) |
Saves the latest message to the blackboard and immediately returns success. |
py_trees_ros.subscribers.WaitForData ([name, …]) |
Waits for a subscriber’s callback to be triggered. |
Blackboards¶
This module provides the py_trees_ros.blackboard.Exchange
class,
a ROS wrapper around a
Blackboard that permits
introspection of either the entire board or a window onto a smaller part
of the board over a ROS API via the py-trees-blackboard-watcher
command line utility.
Trees¶
The py_trees_ros.trees.BehaviourTree
class
extends the core py_trees.trees.BehaviourTree
class
with a ROS publisher that publishes the initial and updated snapshots of
the tree whenever the tree changes.
‘Change’ is defined by deletion or insertion of behaviours into the tree or the status of any behaviour in the tree changing from tick to tick.
Programs¶
py-trees-blackboard-watcher¶
Open up a window onto the blackboard!
Examples:
$ py-trees-blackboard-watcher
$ py-trees-blackboard-watcher --list-variables
$ py-trees-blackboard-watcher access_point odom/pose/pose/position
usage: py-trees-blackboard-watcher [-h] [-l] [-n [NAMESPACE]] ...
Positional Arguments¶
variables | space separated list of blackboard variables to watch Default: [] |
Named Arguments¶
-l, --list-variables | |
list the blackboard variables | |
-n, --namespace | |
namespace of blackboard services (if there should be more than one blackboard) |
Example interaction with the services of an py_trees_ros.blackboard.Exchange
:
py-trees-tree-watcher¶
Open up a window onto the behaviour tree!
Print static or dynamic (snapshot) unicode art views of the tree on the console or render a dot graph (static view only). Use the namespace argument to select from trees when there are multiple available.
Examples:
$ py-trees-tree-watcher
$ py-trees-tree-watcher --unicode-tree
$ py-trees-tree-watcher --dot-tree
$ py-trees-tree-watcher --namespace=foo --unicode-tree
usage: py-trees-tree-watcher [-h] [-n [NAMESPACE]] [-s | -t | -d]
Named Arguments¶
-n, --namespace | |
namespace of pytree communications (if there should be more than one tree active) | |
-s, --snapshot | print a live snapshot of the tree state as unicode art on your console |
-t, --tree | print the tree structure as unicode art on your console |
-d, --dot-tree | render the tree structure as a dot graph |
Command line utility to interact with a running
BehaviourTree
instance. Print the tree structure
or a live snapshot of the tree state as unicode art on your console,
view tick statistics as a stream or display the tree as a dot graph.