# OpenVINS Reinitializing Issue

Source: https://forum.modalai.com/topic/4159/openvins-reinitializing-issue
Category: Autonomy: VIO, Mapping and Navigation (https://forum.modalai.com/category/19/autonomy-vio-mapping-and-navigation)
Tags: vio
Posted: 2025-02-07 21:39:50 UTC by SKA
Replies: 6 · Views: 1774

## SKA · 2025-02-07 21:39:50 UTC

OpenVINS starts up as expected, then starts reinitializing repeatedly. The intrinsics and extrinsics are set up and working as expected with qvio. 
![57409f07-c5bd-43ae-bbcb-a3993dbd0da4-image.png](https://forum.modalai.com/assets/uploads/files/1738963771259-57409f07-c5bd-43ae-bbcb-a3993dbd0da4-image.png) 

Running voxl-open-vins-server -d,  I get the following:

```
====> Using EXTERNAL feature tracker <====
>>>>>>>>>> Current reference counts:
trackDB: 1
trackFEATS: 1
propagator: 2
updaterMSCKF: 1
updaterSLAM: 1
active_tracks_initializer: 1
initializer: 1
thread is locked to cores: 4 5 6 7
create_server_pipes
connecting client pipes
imu pipe name: imu_apps
Number of Cameras active: 1
Camera merge --- > ch: 1 to cam id: 0
Opening camera pipe: tracking
tmp_camera_pipe_names.push_back(): tracking
VFT connected
client "voxl-portal38440978" connected to overlay
[INFO] world : 1.000000 1.000000  (2)
FAILED TO FETCH IMG RINGBUF at time 0 -2 -2 -2 -2 -2
[THERMAL] Resume processing done
FAILED TO FETCH IMG RINGBUF at time 0 -2 -2 -2 -2 -2
[ERROR] In init too long, timeout, retry  RESET 5012286699
[ERROR] Triggered RESET type: 4
[INFO] restarting managers STATELESS
Set camera intrinsics and extrinsics
```

How can I get past the reinitializing issue and run OpenVINS?

## Reply by Cliff Wong (ModalAI staff) · 2025-02-09 20:46:26 UTC

Hi there, typically when OVINS is resetting constantly, that means there's no image stream or feature data being sent to it. Since we see a video the image stream is ok. 
You want to run in a adb shell:
a. ```cat /etc/modalai/voxl-open-vins-server.conf``` and confirm ```en_ext_feature_tracker:	true```
b. run voxl-inspect-services and ensure ```voxl-feature-tracker``` is running. You can also check voxl-portal and confirm a feature_overlay video feed is present.
c. then restart voxl-open-vins-server -d as you did above.
The drone should be on a level surface when ovins is initializing.

If that doesn't work, can you post your /etc/modalai/vio_cams.conf.

## Reply by SKA · 2025-02-10 14:58:15 UTC (in reply to Cliff Wong)

@Cliff-Wong Thanks for your response! I have ```en_ext_feature_tracker: true```. I tried running ```voxl-feature-tracker``` and it ended in a seg fault (included below). 

I also noticed that after running ```voxl-open-vins-server```, when I run ```voxl-inspect-services```, ```voxl-open-vins-server``` remains Disabled and Not Running even though the ov_overlay video stream is visible and updating, and the ```voxl-open-vins-server``` has not been quit. 
```
voxl2:~$ voxl-feature-tracker
=================================================================
num_features:                   30
en_blur:                                0
en_normalization:                       0
en_stereo_sync_ts:                      0
pixel_filter_size:                       2.000
pixel_search_radius:                    10.000
octave_search_radius:                    3.000
=================================================================
vio_cam config:
cam 0:
    enable:                1
    name:                  tracking
    pipe_for_preview:      tracking
    pipe_for_tracking:     tracking
    is_occluded_on_ground: 0
    imu:                   imu_apps
    is_extrinsic_present:  1
    extrinsic cam wrt imu:
    parent:                imu_apps
    child:                 tracking
    T_cam_wrt_imu:        -0.017  -0.016   0.015
    RPY_imu_to_cam:        0.0     0.0     0.0
    R_cam_to_imu:          1.000  -0.000   0.000
                           0.000   1.000  -0.000
                           0.000   0.000   1.000
    cal file:              opencv_tracking_intrinsics.yml
    is_cal_present:        1
    cam cal intrinsics:
    width:                 640
    height:                480
    fx:                    277.865
    fy:                    278.515
    cx:                    310.027
    cy:                    230.207
    n_coeffs:              4
    is_fisheye:            1
    D: -0.0091 0.0038 0.0082 -0.0059
=================================================================
thread is locked to cores: 0 1 2 3
cvp_set_pixel_search_radius: 10.000000
cvp_octave_search_radius: 3.000000
cvp_en_id_sort: true
opening pipe: tracking
Setup completed! Waiting for images...
Connected to cam 0 tracking
ERROR: Width/Height mismatch, optic flow w/h should be [640 400]                 , instead got [320 240]
ERROR getting cvp feature tracker handle
=========================================
created output pipes:
Feature Pipe: tracked_feats
Overlay Pipe: feature_tracker_overlay
=========================================
starting publisher thread

Segmentation fault:
Fault thread: voxl-feature-tr(tid: 4606)
Fault address: (nil)
Address not mapped.
Segmentation fault
```

Thanks for your help, let me know what you think! :)

## Reply by Cliff Wong (ModalAI staff) · 2025-02-12 22:36:51 UTC (in reply to SKA)

@SKA Can you post your output from running on the drone:
```voxl-version```?
As well as what aircraft model is this? (appears to be Sentinel?)

Older versions (pre Jan 2025) we may need to have yo run the ovins internal-mode tracker. Otherwise it maybe worth to upgrade to the latest SDK.

## Reply by SKA · 2025-02-18 19:35:29 UTC (in reply to Cliff Wong)

@Cliff-Wong Hi, thanks for your response! Here is the ouput of ```voxl-version```:
```
voxl2:~$ voxl-version
--------------------------------------------------------------------------------
system-image: 1.8.02-M0054-14.1a-perf
kernel:       #1 SMP PREEMPT Mon Nov 11 22:08:01 UTC 2024 4.19.125
--------------------------------------------------------------------------------
hw platform:  M0054
mach.var:     1.0.0
--------------------------------------------------------------------------------
voxl-suite:   1.4.1-202502092201
--------------------------------------------------------------------------------
Packages:
Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.4/binary-arm64/
Last Updated: 2025-02-10 20:13:48
List:
kernel-module-voxl-fsync-mod-4.19.125     1.0-r0
kernel-module-voxl-gpio-mod-4.19.125      1.0-r0
kernel-module-voxl-platform-mod-4.19.125  1.0-r0
libfc-sensor                              1.0.7
libmodal-cv                               0.5.16
libmodal-exposure                         0.1.3
libmodal-journal                          0.2.2
libmodal-json                             0.4.4
libmodal-pipe                             2.10.6
libqrb5165-io                             0.4.9
libvoxl-cci-direct                        0.2.5
libvoxl-cutils                            0.1.1
modalai-slpi                              1.1.19
mv-voxl                                   0.1-r0
qrb5165-bind                              0.1-r0
qrb5165-dfs-server                        0.2.0
qrb5165-imu-server                        1.1.2
qrb5165-rangefinder-server                0.1.4
qrb5165-slpi-test-sig                     01-r0
qrb5165-system-tweaks                     0.3.4
qrb5165-tflite                            2.8.0-2
voxl-bind-spektrum                        0.1.1
voxl-camera-calibration                   0.5.9
voxl-camera-server                        2.1.0
voxl-ceres-solver                         2:1.14.0-10
voxl-configurator                         0.9.7
voxl-cpu-monitor                          0.5.3
voxl-cross-template                       0.0.1
voxl-docker-support                       1.3.1
voxl-eigen3                               3.4.0
voxl-elrs                                 0.4.1
voxl-esc                                  1.5.1
voxl-feature-tracker                      0.5.2
voxl-flow-server                          0.3.6
voxl-fsync-mod                            1.0-r0
voxl-gphoto2-server                       0.0.10
voxl-gpio-mod                             1.0-r0
voxl-io-server                            0.0.4
voxl-jpeg-turbo                           2.1.3-6
voxl-lepton-server                        1.3.3
voxl-lepton-tracker                       0.0.4
voxl-libgphoto2                           0.0.4
voxl-libuvc                               1.0.7
voxl-logger                               0.4.9
voxl-mavcam-manager                       0.5.7
voxl-mavlink                              0.1.2
voxl-mavlink-server                       1.4.4
voxl-modem                                1.1.5
voxl-mongoose                             7.7.0-1
voxl-mpa-to-ros                           0.3.9
voxl-mpa-tools                            1.3.7
voxl-open-vins                            0.4.16
voxl-open-vins-server                     0.3.0
voxl-opencv                               4.5.5-2
voxl-osd                                  0.0.5
voxl-platform-mod                         1.0-r0
voxl-portal                               0.7.5
voxl-px4                                  1.14.0-2.0.94
voxl-px4-imu-server                       0.1.2
voxl-px4-params                           0.6.2
voxl-qvio-server                          1.1.1
voxl-remote-id                            0.0.9
voxl-reset-slpi                           0.0.1
voxl-state-estimator                      0.0.4
voxl-streamer                             0.7.5
voxl-suite                                1.4.1-202502092201
voxl-tag-detector                         0.0.4
voxl-tflite-server                        0.3.9
voxl-utils                                1.4.4
voxl-uvc-server                           0.1.7
voxl-vision-hub                           1.8.17
voxl-vtx                                  1.1.6
voxl2-io                                  0.0.3
voxl2-system-image                        1.8.02-r0
voxl2-wlan                                1.0-r0
--------------------------------------------------------------------------------
```

I've upgraded to the latest SDK. I'm not using an aircraft, I'm working with the voxl 2 board only, with a tracking fisheye ov7251 camera. The intrinsics and extrinsics are set up correctly, I was able to confirm this because qvio works well. 

I've traced back the error message 
```ERROR: Width/Height mismatch, optic flow w/h should be [640 400]                 , instead got [320 240]``` 
to ```voxl-feature-tracker/src/main.cpp``` line 650:
```cvp_tracker_vec[ch].init(ch, width, height);```

This leads back to ```mcv_cvp_feature_tracker_init``` from ```libmodal_cv``` which is closed source. 

How can I run the ovins internal-mode tracker? Let me know if you have any further ideas to help me get ovins working Thanks!

## Reply by SKA · 2025-02-19 21:14:41 UTC (in reply to SKA)

Looks like modalcv feature tracking is only set up for the ar0144 camera and not the ov7251 camera. Could you please extend feature tracking capability to other cameras? Is there any way I can do this on my end?

## Reply by Cliff Wong (ModalAI staff) · 2025-03-02 20:09:21 UTC (in reply to SKA)

@SKA Yes, VFT is actually deprecated in 1.4.1

Please replace your ovins config with [this and give it a try](https://drive.google.com/file/d/1-5SCqNSiCLwVjEhJiCDVY_L_HvUXFqz4/view?usp=drive_link):
