Alternative to py_trees_ros_viewer, focused on high FPS for large trees. Not feature complete yet, but can display fairly large trees efficiently.
Tested on ROS2 Humble.
viewer-gl-demo.mp4
Dependencies:
pip install pyglet>=2.0.15
Use:
Create your ros2 node used by the tree with default_snapshot_stream:=true
, this will make your tree publish updates on topic /<node_name>/snapshots
by default.
node = rclpy.create_node("<node_name>", parameter_overrides=[
rclpy.parameter.Parameter("default_snapshot_stream",
rclpy.parameter.Parameter.Type.BOOL, True),
rclpy.parameter.Parameter("default_snapshot_period",
rclpy.parameter.Parameter.Type.DOUBLE, 1.0),
])
When running the viewer, use topic remapping to connect the viewer subscription to your tree node publisher.
ros2 run py_trees_ros_gl_viewer py-trees-ros-gl-viewer --ros-args -r /bt_node/snapshots:=/<node_name>/snapshots -p antialiasing:=false
Anti-aliasing only works well for me if I run on a computer with a graphics card.
Roadmap:
- Blackboard visualization
- Collapse sub trees
- More effient updates on tree changes
- ideas?