Main frames in the
maphas its origin at the flight controller initialization point and may be considered stationary. It is shown as a white grid on the image above;
base_linkis rigidly bound to the drone. It is shown by the simplified drone model on the image above;
bodyis bound to the drone, but its Z axis points up regardless of the drone's pitch and roll. It is shown by the red, blue and green lines in the illustration;
navigate_targetis bound to the current navigation target (as set by the navigate service);
terrainis bound to the floor at the current drone position (see the set_altitude service);
setpointis current position setpoint;
main_camera_opticalis the coordinate system, linked to the main camera;
Additional frames become available when ArUco positioning system is active:
Frames that are bound to the drone are oriented according to the ROS convention: the X axis points forward, Y to the left, and Z up.
3D visualization of the coordinate systems can be viewed using rviz.
Read more at http://wiki.ros.org/tf2
tf2 ROS package is used extensively in the Clover platform. tf2 is a set of libraries for C++, Python and other programming languages that are used to work with the frames. Internally, ROS nodes publish
TransformStamped messages to
/tf topic with transforms between frames at certain points in time.
simple_offboard node can be used to request the drone position in an arbitrary frame by setting the
frame_id argument appropriately in a call to
tf2 can be used from Python to transform coordinates (for objects like PoseStamped and PointStamped) from one frame to another