# Drone not moving in Offboard Mode

Source: https://forum.modalai.com/topic/3891/drone-not-moving-in-offboard-mode
Category: Autonomy: VIO, Mapping and Navigation (https://forum.modalai.com/category/19/autonomy-vio-mapping-and-navigation)
Tags: vio
Posted: 2024-10-28 12:10:41 UTC by Jetson Nano
Replies: 5 · Views: 1399

## Jetson Nano · 2024-10-28 12:10:41 UTC

I'm using a VOXL2 compute along with Flight Core V2 as external flight controller for development. I'm using the Starling 1 Image sensors.

Flight Controller: Flight Core V2
PX4 version: **v1.15.1 (Stable)**
Companion Computer: VOXL 2

The VOXL2 communicates with FC as mentioned in this [documentation](https://docs.modalai.com/voxl2-external-flight-controller/).

The drone holds based on PX4 EV parameter using tracking camera fusing with a Optical Flow with Rangefinder onboard. I'm able to see the odometry message being shown in mavlink console on QGC. Also, I try streaming the message 
```
mavlink stream -r 30 -s ODOMETRY -d /dev/ttyS1
```
In ```voxl-vision-hub``` I have set the mode to ```figure_eight```. But once, I switch to **offboard mode** from **position mode** the drone stays at the same place and does not perform figure 8.

Once I ssh into VOXL2, and check for ```mavlink status```, I get the following output without #331 ID ODOMETRY message

![Screenshot from 2024-10-27 15-05-32.png](https://forum.modalai.com/assets/uploads/files/1730117202867-screenshot-from-2024-10-27-15-05-32.png) 

For VIO inputs, I'm relying on Tracking camera from QVIO server. I'm not sure if VIO estimates from VOXL2 are being sent to FC. How can I troubleshoot to check for the ```ODOMETRY``` message to be passed on?

I'm working on this as a priority, so any suggestion will be quickly tested. I hope to hear from you.

## Reply by Zachary Lowell 0 · 2024-10-28 16:47:38 UTC

@Jetson-Nano said in [Drone not moving in Offboard Mode](/post/19463):
> mavlink stream -r 30 -s ODOMETRY -d /dev/ttyS1
> 

@Jetson-Nano why are you running a mavlink stream for ODOMETRY? Voxl-vision hub automatically handles the streaming of odometry into the flight core.

If you are able to fly it in position mode without a GPS and QVIO is enabled and Odometry is showing in the mavlink console, then the packets are most likely making it to the Flight Core - I would recommend though removing the Optical flow and Rangefinder to ensure that you are indeed getting odometry from qvio and not from the optical flow and rangefinder.

To confirm, can oyu please paste the paraemeters for voxl-vision-hub.conf as well as your parameters from QGC on efk2_ev*?

Thanks,
Zach

## Reply by Jetson Nano · 2024-10-29 17:05:16 UTC (in reply to Zachary Lowell 0)

@Zachary-Lowell-0 Thanks for reverting back. Earlier I was using a different flight controller with the similar system setup. When I had faced this issue, I was mentioned to run the seperate odometry stream command. 

Sharing that post for your ref. [link](https://forum.modalai.com/topic/3528/drone-losing-position-crashing-in-offboard-mode/2).

Parameters I have set for ```voxl-vision-hub```

```
        "config_file_version":  1,
        "en_localhost_mavlink_udp":     true,
        "localhost_udp_port_number":    14551,
        "en_vio":       true,
        "vio_pipe":     "qvio",
        "secondary_vio_pipe":   "ov",
        "en_reset_vio_if_initialized_inverted": true,
        "vio_warmup_s": 3,
        "send_odom_while_failed":       true,
        "horizon_cal_tolerance":        0.5,
        "offboard_mode":        "figure_eight",
        "follow_tag_id":        0,
        "figure_eight_move_home":       true,
        "robot_radius": 0.300000011920929,
        "collision_sampling_dt":        0.1,
        "max_lookahead_distance":       1,
        "backtrack_seconds":    5,
        "wps_move_home":        true,
        "wps_stride":   0,
        "wps_timeout":  0,
        "wps_damp":     1,
        "en_tag_fixed_frame":   false,
        "fixed_frame_filter_len":       5,
        "en_transform_mavlink_pos_setpoints_from_fixed_frame":  true,
        "en_voa":       true,
        "voa_upper_bound_m":    -0.15000000596046448,
        "voa_lower_bound_m":    0.15000000596046448,
        "voa_voa_memory_s":     1,
        "voa_max_pc_per_fusion":        100,
        "voa_pie_max_dist_m":   20,
        "voa_pie_min_dist_m":   0.25,
        "voa_pie_under_trim_m": 1,
        "voa_pie_threshold":    3,
        "voa_send_rate_hz":     20,
        "voa_pie_slices":       36,
        "voa_pie_bin_depth_m":  0.15000000596046448,
        "voa_inputs":   [{

```

The PX4 parameters in QGC for EKF2_EV_CTRL,

![Screenshot from 2024-10-29 22-32-56.png](https://forum.modalai.com/assets/uploads/files/1730221495570-screenshot-from-2024-10-29-22-32-56.png)

## Reply by Jetson Nano · 2024-10-31 02:49:36 UTC (in reply to Jetson Nano)

Hello @Eric-Katzfey @Zachary-Lowell-0 @James-Strawson @tom 

Could you look into once?

## Reply by Jetson Nano · 2024-11-12 17:43:56 UTC (in reply to Jetson Nano)

@Zachary-Lowell-0 @Alex-Kushleyev @Eric-Katzfey @tom Could you look into this please?

## Reply by Eric Katzfey (ModalAI staff) · 2024-11-19 16:46:53 UTC (in reply to Jetson Nano)

@Jetson-Nano As suggested before, can you disable the rangefinder and optic flow and see if things work with VIO alone?
