Hi Team,
I’m using the ZED 2i camera with ROS 2 (Humble) for an autonomous drone project (ArduPilot + MAVROS), and I need help aligning the camera’s coordinate frames and orientation with the drone’s NED frame.
The camera is mounted facing downward, and I want to ensure that the pose, velocity, and IMU orientation data correctly reflect the drone’s movement.
Objective: Align ZED Pose with Drone’s NED Frame
I want the following physical orientation of the camera to reflect in the pose data:
+Z → movement in the direction the lens is facing (i.e., downward)
+X → toward the top flat side of the camera (aligned with drone forward/nose)
+Y → toward the right side of the camera
Questions:
- Roll/Pitch/Yaw Calculation
How is roll, pitch, and yaw calculated internally in the ZED 2i (from IMU or VIO)?
Is it relative to the IMU orientation, lens direction, or some fixed reference?
When the camera is facing forward, yaw is stable and I see no compass variance.
But when the camera is facing downward, I get compass variance errors in Mission Planner.
Why does this happen?
How do I correct the yaw or IMU mismatch in this case?
- Coordinate System Selection
I modified zed_components_main.cpp to use right-handed Z-up, X-forward.
Is this frame setting suitable for a downward-facing ZED 2i with a drone using NED (X-forward, Y-right, Z-down)?
Or should I stick with the default coordinate frame, or use a different setting?
- Goal Orientation for Downward Camera
As stated above, I want this frame alignment:
Lens facing downward → +Z
Camera’s top flat side (facing drone forward) → +X
Camera’s right side → +Y
How can I achieve this alignment?
Should I apply a static transform between zed_camera_center and base_link?
If yes, what are the exact rotation values (Euler or quaternion)?
Will this also affect the orientation data (roll/pitch/yaw) or just remap the axes?
Do I also need to apply a TF to the IMU frame (if it’s misaligned)?
Should I modify internal ZED wrapper config (like base_frame, map_frame, etc.)?
- Pose Topic + Timestamping for MAVROS
Which topic contains the fused VIO + IMU pose for use with MAVROS?
Is /zed2i/zed_node/pose the right one to forward to /mavros/vision_pose/pose?
For publishing pose and velocity to MAVROS:
/mavros/vision_pose/pose
/mavros/vision_speed/speed_twist
Which timestamp should I use?
The one from the ZED message header?
Or rclcpp::now()?
Final Goal:
I want to ensure that with the ZED 2i mounted downward, the pose and IMU orientation are correctly aligned to the drone’s NED frame, with no compass variance or yaw issues, and that data published to MAVROS reflects accurate, synchronized vision-based navigation.
Would appreciate any help, suggested transforms, settings, or frame recommendations!
this is how the camera has been mounted.
this image is the down side of the camera and the yellow colour higligther points the nose of the drone