BumblebeeAS mission planner stack using py_trees.
Useful references:
To install py_trees:
sudo apt-get install \
ros-humble-py-trees \
ros-humble-py-trees-ros-interfaces \
ros-humble-py-trees-ros
The GUI debugging utility doesn’t exist for humble as of writing this. However, there exists a workaround to get a working installation as follows.
First install the dependencies:
sudo apt-get install \
libqt5webengine5 \
libqt5webenginewidgets5 \
python3-pyqt5.qtwebengine
Then clone the following ROS packages and colcon build.
git clone https://github.com/splintered-reality/py_trees_js.git
git clone https://github.com/splintered-reality/py_trees_ros_viewer.git
ros2 launch mission_planner_2 main.launch.py# Run main mission
ros2 run mission_planner_2 main.py
# Run test mission
ros2 run mission_planner_2 test.pySee py-trees-render.
See Mission Planner conventions for our conventions.
- Convenience API is located in
mission_planner_2/commons - Trees are written under
mission_planner_2/trees/<vehicle>/<mission> - Main executables are written under
scripts - Static transform configuration is defined in
cfg/cfg.yaml
The static transform configuration defines coordinate frame relationships for AUV4 competition tasks. This config is loaded by main.launch.py which launches a static_transform_publisher node for each transform defined.
- parent_frame_id: Reference frame
- child_frame_id: Target frame
- Translation: x, y, z in meters
- Rotation: roll, pitch, yaw in degrees
Front Camera
- While FACING the object:
- Origin is at the top left corner of the object
- +x is to the right
- +y is downwards
- +z is pointing into the object plane away from the camera (right hand rule)
- To align child frames with
base_link_nedof the AUV: apply rotation ofroll = -90, pitch = -90, yaw = 0degrees
Bottom Camera
- While bottom camera is facing the object, and AUV is aligned towards the front of the object:
- Origin is at the top left corner of the object
- +x is to the right
- +y is downwards
- +z is pointing into the object plane away from the camera, into the pool floor (right hand rule)
- To align child frames with
base_link_nedof the AUV: apply rotation ofroll = 0, pitch = 0, yaw = -90degrees
Important Note on Transform Direction: For a transform from frame A to frame B defined in the configuration, the inputted rotation
Given a point
- Translate back to origin by
$-t$ - Reverse the rotation by
$R^T$ - Thus
$f: A \to B$ is defined by$f(x) = R^T(x - t)$ - Inverting gives
$f^{-1}: B \to A$ defined by$f^{-1}(x) = Rx + t$
Key Takeaway: To retrieve transform data from this configuration, query the transform from the parent frame to the child frame, not the reverse.
- Create a new comment header for each task in
cfg/cfg.yaml - Define the transforms using the coordinate conventions above
- Visually verify the frames in Foxglove (handle extrinsic/intrinsic rotations carefully)