examples: add simulated vision position feed - #820
Conversation
2f48606 to
7e362d8
Compare
5fa5637 to
145905e
Compare
|
Thanks for the review Jonas! Just pushed a small update renaming |
julianoes
left a comment
There was a problem hiding this comment.
Good to be merged? The todos in the PR description aren't ticked, so I'm not so sure.
|
Hey Juliano, not yet. You are right that the description there was stale, thanks for flagging it. I just cleaned that up. This example is waiting on the fresh proto PR ( |
Convert simulator ground truth to a local NED frame and publish it through MAVSDK's vision-position API with configurable noise and delay. Fuse only the position fields supplied by the source, preserve EKF2_EV_CTRL, and leave flight control to a separate client.
fc98488 to
b73cd87
Compare
|
The upstream mocap dependencies have landed, so I completed the final validation pass and rebased this branch on current That pass found two correctness problems in the earlier example: it used PX4's estimated This is a substantive rewrite, so the earlier approval should not be treated as covering the new revision. The branch is now one commit, the local style/serialization checks listed in the description pass, and fresh CI is running. A new review would be appreciated when it completes. |
Summary
Adds a simulator-only example that feeds external-vision position data to PX4
through MAVSDK's Mocap plugin.
ground_truth()global position streamVISION_POSITION_ESTIMATEat 30 HzThe script does not arm, take off, change modes, or otherwise control the
vehicle. It saves and restores the existing
EKF2_EV_CTRLvalue.Measurement model
MAVSDK's simulator ground-truth stream provides independent position, but not
independent attitude or velocity. The example therefore sends position only.
It does not feed PX4's own EKF estimate back as a measurement, reinterpret NED
velocity as body-frame velocity, or enable yaw fusion without a yaw source.
VISION_POSITION_ESTIMATEis used because it is a documented PX4 NED inputthat matches the measurements available from this source. A real VIO or motion
capture integration should replace the simulator source and provide every
enabled measurement in its documented frame.
Delay
DELAY_MSdelays sample delivery. To evaluate EKF delay compensation, setEKF2_EV_DELAYaccordingly and reboot PX4 before running the example.Validation
ruff format --check --line-length=100 examplesruff check --select=ASYNC,RUF006,E,F --line-length=100 examplesruff check --select=PERF --line-length=100 .codespell .The branch is rebased on current
mainand contains one commit.