VOXL Vision PX4 Installation

Voxl Vision PX4 and its dependencies are installed as part of the VOXL Software Bundle.

Table of contents

  1. Configuration Script
  2. Configuration File
  3. Next Steps

Configuration Script

After installation, VOXL Vision PX4 just needs to be configured with the voxl-configure-vision-px4 script. This will also enable and start the associated systemd service. This script also calls voxl-configure-cameras and voxl-configure-modalai-vl to configure its dependencies.

yocto:/# voxl-configure-vision-px4 -h
General Usage:
voxl-configure-vision-px4

To perform factory configuration for VOXL Flight Deck
voxl-configure-vision-px4 -f

show this help message:
voxl-configure-vision-px4 -h
yocto:/# voxl-configure-vision-px4

Which camera configuration are you using?
1 Tracking + Stereo (default)
2 Tracking Only
3 Hires + Stereo + Tracking
4 Hires + Tracking
5 TOF + Tracking
6 Hires + TOF + Tracking
7 TOF + Stereo + Tracking
8 None

1
attempting to use camera configuration 1
adding override_cam_id value=0 to /etc/snav/camera.downward.xml
adding override_cam_id value=1 to /etc/snav/camera.stereo.xml

Which physical configuration is this for?
This step is purely to define the relationship between VOXL's IMU and tracking camera.

1) voxl_tray                 4) ModalAI_M500_and_Flight_Deck
2) voxlcam_upright_tracking_cam      5) ModalAI_seeker
3) voxlcam_upside_down_tracking_cam  6) Inspired_Flight_IF750
#? 4

How far off the ground is the tracking camera?
This is a rough number to help VIO initialize, not critical.
Pick whichever option is closest to your platform.
If you REALLY want to enter a custom value, pick the closest value for now
and see https://docs.modalai.com/modalai-vision-lib/ for more details.

1) 2.5cm_dragonfly   3) 10cm_M500_short_legs  5) 28cm_IF750
2) 4cm_seeker        4) 19cm_M500_tall_legs   6) not_applicable
#? 1
reloading systemd services
disabling all the snav services
Warning: snav_dronecontroller.service changed on disk. Run 'systemctl daemon-reload' to reload units.
starting imu_app
DONE configuring ModalAI Vision Lib

Now we are going to do a preliminary configuration of /etc/modalai/voxl-vision-px4.conf

Which IP address is your QGroundStation at?
just press enter to leave this option as-is


Do you want to enable Visual Inertial Odometry (VIO)?
1) yes
2) no
#? 1
VIO enabled, make sure EKF2_AID_MASK and EKF2_HGT_MODE are set
to enable vision in PX4. Press enter to continue.


Do you want to enable stereo cameras and visual obstacle avoidance?
1) yes
2) no
#? 2

Do you want to enable voxl-vision-px4 to command PX4
to fly a figure eight path when flipped into offboard mode?
Don't enable this if you intend to do your own offboard
control via MAVROS or similar.
1) yes
2) no
#? 1
enabling voxl-vision-px4 systemd service
starting voxl-vision-px4 systemd service
DONE configuring voxl-vision-px4

Configuration File

Based on your answers to the last three questions of the installation procedure, voxl-vision-px4’s primary three features should be set up. From here you can further configure its settings by editing the config file /etc/modalai/voxl-vision-px4.conf

yocto:/# cat /etc/modalai/voxl-vision-px4.conf
{
    "qgc_ip":   "192.168.8.60",
    "en_secondary_qgc": false,
    "secondary_qgc_ip": "127.0.0.1",
    "en_vio":   true,
    "en_voa":   false,
    "en_send_vio_to_qgc":   false,
    "en_send_voa_to_qgc":   false,
    "en_mvl_video_stream":  false,
    "en_adsb":  false,
    "adsb_uart_bus":    7,
    "adsb_uart_baudrate":   57600,
    "en_offboard_figure_eight":  true,
    "vio_to_ned_rotation_matrix":   [[0, 1, 0], [1, 0, 0], [0, 0, -1]]
}

For example, you may wish to turn on en_send_vio_to_qgc en_send_voa_to_qgc so you can debug these features through qGroundControl.

Next Steps

For for information on configuring and using voxl-vision-px4, continue to the features page.