ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    OV with External Autopilot

    GPS-denied Navigation (VIO)
    3
    12
    185
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SKA
      last edited by

      Hi! I'm trying to use voxl-vision-hub to send voxl-open-vins position data to an external autopilot (ardupilot). I start by making sure the following services are running:

      • voxl-imu-server
      • voxl-open-vins-server
      • voxl-camera-server
      • voxl-vision-hub
      • voxl-mavlink-server

      I can confirm that the voxl and external autopilot are connected because I see this on Mission Planner MAVLink Inspector:
      08eeced5-7632-4b4f-8dde-982d2a9ebad4-image.png

      and the debug output I see after running voxl-vision-hub -d is:

      voxl2-mini:~$ voxl-vision-hub -d
      Enabling recv debugging for localhost UDP port from ROS
      loading our own config file
      =================================================================
      Parameters as loaded from config file:
      config_file_version:        1
      
      MAVROS / MAVSDK
      en_localhost_mavlink_udp    1
      localhost_udp_port_number:  14551
      
      VIO
      en_vio:                     1
      vio_pipe:                   ov
      secondary_vio_pipe:         qvio
      en_reset_vio_if_initialized_inverted: 0
      vio_warmup_s:               0.000000
      send_odom_while_failed:     1
      
      MISC FEATURES
      horizon_cal_tolerance:      0.500000
      en_hitl:                    0
      OFFBOARD MODE
      offboard_mode:              off
      follow_tag_id:              0
      figure_eight_move_home:     1
      wps_move_home:     1
      wps_timeout:     0.000000
      wps_damp:     1.000000
      robot_radius:               0.300000
      collision_sampling_dt:      0.100000
      max_lookahead_distance:     1.000000
      backtrack_seconds     :     60
      backtrack_rc_chan     :     8
      backtrack_rc_thresh   :     1500
      FIXED FRAME RELOCALIZATION
      en_tag_fixed_frame:         0
      fixed_frame_filter_len:     5
      en_transform_mavlink_pos_setpoints_from_fixed_frame:0
      
      VOXL FLIGHT CONTROLLER (VFC)
      vfc_rate                    100.000000
      vfc_rc_chan_min             980
      vfc_rc_chan_max             2020
      vfc_thrust_ch               3
      vfc_roll_ch                 1
      vfc_pitch_ch                2
      vfc_yaw_ch                  4
      vfc_submode_ch              6
      vfc_alt_mode_rc_min         0
      vfc_alt_mode_rc_max         0
      vfc_flow_mode_rc_min        0
      vfc_flow_mode_rc_max        0
      vfc_hybrid_flow_mode_rc_min 0
      vfc_hybrid_flow_mode_rc_max 0
      vfc_position_mode_rc_min    0
      vfc_position_mode_rc_max    2100
      vfc_traj_mode_rc_min        0
      vfc_traj_mode_rc_max        0
      vfc_yaw_deadband            30
      vfc_vxy_deadband            50
      vfc_vz_deadband             150
      vfc_min_thrust              0.000000
      vfc_max_thrust              0.800000
      vfc_tilt_max                0.436000
      vfc_yaw_rate_max            3.000000
      vfc_thrust_hover            0.500000
      vfc_vz_max                  1.000000
      vfc_kp_z                    5.290000
      vfc_kd_z                    5.980000
      vfc_vxy_max                 3.000000
      vfc_kp_xy                   0.640000
      vfc_kd_xy                   2.560000
      vfc_kp_z_vio                5.290000
      vfc_kd_z_vio                5.980000
      vfc_kp_xy_vio               3.240000
      vfc_kd_xy_vio               3.960000
      vfc_w_filt_xy_vio           10.000000
      vfc_vel_ff_factor_vio       0.900000
      vfc_xy_acc_limit_vio        2.500000
      vfc_max_z_delta             3.000000
      vfc_att_transition_time     0.500000
      vfc_stick_move_threshold    30.000000
      vfc_flow_transition_time    1.000000
      vfc_q_min                   10
      vfc_points_min              7
      vfc_en_submode_announcement 1
      vfc_disable_fallback        0
      
      COLLISION PREVENTION (VOA)
      en_voa:                     0
      voa_upper_bound_m:          -0.150000
      voa_lower_bound_m:          0.150000
      voa_memory_s:               1.000000
      voa_max_pc_per_fusion:      100
      voa_pie_min_dist_m:         0.250000
      voa_pie_max_dist_m:         20.000000
      voa_pie_under_trim_m:       1.000000
      voa_pie_threshold:          3
      voa_pie_slices:             36
      voa_pie_bin_depth_m:        0.150000
      voa_send_rate_hz:           20.000000
      
      voa_input #0
          enabled:            0
          type:               point_cloud
          input_pipe:         dfs_point_cloud
          frame:              stereo_l
          max_depth:          8.000000
          min_depth:          0.300000
          cell_size:          0.080000
          threshold:          4
          x_fov_deg:          68.000000
          y_fov_deg:          56.000000
          conf_cutoff:        0
      voa_input #1
          enabled:            0
          type:               point_cloud
          input_pipe:         stereo_front_pc
          frame:              stereo_front_l
          max_depth:          8.000000
          min_depth:          0.300000
          cell_size:          0.080000
          threshold:          4
          x_fov_deg:          68.000000
          y_fov_deg:          56.000000
          conf_cutoff:        0
      voa_input #2
          enabled:            0
          type:               point_cloud
          input_pipe:         stereo_rear_pc
          frame:              stereo_rear_l
          max_depth:          8.000000
          min_depth:          0.300000
          cell_size:          0.080000
          threshold:          4
          x_fov_deg:          68.000000
          y_fov_deg:          56.000000
          conf_cutoff:        0
      voa_input #3
          enabled:            0
          type:               tof
          input_pipe:         tof
          frame:              tof
          max_depth:          6.000000
          min_depth:          0.150000
          cell_size:          0.080000
          threshold:          3
          x_fov_deg:          106.500000
          y_fov_deg:          85.099998
          conf_cutoff:        125
      voa_input #4
          enabled:            0
          type:               rangefinder
          input_pipe:         rangefinders
          frame:              body
          max_depth:          8.000000
          min_depth:          0.300000
          cell_size:          0.080000
          threshold:          4
          x_fov_deg:          68.000000
          y_fov_deg:          56.000000
          conf_cutoff:        0
      =================================================================
      loading extrinsics config file
      loading horizon cal file
      starting geometry module
      starting autopilot monitor
      starting mavlink IO
      Waiting to connect to voxl-mavlink-server
      Connected to voxl-mavlink-server
      starting mavlink for ros
      starting fixed pose input
      starting vio manager
      Connected to VIO pipe: ov
      Geometry module updating to use imu: imu_apps for VIO
      new T imu wrt body:
       0.0407  -0.0060  -0.0188
      new R imu to body:
       1.0000  -0.0000   0.0000
       0.0000   1.0000  -0.0000
       0.0000   0.0000   1.0000
      done updating transforms to use imu: imu_apps
      starting tag manager
      starting horizon cal module
      starting imu manager
      starting state manager
      Init complete
      from AP msgid:   0 sysid:  1 compid:  1
      Detected Autopilot Mavlink SYSID 1
      requesting autopilot_version
      from AP msgid:   0 sysid:  1 compid:  1
      requesting autopilot_version
      from AP msgid:  77 sysid:  1 compid:  1
      from AP msgid:  77 sysid:  1 compid:  1
      from AP msgid: 148 sysid:  1 compid:  1
      Detected autopilot version: 4.5.5
      from AP msgid:   0 sysid:  1 compid:  1
      from AP msgid:   0 sysid:  1 compid:  1
      from AP msgid:  22 sysid:  1 compid:  1
      

      It seems like other than the heartbeat, no data is being sent to the external autopilot. Thanks in advance for any guidance that can help me sort this out!

      tomT 1 Reply Last reply Reply Quote 0
      • tomT
        tom admin @SKA
        last edited by

        @SKA I would review this page if you haven't already: https://docs.modalai.com/voxl2-external-flight-controller/

        S 1 Reply Last reply Reply Quote 0
        • S
          SKA @tom
          last edited by SKA

          @tom Thanks! I referred to this page in order to set up what I have right now.
          My voxl 2 mini is connected to the external autopilot using the one exposed UART. It seems to be connected fine, since I'm receiving the voxl heartbeat on the autopilot end, and I'm receiving autopilot mavlink messages on the voxl side.

          I wonder if there is anything I might be missing on the voxl-vision-hub side, or elsewhere.
          Thanks for your help!

          S 1 Reply Last reply Reply Quote 0
          • S
            SKA @SKA
            last edited by

            @tom I have some updates, and here's more info on my setup!

            voxl-open-vins-server is running and outputting the following:
            0d08f851-33b0-4478-81d0-d33be4872bf0-image.png

            voxl-vision-hub and voxl-mavlink-server are running, and the odom messages are being sent. Here's the output from voxl-mavlink-server -l:
            939964d5-e3dd-415b-9867-26d451be7d5d-image.png

            At my external autopilot, the Odometry messages are coming through, but the values are not populating/reading correctly:
            2c9dc652-60e0-4dde-8844-e57091ce3d88-image.png

            Thanks in advance for any input you may have!

            Eric KatzfeyE 1 Reply Last reply Reply Quote 0
            • Eric KatzfeyE
              Eric Katzfey ModalAI Team @SKA
              last edited by

              @SKA What version of the SDK do you have installed? Can you post the output of voxl-version?

              S 1 Reply Last reply Reply Quote 0
              • S
                SKA @Eric Katzfey
                last edited by

                @Eric-Katzfey @tom

                Here's the output of voxl-version:

                voxl2-mini:~$ voxl-version
                --------------------------------------------------------------------------------
                system-image: 1.8.02-M0104-14.1a-perf
                kernel:       #1 SMP PREEMPT Mon Nov 11 23:21:25 UTC 2024 4.19.125
                --------------------------------------------------------------------------------
                hw platform:  M0104
                mach.var:     2.0.0
                --------------------------------------------------------------------------------
                voxl-suite:   1.4.0
                --------------------------------------------------------------------------------
                Packages:
                Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.4/binary-arm64/
                Last Updated: 2025-03-12 18:51:42
                WARNING: repo file has changed since last update,
                        packages may have originated from a different repo
                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.3
                libmodal-pipe                             2.10.4
                libqrb5165-io                             0.4.7
                libvoxl-cci-direct                        0.2.3
                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.0
                qrb5165-rangefinder-server                0.1.4
                qrb5165-slpi-test-sig                     01-r0
                qrb5165-system-tweaks                     0.3.2
                qrb5165-tflite                            2.8.0-2
                voxl-bind-spektrum                        0.1.1
                voxl-camera-calibration                   0.5.9
                voxl-camera-server                        2.0.2
                voxl-ceres-solver                         2:1.14.0-10
                voxl-configurator                         0.9.4
                voxl-cpu-monitor                          0.5.1
                voxl-docker-support                       1.3.1
                voxl-elrs                                 0.3.4
                voxl-esc                                  1.4.8
                voxl-feature-tracker                      0.5.2
                voxl-flow-server                          0.3.6
                voxl-fsync-mod                            1.0-r0
                voxl-gimbal                               0.0.1
                voxl-gphoto2-server                       0.0.10
                voxl-gpio-mod                             1.0-r0
                voxl-io-server                            0.0.4
                voxl-jpeg-turbo                           2.1.3-5
                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.1
                voxl-mavlink-server                       1.4.4
                voxl-modem                                1.1.3
                voxl-mongoose                             7.7.0-1
                voxl-mpa-to-ros                           0.3.9
                voxl-mpa-tools                            1.3.4
                voxl-open-vins                            0.4.14
                voxl-open-vins-server                     0.2.83
                voxl-opencv                               4.5.5-2
                voxl-osd                                  0.0.2
                voxl-platform-mod                         1.0-r0
                voxl-portal                               0.7.2
                voxl-px4                                  1.14.0-2.0.93
                voxl-px4-imu-server                       0.1.2
                voxl-px4-params                           0.5.8
                voxl-qvio-server                          1.1.1
                voxl-remote-id                            0.0.9
                voxl-reset-slpi                           0.0.1
                voxl-state-estimator                      0.0.3
                voxl-streamer                             0.7.5
                voxl-suite                                1.4.0
                voxl-tag-detector                         0.0.4
                voxl-tflite-server                        0.3.7
                voxl-utils                                1.4.4
                voxl-uvc-server                           0.1.7
                voxl-vision-hub                           1.8.18
                voxl-vtx                                  1.1.3
                voxl2-io                                  0.0.3
                voxl2-system-image                        1.8.02-r0
                voxl2-wlan                                1.0-r0
                --------------------------------------------------------------------------------
                
                Eric KatzfeyE 3 Replies Last reply Reply Quote 0
                • Eric KatzfeyE
                  Eric Katzfey ModalAI Team @SKA
                  last edited by

                  @SKA Okay, great, that's a very recent SDK so that's good. Have you also made sure to disable the voxl-qvio-server service?

                  Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                  • Eric KatzfeyE
                    Eric Katzfey ModalAI Team @Eric Katzfey
                    last edited by

                    @Eric-Katzfey Your output shows that it is connecting properly to ov pipe so shouldn't really be necessary to stop voxl-qvio-server but probably a good idea anyways.

                    1 Reply Last reply Reply Quote 0
                    • Eric KatzfeyE
                      Eric Katzfey ModalAI Team @SKA
                      last edited by

                      @SKA That odometry output results when voxl-vision-hub thinks that vio is in a failed state and sends out that default message. Does the time_usec field increment normally? Do you ever see it populate with good data or is it always showing that? Here is the code where it sends that: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/master/src/vio_manager.c?ref_type=heads#L150

                      1 Reply Last reply Reply Quote 0
                      • Eric KatzfeyE
                        Eric Katzfey ModalAI Team @SKA
                        last edited by

                        @SKA voxl-vision-hub will print out debug messages showing VIO status as it is running. Can you see anything that may indicate why it thinks VIO is failed?

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          SKA @Eric Katzfey
                          last edited by

                          @Eric-Katzfey Thanks for helping me out with this! I've made some progress at narrowing in on the problem. First to answer your questions:

                          • QVIO: I tried with voxl-qvio-server disabled, this didn't change anything.
                          • VIO failed state: I fixed some other issues leading to the failed state from voxl-open-vins-server. Now the ovins translation and rotation outputs look healthy, and time_usec increments normally, but the external autopilot still does not log the odometry output.
                          • Debug: VIO status debug shows that it isn't failing.

                          I was able to get qvio odometry outputs to log on the external autopilot, but when I switched over to ovins, it fails. With ovins I still see incoming VIO (comp IP 197) heartbeat and timestamp mavlink messages going through, but not the 331 odometry message.

                          Let me know what you think, thanks so much!

                          Eric KatzfeyE 1 Reply Last reply Reply Quote 0
                          • Eric KatzfeyE
                            Eric Katzfey ModalAI Team @SKA
                            last edited by

                            @SKA What pipes do you see listed in /run/mpa? If you run the command voxl-inspect-vio does it show that VIO is running okay?

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Powered by NodeBB | Contributors