Skip to content

Commit 37ae114

Browse files
committed
Add simple README.
1 parent adf5cef commit 37ae114

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

python_examples/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1. Ensure that BehaviorTree.CPP is build with `BTCPP_PYTHON=ON`.
2+
2. Add the build directory containing the `btpy_cpp.*.so` Python extension to
3+
your `PYTHONPATH`.
4+
3. Run an example, e.g. `python3 ex01_sample.py`

python_examples/ex01_sample.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
#!/usr/bin/env python3
22

33
"""
4-
Demo adapted from [1].
5-
6-
To run, ensure that the `btpy_cpp` Python extension is on your `PYTHONPATH`
7-
variable. It is probably located in your build directory if you're building from
8-
source.
9-
10-
[1]: https://github.com/BehaviorTree/btcpp_sample
4+
Demo adapted from [btcpp_sample](https://github.com/BehaviorTree/btcpp_sample).
115
"""
126

137
from btpy import BehaviorTreeFactory, SyncActionNode, NodeStatus, ports

python_examples/ex02_generic_data.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
"""
44
Demonstration of passing generic data between nodes.
5-
6-
To run, ensure that the `btpy_cpp` Python extension is on your `PYTHONPATH`
7-
variable. It is probably located in your build directory if you're building from
8-
source.
95
"""
106

117
import numpy as np

python_examples/ex03_stateful_nodes.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
"""
44
Demonstration of stateful action nodes.
5-
6-
To run, ensure that the `btpy_cpp` Python extension is on your `PYTHONPATH`
7-
variable. It is probably located in your build directory if you're building from
8-
source.
95
"""
106

117
import numpy as np

python_examples/ex04_ros_interop.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#!/usr/bin/env python3
22

33
"""
4-
Demonstration of stateful action nodes.
5-
6-
To run, ensure that the `btpy_cpp` Python extension is on your `PYTHONPATH`
7-
variable. It is probably located in your build directory if you're building from
8-
source.
4+
Demonstrates interop of BehaviorTree.CPP Python bindings and ROS2 via rclpy.
95
"""
106

117
import rclpy

0 commit comments

Comments
 (0)