# ArduSub Visual Odometry

**URL:** <https://discuss.bluerobotics.com/t/ardusub-visual-odometry/12870>\
**Category:** ArduSub\
**Tags:** positioning\
**Created:** [September 6, 2022, 1:02pm UTC](https://discuss.bluerobotics.com/t/ardusub-visual-odometry/12870 "2022-09-06T13:02:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mark](https://discuss.bluerobotics.com/u/mark)\
**Post date:** [September 6, 2022, 1:02pm UTC](https://discuss.bluerobotics.com/t/ardusub-visual-odometry/12870/1 "2022-09-06T13:02:41Z")

</div>

Elliot,  
I would like to jump in here, as your statement below got my attention

> [@Pymavlink SET\_POSITION\_TARGET with velocity](https://discuss.bluerobotics.com/t/pymavlink-set-position-target-with-velocity/12839/8):
>
> If you try to run ArduCopter without a GPS or other form of positioning (e.g. visual odometry) you will not be able to do position control.

Is there a way, presently, to use Visual Odometry in Ardu-Sub, or any other Ardupilot version? This is a mode which I am investigating for our implementation, and if there is any code that is already performing this task, it would be of great value to me.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [September 6, 2022, 3:04pm UTC](https://discuss.bluerobotics.com/t/ardusub-visual-odometry/12870/2 "2022-09-06T15:04:03Z")

</div>

Hi @mark,

I’ve moved this to its own topic to facilitate cleaner discussion.

> [@Pymavlink SET\_POSITION\_TARGET with velocity](https://discuss.bluerobotics.com/t/pymavlink-set-position-target-with-velocity/12839/12):
>
> Is there a way, presently, to use Visual Odometry in Ardu-Sub, or any other Ardupilot version?

ArduSub 4.1 introduced support for some [VISO Parameters](https://ardupilot.org/copter/docs/parameters-Copter-stable-V4.1.5.html#viso-parameters) and [visual odometry MAVLink messages](https://mavlink.io/en/messages/common.html#VISION_POSITION_ESTIMATE). We’re working on properly documenting those for ArduSub, but haven’t yet completed those updated docs.

That said, our [Water Linked DVL BlueOS extension](https://github.com/bluerobotics/BlueOS-Water-Linked-DVL) is already using those features (and so was the DVL integration in the old Companion Software). It’s likely not the greatest reference at the moment, both because

- it uses a somewhat roundabout route via MAVLink2Rest instead of a direct MAVLink library, and because
- it’s [currently undergoing a significant overhaul](https://github.com/bluerobotics/BlueOS-Water-Linked-DVL/pull/11),

but it is at least some form of reference.

Be aware that ArduPilot has some somewhat unintuitive origin behaviour/terminology, so I’d suggest you have a read of [this issue](https://github.com/bluerobotics/BlueOS-Water-Linked-DVL/issues/8#issue-1284507050) (and the linked discussion) for some extra context. That has been taken into account in the overhaul, but was not handled previously (instead it just limited position correction / origin setting to once on startup).

If you’re not pressed for time then I’ll hopefully get a chance to document that side of things a bit more directly some time this month, but feel free to poke around and ask questions in the meantime 🙂

---

<div class="post-metadata">

**Author:** ![mark](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mark](https://discuss.bluerobotics.com/u/mark)\
**Post date:** [September 6, 2022, 5:26pm UTC](https://discuss.bluerobotics.com/t/ardusub-visual-odometry/12870/3 "2022-09-06T17:26:09Z")

</div>

Eliot,

This is good news, thanks for the help.

I will look into the docs you pointed to.

Mark

![~WRD000.jpg](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/5/52d5f1c08649212fe6768d2cacdcf8df711810d9.jpeg)
