bteng-nav2
Nav2 behavior tree nodes for the BTEng engine.
A pure Python pip library — no ROS 2 workspace, no colcon, no XML behavior trees required. Every Nav2 action server, service, and common condition is available as a composable BTEng node.
- One command —
bteng-nav2 run trees/ -p params.yaml; a project ships params and XML only - 13 actions, 8 services, 6 conditions, 2 publishers — navigation, planning, recovery, docking, costmaps, maps
- Retargetable endpoints — a second planner or a per-robot namespace is a tree change, not a subclass
--dry-runCI gate — builds every tree and validates every seeded value, no ROS installation needed- Offline-testable — the test suite stubs ROS 2 and Nav2, so plain
pytestworks anywhere
Install
source /opt/ros/jazzy/setup.bash # or kilted / rolling
pip install bteng-nav2
Requires Python ≥ 3.12, so ROS 2 Jazzy onward — Humble and Iron ship Python 3.10 and are not
supported. bteng and bteng-ros2 are pulled in automatically. Full requirements and troubleshooting:
Installation.
Quick start
A project needs no application Python — a params file, a tree, and one command:
# params.yaml
blackboard:
goal_pose: {type: pose, frame_id: map, x: 2.0, y: 1.5, yaw: 0.0}
backup_dist: 0.30
<!-- trees/navigate.xml -->
<root BTEng_format="1.0" main_tree_to_execute="main">
<BehaviorTree ID="main">
<Fallback name="navigate_with_recovery">
<NavigateToPose name="attempt" goal_pose="{goal_pose}" result="{nav_result}" />
<Sequence name="recover_and_retry">
<ClearGlobalCostmap name="clear" />
<BackUp name="back_off" backup_dist="{backup_dist}" />
<NavigateToPose name="retry" goal_pose="{goal_pose}" />
</Sequence>
</Fallback>
</BehaviorTree>
</root>
bteng-nav2 run trees/ -p params.yaml --dry-run # parse + build only: CI gate, no robot
bteng-nav2 run trees/ -p params.yaml # run every tree in the directory
Poses are built in the YAML because a BT XML attribute is a string and NavigateToPose wants a
geometry_msgs/PoseStamped. Exit code is 0 only if every tree succeeded. Prefer to build the tree
in Python? That still works — see
Building Trees.
Documentation
Docs live in docs/:
- Installation — requirements, virtualenv, development install, troubleshooting
- Quick Start — one goal, from XML and from Python
- Running from the CLI — params file, value types, tag names,
--dry-run,--namespace, flags - Retargeting Endpoints —
action_name/service_name/topic_nameports, namespaces - Node guides, with ports and defaults: Actions · Services · Conditions · Publishers
- Building Trees — composing trees in Python, how the nodes are built, custom nodes
- Testing Without ROS — the stub layer and writing node tests
- Examples (sources in
examples/): Navigate to Pose · Compute & Follow · Patrol Loop · Recovery Tree · Full Autonomy - API reference: Actions · Services · Conditions · Publishers
- Changelog
License
MIT
Metadata
Release files for bteng-nav2 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bteng_nav2-0.4.0.tar.gz | 41.2 kB | Without provenance | Details for bteng_nav2-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bteng_nav2-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for bteng_nav2-0.4.0-py3-none-any.whl |
Total release size: 88.7 kB
Security for bteng-nav2 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.