VISION_POSITION_ESTIMATE rate (no-GPS Quadcopter). No local position output in MAVROS

I’m trying to use vision_position_estimate by publishing external pose data to /mavros/vision_pose/pose. The topic is being published at ~25 (on ros2 topic hz). In MAVlink inspector, vision_position_estimate is around 15Hz and local_pos_ned is barely 1Hz. Would that cause any issue? I’m using EK3 on ardupilot

Even though I’m getting vision position estimate and local_pos_ned messages in MAVLink Inspector, the /mavros/local_position/ or /mavros/odometry topic isn’t being published.

Through my lit survey, EKF is probably not fusing the vision data properly and that’s why ~1Hz of local_pos_ned in mavlink inspector. But I can’t figure out how to fix it.

My setup includes – Jetson Orin Nano, Zed2i camera - zed-ros2-wrapper for mapping and pose tracking, mavros, a ros2 node that transforms the odom data from zed to mavros’ odom frame (ENU), ros2 humble and Ardupilot on Cube Orange FCU.

Please guide on what could be done

Update: I just set a stream rate through mavros service call -

ros2 service call /mavros/set_stream_rate mavros_msgs/srv/StreamRate “{stream_id: 0, message_rate: 20, on_off: true}”

and I’m now getting the local_position/pose published at ~45Hz.
But as I do this, mavros throws the warning - No GPS fix

I’ve tried setting the home through QGC but it doesn’t work it just fails. What could be the problem?

I am just guessing, maybe you also like to share the UA side parameters set.

From these few examples, Luxonis OAK-D, Intel RealSense T265, GPS / Non-GPS Transitions, Using a Vicon indoor positioning system, there are some specify settings.

Yeah, sure, here are the parameters I’m using for now –

Setting EK3_SRC1_VELXY and EK3_SRC1_VELZ to 6 doesn’t make any difference since I only publish pose data at /mavros/vision_pose/pose. However, I’ve set EK3_SRC1_YAW to 6 since my pose contains orientation as well.

Also, sorry for the old misinterpreting heading above; I’m getting local position now. Though I can’t set an EKF origin and so the Quadcopter doesn’t takeoff.

How are you trying to set the EKF origin?

When there is no GPS, Ardupilot expects a SET_GPS_GLOBAL_ORIGIN message (Despite the DEPRECATED warning, the msg #48 is still valid).

You can do it from Mission Planner: right-click on the map and “Set EKF Origin Here”.

Alternatively, you can send the same message from a custom script using pymavlink or MAVROS.

1 Like

For some reason, setting origin through QGC or MP still doesn’t work but thankfully publishing a SET_GPS_GLOBAL_ORIGIN message through mavros works. I had tested this weeks back although forgot about mentioning it here.

Thank you to everyone for their help.

did u achieved position estimate using zed2i if yes help me also

yeah, it’s working for me now.

I will try to help, elaborate on your situation -
hardware / software you’re using and at what point are you stuck, etc. I’m also new to the space so don’t expect much…
you can dm/email me if you want.

1 Like

Project Goal:
I am working on a fully autonomous indoor drone project where GPS is not available. My goal is to use the ZED 2i stereo camera for vision-based odometry and position estimation, and to integrate this with ArduPilot (Pixhawk 2.4.8) for non-GPS navigation.

Current Hardware/Software Setup:

  • ZED 2i Stereo Camera (downward facing)
  • Jetson Orin Nano 8GB (companion computer)
  • Pixhawk 2.4.8 (flight controller running ArduPilot)
  • ROS 2 Humble running on Jetson
  • MAVROS for communication between ROS and ArduPilot
  • ZED ROS2 Wrapper for camera integration

What I’ve Done So Far:

  • ZED 2i is publishing pose data via /zed2i/zed_node/pose
  • MAVROS is set up and connected (communication between Jetson and Pixhawk is working)
  • Attempting to relay ZED odometry/velocity to /mavros/vision_pose/pose and /mavros/vision_speed/speed_twist

What I Need Help With:

  1. Best Practices:
    How should I correctly fuse the ZED2i VIO data with ArduPilot for reliable position control?
  • Is publishing to /mavros/vision_pose/pose and /mavros/vision_speed/speed_twist sufficient?
  • What parameters must be set in ArduPilot (EKF3, VISO, etc.) for external vision navigation?
  • Should I use only ZED2i, or combine with optical flow and lidar for better accuracy?
  1. Frame Alignment:
    What is the correct coordinate frame and orientation setup for the ZED2i camera with respect to the drone and ArduPilot’s NED convention?
  2. Parameter Tuning:
  • Which specific parameters need to be tuned on both ArduPilot and MAVROS for vision-only navigation?
  • Any recommended values for EKF, vision fusion, and VISO parameters?
  1. Common Issues:
  • How to debug if pose/velocity data is not being accepted/fused by ArduPilot?
  • Any troubleshooting tips for zero velocity readings or unstable position hold?
  1. Reference Resources:
  • Are there any example projects or detailed documentation for using ZED2i as a VIO source with ArduPilot (similar to Intel T265 guides)?

Any help, suggestions, working examples, or relevant documentation links would be greatly appreciated!
Thanks in advance for your support.

It’s great to hear you’re working on the same stack as us. Just curious, is this related to the ISRO IRoC competition by any chance? If yes, would you like to connect?

In my case, I’m using a ROS2 node that republishes the pose data at zed/zed_node/odom (in odom frame) to mavros/vision_pose/pose after transforming it into map frame.
Our camera is placed in a way that the map frame has the same orientation as the ROS ENU frame (body ENU since no GPS); hence, I chose to convert and use pose data in that format since MAVROS expects you to publish data in the ENU frame. MAVROS always handles the conversion from ENU to NED, you needn’t publish in NED.
You can transform your data into mavros’ odom frame (ENU) and you’ll be good to go.

Also, you should change zed_wrapper’s map and odom frame names in common_stereo.yaml so that they differ from the ones default in MAVROS.

And it’s necessary to set a stream rate for MAVROS to get the topics like local_position published.

I haven’t tried publishing the twist data, so I don’t know how much it adds to the accuracy. I just conjectured that the ZED’s velocity data would have decent noise, so I didn’t consider using it. I’ll try that and let you know.

I’m using EK3 for vision. Even though the depth data from ZED is quite good, since we had a spare optical flow, we figured using its rangefinder for the Quadcopter’s z (height) as it’s more reliable.

I don’t know much about debugging ArduPilot stuff, but you can pretty much do it all in the MAVLINK Inspector. If you get the VISION_POSE_ESTIMATE message at ~10-15 Hz, then that’s good. You should get LOCAL_POS_NED if EKF is working properly, the freq was quite less for me (<2 Hz) but it didn’t cause any issue. There’s also EKF_STATUS_REPORT having a flag value which can be referred to check if things are okay, it’s a bit mask representing states, I was getting 831, which represents everything’s okay.

I didn’t see any relevant documentation specific to this configuration, though you can always refer to any of the VIO examples with T265, just use EK3.

I’m currently building this indoor drone project as a personal hobby, with a vision to eventually solve real-world problems in factory environments and similar settings.

I’d really appreciate the opportunity to connect with like-minded individuals and experienced professionals like yourself. If you’re open to it, please feel free to share your contact email — I’d love to stay in touch and learn from your insights.

Also, I’m curious to know more about your drone setup. Are you using the ZED 2i for navigation? How stable and reliable is the drone in your experience? is it stable enough ?
and since you mentioned about optical flow, i wanted to ask if you used it as the velocity xy src1 or src2 or rather used it in another way?