btview
Watch your behaviour tree run — in the terminal, over SSH, on the robot.
A live monitor for BehaviorTree.CPP and Nav2 that needs no GUI, no X11, no ROS client library — just the ZMQ port your tree already publishes on.
▶ Watch the 75-second tour — install, live monitoring, the line-based commands, and record/replay.
Why
Debugging a behaviour tree usually means running Groot2 on a laptop, on the same network, with a display. Robots are rarely that convenient: you are on a serial console in a lab, or SSH'd into a machine over a flaky link, or reading a bag from a run that already ended.
btview puts the tree where you already are.
pipx install git+https://github.com/guilyx/btview
btview demo # a synthetic Nav2 robot, no hardware required
btview # the real thing, on 127.0.0.1:1667
What it does
- Live tree view — every node, its status, and what changed, refreshed as the tree ticks.
- Two ways to look at it — an indented list for hunting a node, or a drawn graph
(g, or
--graph) for seeing which branch the robot is down. Per-node sparklines make a flapping node obvious at a glance. - Both wire protocols — Groot2 / BehaviorTree.CPP 4.x (
Groot2Publisher, what Nav2 uses) and BehaviorTree.CPP 3.x (PublisherZMQ). - Works on a dumb terminal —
--asciidrops every box-drawing and unicode glyph;NO_COLORis honoured. Fine over a 9600-baud serial console. - More than a UI —
snapshotfor scripts,echofor logs and CI,exportfor issues and docs,record/playfor after the fact. - No ROS dependency — pure Python over ZMQ. It does not import
rclpy, and it does not care which distro you run. - Try before you connect —
btview demoruns a synthetic Nav2 tree through the real protocol stack, so you can learn the tool (and verify your install) with no robot.
Install
pipx install git+https://github.com/guilyx/btview # isolated, recommended
pip install git+https://github.com/guilyx/btview # into the current environment
Python 3.9+ and nothing else — the ZMQ, Rich and Textual wheels come from PyPI. Full instructions, including ROS 2 workspaces, Docker and robots without internet access, are in docs/install.md.
Use it
On a robot running Nav2
Enable monitoring in your BT navigator, then point btview at the port:
bt_navigator:
ros__parameters:
enable_groot_monitoring: true
groot_server_port: 1667
btview --host 192.168.1.42 # full-screen monitor
btview snapshot --host 192.168.1.42 # one shot, then exit
See docs/nav2.md for BehaviorTree.CPP 3.x, custom stacks, and ports.
Without a screen
btview watch --ascii # redraw in place, ASCII only
btview echo --json | tee bt.jsonl # one line per status change
btview snapshot --active # only what is running or failing
Capture now, debug later
btview record -o run.btv.jsonl --duration 120 # on the robot
btview play run.btv.jsonl --speed 2 # on your laptop, same UI
Get the tree out
btview export --format mermaid -o tree.mmd # paste into a GitHub issue
btview export --format dot | dot -Tpng > tree.png
btview show my_tree.xml # render a file, no server at all
Commands
| Command | What it is for |
|---|---|
btview / btview tui |
Full-screen live monitor |
btview demo |
Synthetic robot + monitor in one process |
btview snapshot |
Print the tree once and exit — scriptable |
btview watch |
Refresh in place, no alternate screen |
btview echo |
Stream transitions, one line each (--json) |
btview show FILE |
Render a behaviour tree XML file |
btview export |
XML, Graphviz, Mermaid or JSON |
btview info |
Endpoint, tree size, round-trip latency |
btview blackboard |
Dump blackboard entries (v4 publishers) |
btview record / btview play |
Capture a session, replay it anywhere |
btview mock |
Serve a synthetic tree for another btview or Groot2 |
btview bridge |
Read one transport, republish on another |
btview transports |
List the transports this build speaks |
Every command takes --host, --port, --protocol v4|v3, or a --source URI. Full
reference: docs/cli.md.
Transports are pluggable
The wire format and the transport are separate, so a live robot, a recording and (soon) a ROS 2 topic are interchangeable everywhere:
btview --source replay://run.btv.jsonl?speed=4
btview bridge --from btcpp3://robot:1667 --to groot2://0.0.0.0:1667 # Groot2 can watch a v3 robot
Adding a transport is one class and one decorator — docs/transports.md.
Reading the tree
[!] NavigateRecovery [RecoveryNode] ▶ RUNNING
├─ [=] NavigateWithReplanning [PipelineSequence] ▶ RUNNING
│ ├─ -^- RateController ▶ RUNNING
│ │ └─ [!] ComputePathToPose [RecoveryNode] ✔ SUCCESS
│ │ ├─ --> ComputePathToPose · was SUCCESS
│ │ └─ --> ClearGlobalCostmap-Context · IDLE
│ └─ [!] FollowPath [RecoveryNode] ▶ RUNNING
└─ [o] RecoveryFallback [ReactiveFallback] · IDLE
Node-type glyphs follow py_trees convention, so they read the same in both ecosystems:
| Glyph | Meaning | Glyph | Meaning | |
|---|---|---|---|---|
[-] |
sequence | ▶ |
running | |
[o] |
fallback | ✔ |
success | |
[=] |
pipeline sequence | ✖ |
failure | |
[!] |
recovery | ⊘ |
skipped | |
-^- |
decorator | · |
idle | |
--> |
action | · was X |
idle, ran earlier | |
(?) |
condition |
Documentation
| Doc | Contents |
|---|---|
| docs/install.md | Install, first run, ROS 2 and offline robots |
| docs/cli.md | Every command and flag, with examples |
| docs/tui.md | Layout, keys, panels |
| docs/nav2.md | Connecting to Nav2 and BehaviorTree.CPP |
| docs/protocol.md | Groot2 v4 and BTCPP v3 wire formats |
| docs/transports.md | Source/sink URIs, the bridge, adding a transport |
| docs/docker.md | Container and compose usage |
| docs/development.md | Tests, lint, the Python API |
Contributing
Issues and pull requests are welcome — this is a tool for a community that mostly debugs
robots without a monitor attached, so field reports are especially useful. Start with
docs/development.md; pip install -e ".[dev]" && pytest is the whole
setup, and no robot is needed to run the suite.
License
Apache-2.0 — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file btview-0.2.0.tar.gz.
File metadata
- Download URL: btview-0.2.0.tar.gz
- Upload date:
- Size: 89.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06289077101d94c357c6d87623543f6a2c6037676492c943dffa1d6f4be5dcbb
|
|
| MD5 |
c3577c99345794ee5595c3418d33deac
|
|
| BLAKE2b-256 |
6933316870ee9c3ccc5e2ee6aa23972fe19f5153d36abb6da73f6543113f4be7
|
Provenance
The following attestation bundles were made for btview-0.2.0.tar.gz:
Publisher:
release.yml on guilyx/btview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
btview-0.2.0.tar.gz -
Subject digest:
06289077101d94c357c6d87623543f6a2c6037676492c943dffa1d6f4be5dcbb - Sigstore transparency entry: 2436996550
- Sigstore integration time:
-
Permalink:
guilyx/btview@2e8a6024122a32428c734abd6a565823974e3a9e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/guilyx
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2e8a6024122a32428c734abd6a565823974e3a9e -
Trigger Event:
push
-
Statement type:
File details
Details for the file btview-0.2.0-py3-none-any.whl.
File metadata
- Download URL: btview-0.2.0-py3-none-any.whl
- Upload date:
- Size: 71.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f9af245fe761a64759004d6f7ff9bf2a300a7a2718dd0c74a91d0025caccca6
|
|
| MD5 |
a04e8c709d55af08dbc67b8de45b1ca1
|
|
| BLAKE2b-256 |
8e92af848eea6b2060b0d8e9256d308226633ab780077140beeb944947714b03
|
Provenance
The following attestation bundles were made for btview-0.2.0-py3-none-any.whl:
Publisher:
release.yml on guilyx/btview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
btview-0.2.0-py3-none-any.whl -
Subject digest:
4f9af245fe761a64759004d6f7ff9bf2a300a7a2718dd0c74a91d0025caccca6 - Sigstore transparency entry: 2436996955
- Sigstore integration time:
-
Permalink:
guilyx/btview@2e8a6024122a32428c734abd6a565823974e3a9e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/guilyx
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2e8a6024122a32428c734abd6a565823974e3a9e -
Trigger Event:
push
-
Statement type: