Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL 2
  4. Changing VOXL2 DSP PX4 Orientation

Changing VOXL2 DSP PX4 Orientation

Scheduled Pinned Locked Moved VOXL 2
11 Posts 3 Posters 1.8k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    msberk
    Contributor
    wrote on last edited by
    #1

    Note, this is exact issue is referenced here and never answered, but we have also run into it:

    While testing we had the voxl2 mounted with an 180 degrees roll. We were able to change the extrinsics file for qvio, and vision-px4, but when calibrating the sensors with QGroundcontrol the system was unable to calibrate, because the px4 could not discern the right orientation it was in. The px4 was configures to have a roll of 180 degrees, and when calibrating the sensors while the drone was standing on the ground, px4 still thought it was upside down, and after trying to calibrate that orientation, it gave an error saying the z readout was in the wrong direction. Is it possible that there is a setting on the voxl2 that needs to be set when the voxl is mounted upside down?

    Eric KatzfeyE 1 Reply Last reply
    0
    • M msberk

      Note, this is exact issue is referenced here and never answered, but we have also run into it:

      While testing we had the voxl2 mounted with an 180 degrees roll. We were able to change the extrinsics file for qvio, and vision-px4, but when calibrating the sensors with QGroundcontrol the system was unable to calibrate, because the px4 could not discern the right orientation it was in. The px4 was configures to have a roll of 180 degrees, and when calibrating the sensors while the drone was standing on the ground, px4 still thought it was upside down, and after trying to calibrate that orientation, it gave an error saying the z readout was in the wrong direction. Is it possible that there is a setting on the voxl2 that needs to be set when the voxl is mounted upside down?

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @msberk Yes, when mounting the board in a different orientation the IMU driver needs to know the rotation. So, for example, we have one model of drone that has the board rotated by 180 degrees. So the start line for the imu driver adds -R 4 to specify that (qshell icm42688p start -s -R 4). The number 4 comes from the file src/lib/conversion/rotation.h and corresponds to ROTATION_YAW_180. For your case I think you would want to specify -R 8 for ROTATION_ROLL_180.

      Abdullah01A 1 Reply Last reply
      0
      • M Offline
        M Offline
        msberk
        Contributor
        wrote on last edited by
        #3

        @Eric-Katzfey
        Ok, that worked. Thanks!

        How would you advise setting it up to run at boot? I found the target script here but it's set up differently than a typical Pixhawk board target.

        Eric KatzfeyE 1 Reply Last reply
        0
        • M msberk

          @Eric-Katzfey
          Ok, that worked. Thanks!

          How would you advise setting it up to run at boot? I found the target script here but it's set up differently than a typical Pixhawk board target.

          Eric KatzfeyE Offline
          Eric KatzfeyE Offline
          Eric Katzfey
          ModalAI Team
          wrote on last edited by
          #4

          @msberk There are different ways to go about starting px4. What we do is use the voxl-px4 script to launch everything (In that same target directory). That can be be used in a systemd service file to launch px4 at board startup. That script has command line options that control certain features. Ultimately px4 is passed that voxl-px4.config script using the -s option. Both voxl-px4 and voxl-px4.config are bash scripts which makes them quite flexible. For a different perspective you can look at our voxl-px4 gitlab project which acts as a wrapper for px4 and creates a debian package that can be installed on target. The package will place all needed files in the correct places during installation and has a voxl-px4.service file example for systemd startup. (https://gitlab.com/voxl-public/voxl-sdk/services/voxl-px4/-/tree/dev)

          1 Reply Last reply
          0
          • Eric KatzfeyE Eric Katzfey

            @msberk Yes, when mounting the board in a different orientation the IMU driver needs to know the rotation. So, for example, we have one model of drone that has the board rotated by 180 degrees. So the start line for the imu driver adds -R 4 to specify that (qshell icm42688p start -s -R 4). The number 4 comes from the file src/lib/conversion/rotation.h and corresponds to ROTATION_YAW_180. For your case I think you would want to specify -R 8 for ROTATION_ROLL_180.

            Abdullah01A Offline
            Abdullah01A Offline
            Abdullah01
            Contributor
            wrote on last edited by
            #5

            @Eric-Katzfey

            from where can add this command?

            it is not clear. If you can clarify more about the process

            thank you

            Eric KatzfeyE 1 Reply Last reply
            0
            • Abdullah01A Abdullah01

              @Eric-Katzfey

              from where can add this command?

              it is not clear. If you can clarify more about the process

              thank you

              Eric KatzfeyE Offline
              Eric KatzfeyE Offline
              Eric Katzfey
              ModalAI Team
              wrote on last edited by
              #6

              @Abdullah01 In voxl-px4 1.12.31 you can find all of the PX4 startup commands in /etc/modalai/voxl-px4.config.

              Abdullah01A 1 Reply Last reply
              0
              • Eric KatzfeyE Eric Katzfey

                @Abdullah01 In voxl-px4 1.12.31 you can find all of the PX4 startup commands in /etc/modalai/voxl-px4.config.

                Abdullah01A Offline
                Abdullah01A Offline
                Abdullah01
                Contributor
                wrote on last edited by
                #7

                @Eric-Katzfey

                Great thank you.

                I checked the file and the imu is already rotated as you can see in the picture

                Screenshot 2023-06-14 053818.png

                But when I start the calibration process and face the drone's nose upward. it shows that it faces downward

                should I make the changes on the config file and on QGC? or just on the file?

                thank you

                Abdullah01A 1 Reply Last reply
                0
                • Abdullah01A Abdullah01

                  @Eric-Katzfey

                  Great thank you.

                  I checked the file and the imu is already rotated as you can see in the picture

                  Screenshot 2023-06-14 053818.png

                  But when I start the calibration process and face the drone's nose upward. it shows that it faces downward

                  should I make the changes on the config file and on QGC? or just on the file?

                  thank you

                  Abdullah01A Offline
                  Abdullah01A Offline
                  Abdullah01
                  Contributor
                  wrote on last edited by
                  #8

                  @Abdullah01

                  Now It works with the correct orientation.

                  But there are two issues,

                  1- Once I complete the compass calibration process, and restart the voxl/drone. it shows me that the calibration process has not been done and I need to re-calibrate again.

                  2- the accelerometer calibration process keeps crashing and it shows this message

                  AAAAA.png

                  Eric KatzfeyE 1 Reply Last reply
                  0
                  • Abdullah01A Abdullah01

                    @Abdullah01

                    Now It works with the correct orientation.

                    But there are two issues,

                    1- Once I complete the compass calibration process, and restart the voxl/drone. it shows me that the calibration process has not been done and I need to re-calibrate again.

                    2- the accelerometer calibration process keeps crashing and it shows this message

                    AAAAA.png

                    Eric KatzfeyE Offline
                    Eric KatzfeyE Offline
                    Eric Katzfey
                    ModalAI Team
                    wrote on last edited by
                    #9

                    @Abdullah01 It still seems like your rotation is not setup correctly. Have you set SENS_BOARD_ROT to anything? Did you change the imu start line to have a rotation of 8 instead of 4?

                    Abdullah01A 1 Reply Last reply
                    0
                    • Eric KatzfeyE Eric Katzfey

                      @Abdullah01 It still seems like your rotation is not setup correctly. Have you set SENS_BOARD_ROT to anything? Did you change the imu start line to have a rotation of 8 instead of 4?

                      Abdullah01A Offline
                      Abdullah01A Offline
                      Abdullah01
                      Contributor
                      wrote on last edited by Abdullah01
                      #10

                      @Eric-Katzfey

                      I just tried to change it from 4 to 8 but nothing changed.

                      Yes, I changed the SENS_BOARD_ROT to Yaw 180 degrees

                      Screenshot 2023-06-18 111320.png

                      Eric KatzfeyE 1 Reply Last reply
                      0
                      • Abdullah01A Abdullah01

                        @Eric-Katzfey

                        I just tried to change it from 4 to 8 but nothing changed.

                        Yes, I changed the SENS_BOARD_ROT to Yaw 180 degrees

                        Screenshot 2023-06-18 111320.png

                        Eric KatzfeyE Offline
                        Eric KatzfeyE Offline
                        Eric Katzfey
                        ModalAI Team
                        wrote on last edited by
                        #11

                        @Abdullah01 Leave SENS_BOARD_ROT as the default value. You are specifying the rotation of the board by giving the IMU driver the -R 4 option.

                        1 Reply Last reply
                        0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        ModalAI
                        Categories Recent Tags ModalAI.com Docs
                        © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups