# Gazebo Harmonic SITL External Pose Input drifts

**URL:** <https://discuss.px4.io/t/gazebo-harmonic-sitl-external-pose-input-drifts/45701>\
**Category:** PX4 Autopilot\
**Created:** [May 24, 2025, 2:44pm UTC](https://discuss.px4.io/t/gazebo-harmonic-sitl-external-pose-input-drifts/45701 "2025-05-24T14:44:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gi\_T](https://discuss.px4.io/user_avatar/discuss.px4.io/gi_t/32/17205_2.png) [@Gi\_T](https://discuss.px4.io/u/Gi_T)\
**Post date:** [May 24, 2025, 2:44pm UTC](https://discuss.px4.io/t/gazebo-harmonic-sitl-external-pose-input-drifts/45701/1 "2025-05-24T14:44:25Z")

</div>

I set up the PX4 simulation using the [​ROS 2 User Guide](https://docs.px4.io/main/en/ros2/user_guide.html#ros-2-user-guide) and [Gazebo Simulation guide](https://docs.px4.io/main/en/sim_gazebo_gz/index.html) and I was able to add my own sensors and fly via GPS without much problems but for both the `micro-xrce-dds-agent` and `mavros` I have problems feeding in a external position. When I feed in the Gazebo ground truth position via the odometry plugin though `/fmu/in/vehicle_visual_odometry` when using `micro-xrce-dds-agent` or `/mavros/vision_pose/pose` when using mavros I get huge drifts in position and orientation even though the input position is constant.

Note I followed [Using Vision or Motion Capture Systems for Position Estimation](https://docs.px4.io/main/en/ros/external_position_estimation.html) for setting the EKF2 parameter and for `micro-xrce-dds-agent` converted the input from FLU to FRD.

What would be a general approach for finding out the cause of the drift and afterwards tuning to ensure good performance?

---

<div class="post-metadata">

**Author:** ![Gi\_T](https://discuss.px4.io/user_avatar/discuss.px4.io/gi_t/32/17205_2.png) [@Gi\_T](https://discuss.px4.io/u/Gi_T)\
**Post date:** [July 28, 2025, 12:45pm UTC](https://discuss.px4.io/t/gazebo-harmonic-sitl-external-pose-input-drifts/45701/2 "2025-07-28T12:45:47Z")

</div>

Found the issue: [[Bug] Gazebo simulation not allowing for feeding in external odometry · Issue #25313 · PX4/PX4-Autopilot · GitHub](https://github.com/PX4/PX4-Autopilot/issues/25313)

---

<div class="post-metadata">

**Author:** ![system](https://discuss.px4.io/uploads/default/original/3X/7/3/73ce918bdcd64854de904f0c8d9ab70ca9723f2a.png) [@system](https://discuss.px4.io/u/system)\
**Post date:** [October 26, 2025, 12:46pm UTC](https://discuss.px4.io/t/gazebo-harmonic-sitl-external-pose-input-drifts/45701/3 "2025-10-26T12:46:18Z")

</div>

Closed on October 26, 2025, 12:46pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
