bteng-moveit
MoveIt 2 behaviour-tree nodes for the BTEng behavior tree engine.
Every MoveIt 2 action server, service and topic a manipulation app needs is a composable BTEng node. A project needs no application Python — a params file, a tree, and one command.
Install
source /opt/ros/jazzy/setup.bash # or kilted / rolling — Python 3.12+
pip install bteng-moveit
bteng>=0.3.2 and bteng-ros2>=0.3.0 are pulled in automatically. MoveIt 2
message packages (moveit_msgs, shape_msgs, …) come from the ROS 2
installation you run in — they are not needed to install, import, or
--dry-run. Supported distributions and why the two floors are hard:
Getting started.
Run a tree with one command
The tree holds the order things happen in; the params file holds the values.
Poses are built in YAML because a BT XML attribute is a string and PlanToPose
wants a real geometry_msgs/PoseStamped.
<Sequence name="plan_then_execute">
<IsMoveGroupReady name="ready" />
<PlanToPose name="plan" pose="{grasp_pose}" planning_group="{arm_group}"
link_name="{eef_link}" trajectory="{trajectory}" />
<ExecuteTrajectory name="execute" trajectory="{trajectory}" />
</Sequence>
bteng-moveit run trees/ -p params.yaml # run every tree in the directory
bteng-moveit run trees/ -p params.yaml --dry-run # parse + build only: CI gate, no robot
bteng-moveit run trees/ -p params.yaml --namespace /left # one arm of a dual-arm cell
bteng-moveit nodes # list every XML tag
Exit code is 0 only if every tree succeeded. The matching params.yaml and a
walk-through are in Getting started; every flag is in
CLI; every params type: is in
Params file reference.
Nodes
19 node classes, each registered under two XML tags — the short form
(PlanToPose) and the class name (PlanToPoseNode).
| Kind | Nodes |
|---|---|
| Actions | PlanToPose, PlanToJointValues, ExecuteTrajectory, MoveGroup, GripperOpen, GripperClose |
| Services | ComputeCartesianPath, ComputeIK, ComputeFK, GetPlanningScene, ApplyPlanningScene, ClearOctomap |
| Topics | GetJointState, AddCollisionObject, RemoveCollisionObject, AttachObject, DetachObject |
| Conditions | IsMoveGroupReady, IsAtJointTarget |
Every endpoint is also an input port, so a tree retargets one node without a
subclass: <PlanToPose action_name="/left/move_action" ... />. Full port tables,
endpoints and the traps worth knowing before wiring a pick:
Node reference.
Runs offline
import bteng_moveit succeeds on a machine with no ROS 2 installed. Every
node defers its ROS 2 and MoveIt imports to the first tick, and a test walks the
AST of every module to keep it that way.
So --dry-run is a real CI gate: every tree parses, every tag resolves, every
port exists and every params value validates, on a runner with no ROS.
pip install -e ".[dev]"
pytest test/ -v # 492 tests, ~1 s
bteng-moveit run examples/trees/ -p examples/config/moveit_params.yaml --dry-run
What works without ROS 2 and what cannot: Testing.
Examples
Five trees and a params file exercising every value type, in
examples/ — from a plan-and-execute pair up to a full pick and
place. None needs a robot to check; see
Getting started.
Documentation
| Page | Covers |
|---|---|
| Getting started | Requirements, supported ROS 2 distributions, first tree |
| Params file reference | Every type:, orientation, collision geometry, named targets |
| Node reference | All 19 nodes with full port tables |
| CLI | run and nodes, every flag, --dry-run as a CI gate |
| Design | Lazy imports, MoveIt error codes, port direction, namespaces |
| Python API | Using the library without the CLI |
| Testing | Running the suite, and your trees, with no ROS 2 |
| Changelog | What changed, and why |
Status
492 offline tests, plus a companion validation project that contains no application Python and asserts it mechanically.
Never run against a real MoveIt. The development machine has no ROS 2, so
server behaviour, DDS timing, use_sim_time and action callbacks are stub-tested
only. Message field names were verified against the upstream definitions,
because the stubs accept any attribute and so could not do it for us.
Upgrading from 0.1.0 needs two edits to an existing tree — /move_group →
/move_action, and ComputeIK's seed port is now seed_state. Both, and the
five defects that made 0.1.0 unable to run against a real MoveIt, are in the
changelog.
Contributing
Issues and pull requests are welcome at
BTEng-dev/bteng-moveit. CI runs
ruff, the offline suite and a --dry-run of every shipped tree — the four
commands are listed in Testing; run them before
opening a PR.
Related projects
| Project | What it is |
|---|---|
bteng |
The behaviour-tree engine — no runtime dependencies |
bteng-ros2 |
ROS 2 action, service, topic and condition base classes |
License
MIT — see LICENSE.
Metadata
Release files for bteng-moveit 0.2.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_moveit-0.2.0.tar.gz | 47.7 kB | Without provenance | Details for bteng_moveit-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bteng_moveit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for bteng_moveit-0.2.0-py3-none-any.whl |
Total release size: 97.8 kB
Release files / bteng_moveit-0.2.0.tar.gz
| Download URL | bteng_moveit-0.2.0.tar.gz |
|---|---|
| Size | 47.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c6fa350ba032ba621b78e4abd23c444e42e24c0026d0387577fd1e5790f8f59
|
|
BLAKE2b-256 checksum How to use checksums |
ea96d4834a1912dc5ab47a88bfff3004e568e9ebebef20f8538c63cc9b0163eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / bteng_moveit-0.2.0-py3-none-any.whl
| Download URL | bteng_moveit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 50.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8002fe010133b002c80a759ad092c5da3949d246f860aedcfbfa5401e7b3f6e6
|
|
BLAKE2b-256 checksum How to use checksums |
2e9a405dd83eb308ab72f626ca4f3f94715281353262bf634c447c69dfac4f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for bteng-moveit 0.2.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.