@YUUJI-INOUE
This is the setup I did for stable operation, please let me know if there are any mistakes.
Stinger (VOXL 2 Mini) VIO Setup Guide
This document provides instructions for setting up a stable VIO (Visual Inertial Odometry) environment on the ModalAI Stinger (equipped with VOXL 2 Mini).
It focuses on SDK version selection and correct configuration commands for the D0013 build to ensure reliable autonomous flight.
1. Prerequisites
- Drone: ModalAI Stinger (VOXL 2 Mini)
- Configuration ID: D0013 (Stinger V2)
- PC Environment: Linux/Ubuntu with ADB (Android Debug Bridge) installed
- Network: Internet connection required for the drone (via Wi-Fi) for
apt-getoperations
2. SDK Version Check and Installation
IMPORTANT: Development versions (Alpha/Beta) of the SDK may cause unstable VIO behavior. It is strongly recommended to use the Stable SDK 1.6.2.
2.1 Check Current Version
Connect to VOXL via ADB and check the version:
adb shell voxl-version
# OR
adb shell apt-cache policy voxl-suite
If you see versions like 1.6.3~alpha, you must downgrade.
2.2 Install SDK 1.6.2
Force install the stable version:
# Run inside VOXL shell or via adb shell
adb shell "DEBIAN_FRONTEND=noninteractive apt-get install -y voxl-suite=1.6.2"
2.3 Install Required Libraries
To fix dependency issues with OpenVINS in SDK 1.6.2, install the voxl-ceres-solver library (libceres.so.2
adb shell "apt-get install -y voxl-ceres-solver"
Note: Without this, voxl-open-vins-server will fail to start.
3. Factory Reset and Configuration
Apply the correct presets for Stinger (D0013). Using these commands is more reliable than manual configuration.
3.1 Configure Extrinsics
Load the camera and IMU geometry for Stinger V2 (D0013).
adb shell "voxl-configure-extrinsics D0013_Stinger_V2"
3.2 Configure Vision Hub
Configure how VIO data is sent to PX4 using the Stinger-specific preset.
adb shell "voxl-configure-vision-hub factory_enable_vfc_pos_back_flow_d0013"
3.3 Configure OpenVINS
Reset the VIO server configuration.
adb shell "voxl-configure-open-vins factory_enable"
3.4 Configure PX4 Parameters
Load optimized PID gains and flight parameters for Stinger (D0013).
adb shell "voxl-configure-px4-params -n -p MRB-D0013"
3.5 Enable VIO (Official Helper)
Load the official parameter helper file for indoor VIO flight without GPS.
adb shell "voxl-configure-px4-params -n -f /usr/share/modalai/px4_params/v1.14/EKF2_helpers/indoor_vio_missing_gps.params"
3.6 Configure ESCs
Upload Stinger-specific ESC parameters.
adb shell "/usr/bin/voxl-esc setup_d0013"
If you encounter invalid option errors, use the manual python script method:
adb shell "systemctl stop voxl-px4 && cd /usr/share/modalai/voxl-esc-tools/ && python3 voxl-esc-upload-params.py --params-file ../voxl-esc-params/D0013/lumenier_2305_2400kv_GF_D90_4S.xml && systemctl start voxl-px4"
3.7 Change ESC Mode (Critical)
Change ESC control from RPM mode (default) to Power mode to ensure reliable motor startup.
adb shell "px4-param set VOXL_ESC_MODE 0"
3.8 Motor Test
WARNING: REMOVE PROPELLERS BEFORE TESTING
Spin Motor 0 (Front Right) for 2 seconds to verify ESC communication.
adb shell "systemctl stop voxl-px4"
adb shell "cd /usr/share/modalai/voxl-esc-tools/ && python3 voxl-esc-spin.py --id 0 --power 15 --timeout 2 --skip-prompt True"
adb shell "systemctl start voxl-px4"
4. Advanced Optimization (Critical for Stability)
4.1 OpenVINS Optimization (Stinger Specific)
To prevent data corruption and initialization errors on Stinger (D0013):
- Disable
imu_body_frame_mode. - Change configuration folder to
fpv.
adb shell "sed -i 's/\"imu_body_frame_mode\":\ttrue/\"imu_body_frame_mode\":\tfalse/' /etc/modalai/voxl-open-vins-server.conf"
adb shell "sed -i 's/starling2/fpv/g' /etc/modalai/voxl-open-vins-server.conf"
4.2 Stabilize Connection After Reboot
Prevent voxl-vision-hub from starting before voxl-open-vins-server is ready by adding a 10-second delay.
Edit /etc/systemd/system/voxl-vision-hub.service:
adb shell "sed -i 's/After=voxl-wait-for-fs.service/After=voxl-wait-for-fs.service voxl-open-vins-server.service/' /etc/systemd/system/voxl-vision-hub.service"
adb shell "sed -i '/ExecStart=\/usr\/bin\/voxl-vision-hub/i ExecStartPre=\/bin\/sleep 10' /etc/systemd/system/voxl-vision-hub.service"
4.3 IMU Calibration
If VIO is unstable or the Web Portal Health Check shows "IMU Calibration Missing", perform calibration:
adb shell "voxl-calibrate-imu"
Follow the on-screen instructions to place the drone in 6 orientations.
5. Apply Changes and Reboot
After applying all settings, reboot the drone. A hard power cycle (unplug battery) is recommended to ensure all sensors reset correctly.
adb shell reboot
6. Verification
6.1 Check Services
adb shell voxl-inspect-services
Ensure voxl-open-vins-server, voxl-vision-hub, and voxl-px4 are Running.
6.2 Check VIO in VOXL Portal
Access the VOXL Portal (via IP address) and check the VIO (3D View):
- Orientation: Does the drone in the view verify Pitch/Roll/Yaw movements correctly?
- Position: Does the drone stay still in the view when the physical drone is stationary? (No drifting/divergence)
6.3 Check QGroundControl (QGC)
- Local Position: Is the drone icon visible on the map?
- Position Mode: Switch flight mode to Position. It should say "Ready to fly" or "Position mode enabled" (not "Rejected").
- If you can enter Position mode without GPS, VIO is working.
7. Operational Best Practices
- Power On: After plugging in the battery, leave the drone static on a level surface for ~30 seconds. This allows the gyro to calibrate biases and services to start.
- Initialize VIO: Pick up the drone and move it in a large figure-8 motion to excite the IMU and cameras.
- Pre-flight Check: Do not take off until you can successfully switch to Position mode in QGC.
- Note: If initialization fails (rarely), perform a reboot.
8. Troubleshooting
Q. Cannot enter Position Mode on the ground ("Not Ready")
A. Check the following:
- Run
voxl-inspect-pose vvhub_body_wrt_localto see if VIO data is streaming. - If no data, perform a hard reboot (battery pull) to fix timestamp sync issues.
- Set
en_voatofalseinvoxl-vision-hub.confto disable obstacle avoidance (can cause extrinsics errors). - Ensure
vio_pipeis set toov.
