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

    voxl-tag-detector fails to start on V3.3 "Missing lens_cal_file"

    VOXL m500 Reference Drone
    2
    12
    670
    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.
    • Eric KatzfeyE
      Eric Katzfey ModalAI Team
      last edited by

      @PawelJ When you run the install script to flash the system image there is a prompt that asks if you want to preserve the /data partition where the calibration files are stored. Normally you preserve those unless you want to calibrate the cameras yourself. If the calibration files have been deleted then you need to get them replaced. You can run the calibration procedure yourself. The documentation is here: https://docs.modalai.com/calibrate-cameras/

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

        @PawelJ cal.png

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

          @PawelJ ```%YAML:1.0

          M: !!opencv-matrix
          rows: 3
          cols: 3
          dt: d
          data: [ 2.7874039916528164e+02, 0., 3.3988271378331154e+02, 0.,
          2.7880227185614154e+02, 2.5258101356853410e+02, 0., 0., 1. ]
          😧 !!opencv-matrix
          rows: 4
          cols: 1
          dt: d
          data: [ -1.4185703635329491e-02, 2.1172901376532889e-02,
          -1.4431453715214168e-02, 3.4931558175981398e-03 ]
          width: 640.
          height: 480.
          distortion_model: fisheye

          1 Reply Last reply Reply Quote 0
          • PawelJP
            PawelJ
            last edited by PawelJ

            @Eric-Katzfey said in voxl-tag-detector fails to start on V3.3 "Missing lens_cal_file":

            %YAML:1.0
            M: !!opencv-matrix
            rows: 3
            cols: 3
            dt: d
            data: [ 2.7874039916528164e+02, 0., 3.3988271378331154e+02, 0.,
            2.7880227185614154e+02, 2.5258101356853410e+02, 0., 0., 1. ]
            !!opencv-matrix
            rows: 4
            cols: 1
            dt: d
            data: [ -1.4185703635329491e-02, 2.1172901376532889e-02,
            -1.4431453715214168e-02, 3.4931558175981398e-03 ]
            width: 640.
            height: 480.
            distortion_model: fisheye

            Hello @Eric-Katzfey I have scp'd that file over to the voxl, but the voxl-tag-detector still fails to start running. I try to restart it with systemctl restart voxl-tag-detector, but it comes up as Not Running in voxl-inspect-services. When I try running it in debug mode I get this printout.

            yocto:~$ voxl-tag-detector -d
            enabling debug mode
            loading tag-detector config file
            loading apriltag config file
            =================================================================
            detector #0
                enable:          1
                input_pipe:      tracking
                en_fast_mode:    1
                n_threads:       1
                en_undistortion: 1
                undistort_scale: 0.60
                overlay_name:    tracking_tag_overlay
                lens_cal_file:   /data/modalai/opencv_tracking_intrinsics.yml
                skip_n_frames:   5
            detector #1
                enable:          0
                input_pipe:      stereo
                en_fast_mode:    1
                n_threads:       1
                en_undistortion: 1
                undistort_scale: 0.90
                overlay_name:    stereo_tag_overlay
                lens_cal_file:   /data/modalai/opencv_stereo_intrinsics.yml
                skip_n_frames:   5
            detector #2
                enable:          0
                input_pipe:      extra
                en_fast_mode:    1
                n_threads:       1
                en_undistortion: 0
                undistort_scale: 1.00
                overlay_name:    extra_tag_overlay
                lens_cal_file:   /data/modalai/opencv_extra_intrinsics.yml
                skip_n_frames:   5
            =================================================================
            default_size_m:        0.173
            #0:
                id:              0
                name:            default_name
                loc_type:        unknown
                size_m:            0.173
                T_tag_wrt_fixed: 0.0  0.0  0.0 
                R_tag_to_fixed:  0.0 -1.0  0.0 
                                 1.0  0.0  0.0 
                                 0.0  0.0  1.0 
            Aborted
            
            

            I recall having to reset the calibration files for the px4 when debugging an earlier problem with your team. I have gone through and recalibrated those sensors already. Unless they are linked ot the px4 parameters, I have not removed any camera calibration files.

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

              @PawelJ Yes, I think it is related to the system image flash procedure https://docs.modalai.com/flash-system-image/ It will wipe the /data partition where the calibration files exist unless you tell it not to do that.

              PawelJP 1 Reply Last reply Reply Quote 0
              • PawelJP
                PawelJ @Eric Katzfey
                last edited by

                @Eric-Katzfey I did not wipe the /data partition during the reinstall

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

                  @PawelJ We will investigate this and see why you lost the calibration files when flashing 3.3.0 system image.

                  PawelJP 1 Reply Last reply Reply Quote 0
                  • PawelJP
                    PawelJ @Eric Katzfey
                    last edited by

                    @Eric-Katzfey do you have any suggestions to get this up and running? I am just trying to get the default system features working at the moment. I have added the missing calibration file, but it still appears to be failing.

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

                      @PawelJ Bear with us. Our subject matter experts are out on summer vacation this week.

                      1 Reply Last reply Reply Quote 1
                      • PawelJP
                        PawelJ
                        last edited by

                        Yes of course, it's the time of year for a vacation :). Just an update....as I was working on some tflite portions of my project I noticed that the qvio-server was down now, but was not prior to adding the calibration file. If I run it in debug mode it provides a more helpful printout and shows that there is an error in loading the calibration file.

                        yocto:~$ voxl-qvio-server 
                        loading qvio config file
                        =================================================================
                        imu_name:                         imu1
                        cam_name:                         tracking
                        odr_hz:                           30.000
                        use_camera_height_bootstrap:      1
                        camera_height_off_ground_m:        0.100
                        enable_init_while_moving:         1
                        cam_imu_timeshift_s:               0.002
                        cam_imu_timeshift_s_uncertainty:   0.001
                        T_cam_wrt_imu_uncertainty:         0.005  0.005  0.005
                        R_cam_to_imu_uncertainty:          0.040  0.040  0.040
                        accl_fsr_ms2:                     156.000
                        gyro_fsr_rad:                     34.000
                        accl_noise_std_dev:                0.316
                        gyro_noise_std_dev:                0.010
                        cam_noise_std_dev:                100.000
                        min_std_pixel_noise:               0.500
                        fail_high_pixel_noise_points:      1.665
                        limited_imu_bw_trigger:           35.000
                        gps_imu_time_alignment_s:          0.000
                        T_gps_wrt_imu:                    -0.115  0.450  0.100
                        enable_mapping:                   1
                        enable_gps_vel:                   0
                        =================================================================
                        setting scheduler
                        WARNING Failed to set priority, errno = 1
                        This seems to be a problem with ADB, the scheduler
                        should work properly when this is a background process
                        ERROR failed to set scheduler
                        loading extrinsics config file
                        #0:
                            parent:                imu1
                            child:                 tracking
                            T_child_wrt_parent:    0.017   0.015   0.013 
                            RPY_parent_to_child:   0.0    45.0    90.0  
                            R_child_to_parent:     0.000  -0.707   0.707 
                                                   1.000   0.000  -0.000 
                                                  -0.000   0.707   0.707 
                        tbc:   0.017  0.015  0.013
                        ombc:  0.614  0.614  1.482 (axis angle)
                        ombc:  0.000 45.000 90.000 (RPY deg)
                        loading /data/modalai/opencv_tracking_intrinsics.yml
                        terminate called after throwing an instance of 'YAML::BadSubscript'
                          what():  operator[] call on a scalar
                        Aborted
                        

                        Here is the what the file looks like

                        %YAML:1.0
                        M: !!opencv-matrix
                        rows: 3
                        cols: 3
                        dt: d
                        data: [ 2.7874039916528164e+02, 0., 3.3988271378331154e+02, 0.,
                        2.7880227185614154e+02, 2.5258101356853410e+02, 0., 0., 1. ]
                        D: !!opencv-matrix
                        rows: 4
                        cols: 1
                        dt: d
                        data: [ -1.4185703635329491e-02, 2.1172901376532889e-02,
                        -1.4431453715214168e-02, 3.4931558175981398e-03 ]
                        width: 640.
                        height: 480.
                        distortion_model: fisheye
                        

                        Cheers

                        1 Reply Last reply Reply Quote 0
                        • PawelJP
                          PawelJ
                          last edited by

                          Got the problem sorted out.

                          %YAML:1.0
                          M: !!opencv-matrix
                             rows: 3
                             cols: 3
                             dt: d
                             data: [ 2.7874039916528164e+02, 0., 3.3988271378331154e+02, 0.,
                                 2.7880227185614154e+02, 2.5258101356853410e+02, 0., 0., 1. ]
                          D: !!opencv-matrix
                             rows: 4
                             cols: 1
                             dt: d
                             data: [ -1.4185703635329491e-02, 2.1172901376532889e-02,
                                 -1.4431453715214168e-02, 3.4931558175981398e-03 ]
                             width: 640.
                             height: 480.
                             distortion_model: fisheye
                          

                          Cheers

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