# offboard mode in voxl m500

Source: https://forum.modalai.com/topic/110/offboard-mode-in-voxl-m500
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2021-01-23 06:09:19 UTC by mr TOKI
Replies: 9 · Views: 2014

## mr TOKI · 2021-01-23 06:09:19 UTC

Hello. 
I am just  wondering, in offboard mode there are any mode that difference than figure_eight ?? If not how I can write and add my own offboard mode to voxl m500. 
Thank you!!!

## Reply by Chad Sweet (ModalAI staff) · 2021-01-23 06:16:21 UTC

Yes, we have both [mavsdk](https://docs.modalai.com/mavsdk) and [mavros](https://docs.modalai.com/mavros) for programming the VOXL in offboard mode

## Reply by mr TOKI · 2021-01-23 08:42:24 UTC

Thanks for the fast reply. 
I want to use my own offboard mode so I change figure_eight in file config to OFF but when I tested QGC can't turn to offboard mode ??

## Reply by Chad Sweet (ModalAI staff) · 2021-01-23 19:11:30 UTC

The configuration depends on how you plan to program in offboard mode. The two modes we have documented are mavsdk and mavros.

To configure offboard mode for mavsdk, see documentation [here](https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk-cpp)

To configure offboard mode for mavros, see documentation [here](https://docs.modalai.com/mavros/#configure-voxl-vision-px4)

## Reply by mr TOKI · 2021-01-24 16:11:28 UTC

Hi, 
I still get some problem, first I change offboard_mode in config to OFF then I use my mavros file but it seem didn't work right. The UAV can only arm then disarm. when I check in Qgroundcontrol, I couldn't change to Offboard mode.I had tried again but it still didn't change. How to solve this problem?? 
Thank you

## Reply by modaltb (ModalAI staff) · 2021-01-24 17:45:59 UTC

Hi @mr-TOKI ,

Can you describe what your offboard setup is?  Are you using one of the examples above (e.g. MAVROS or MAVSDK?).

If you're running the program remotely through SSH like our examples, you can see what the output is like this for CPP --> https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk-cpp#run-example

Here's a video showing using python MAVSDK: https://www.youtube.com/watch?v=V3vVs8fEOZs

## Reply by mr TOKI · 2021-01-25 03:38:10 UTC

@modaltb I had been used MAVROS example but before that I change offboard_mode to OFF as this picture ![7e9e151b-1439-4d2e-9b24-96cbdd23924a-image.png](https://forum.modalai.com/assets/uploads/files/1611545816367-7e9e151b-1439-4d2e-9b24-96cbdd23924a-image.png)

## Reply by modaltb (ModalAI staff) · 2021-01-25 16:53:07 UTC

Hi @mr-TOKI ,

Yes agreed, in `voxl-vision-px4` you have setup to `off`.  So this means that the `voxl-vision-px4` program will not try to programmatically fly your m500.

So, I believe you are now trying to run the MAVROS example, there's a step through guide here: https://docs.modalai.com/mavros/

Have you got to this step?  https://docs.modalai.com/mavros/#test-mavros

What I'm  getting at is, you won't use QGC to tell the m500 to go into "offboard mode".   Your program will be responsible to do that.  QGC will give you status updates throughout though.

## Reply by mr TOKI · 2021-01-27 16:08:45 UTC (in reply to modaltb)

@modaltb said in [offboard mode in voxl m500](/post/444):
> l-vision-px4 program 

Oh I see, I had tried it worked with marvos, in offboard mode. But the altitude of voxl m500 was incorrect ![1.jpg](https://forum.modalai.com/assets/uploads/files/1611763141056-1.jpg) 
In my code, I set altitude is 0.3m and  QGC show exactly (in POSITION_TARGET_LOCAL_NED) but m500 flew up to 0.5m, and sometime it sliped from home_position. Do you have any solution ??

## Reply by modaltb (ModalAI staff) · 2021-01-28 03:25:08 UTC

@mr-TOKI ,

Are you taking off and trying to fly first to 0.3m?

Takeoff is a somewhat of a “jerky” maneuver.  You can imagine that the flight controller will begin respond quickly, but there are still some factors that could make a takeoff “vary” and thus not have an immediate perfect response.

Takeoff and then a halt at 30cm is pretty aggressive.
