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

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL 2 and VOXL 2 Mini
  3. Trigger Hadron camera with DO_SET_CAM_TRIGG_DIST

Trigger Hadron camera with DO_SET_CAM_TRIGG_DIST

Scheduled Pinned Locked Moved Unsolved VOXL 2 and VOXL 2 Mini
voxl-2
6 Posts 2 Posters 1.1k 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.
  • R Offline
    R Offline
    restore
    Regular
    wrote on last edited by
    #1

    I have a VOXL2 running ardupilot and have a Hadron camera connected and configured with voxl-camera-server. I can take snapshots successfully.

    I am trying to configure our drone to capture images at a specific distance interval during flight with the DO_SET_CAM_TRIGG_DIST parameter. Is there a way to do this with VOXL2 and ardupilot?

    Thanks!

    Eric KatzfeyE 1 Reply Last reply
    0
    • R restore

      I have a VOXL2 running ardupilot and have a Hadron camera connected and configured with voxl-camera-server. I can take snapshots successfully.

      I am trying to configure our drone to capture images at a specific distance interval during flight with the DO_SET_CAM_TRIGG_DIST parameter. Is there a way to do this with VOXL2 and ardupilot?

      Thanks!

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

      @restore I don't think this is possible today. How did you set it up to take the snapshot? How is it triggered?

      R 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @restore I don't think this is possible today. How did you set it up to take the snapshot? How is it triggered?

        R Offline
        R Offline
        restore
        Regular
        wrote on last edited by
        #3

        @Eric-Katzfey We have the Hadron configured with voxl-camera-server.conf

        "type": "ov64b",
        "name": "hires",
        ....
        "en_snapshot": true,
        ...
        

        so we can take images with voxl-send-command hires_snapshot snapshot

        I would love to configure the camera in Ardupilot with CAM1_TYPE and set DO_SET_CAM_TRIGG_DIST to a distance interval that I will capture images at.

        If that is not directly possible, could you help me with a way to create a sort of interface script that sits on VOXL2 that listens for GPIO relay triggers or something like that? Then I can just call the snapshot command when triggered.

        Eric KatzfeyE 1 Reply Last reply
        0
        • R restore

          @Eric-Katzfey We have the Hadron configured with voxl-camera-server.conf

          "type": "ov64b",
          "name": "hires",
          ....
          "en_snapshot": true,
          ...
          

          so we can take images with voxl-send-command hires_snapshot snapshot

          I would love to configure the camera in Ardupilot with CAM1_TYPE and set DO_SET_CAM_TRIGG_DIST to a distance interval that I will capture images at.

          If that is not directly possible, could you help me with a way to create a sort of interface script that sits on VOXL2 that listens for GPIO relay triggers or something like that? Then I can just call the snapshot command when triggered.

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

          @restore Are there any Mavlink messages coming out of ArduPilot that you could use to know when to take the snapshot? If so, create a new application that listens, via voxl-mavlink-server, to Mavlink and the message(s) you need. Then trigger the snapshot when it's needed. ArduPilot's external interface is Mavlink so it would be good to leverage Mavlink messages for this.

          R 1 Reply Last reply
          0
          • Eric KatzfeyE Eric Katzfey

            @restore Are there any Mavlink messages coming out of ArduPilot that you could use to know when to take the snapshot? If so, create a new application that listens, via voxl-mavlink-server, to Mavlink and the message(s) you need. Then trigger the snapshot when it's needed. ArduPilot's external interface is Mavlink so it would be good to leverage Mavlink messages for this.

            R Offline
            R Offline
            restore
            Regular
            wrote on last edited by
            #5

            @Eric-Katzfey I configured the drone to have servo5 trigger the camera. When idle, servo 5 shows 1100. When triggered, it goes up to 1300. In the Mavlink messages I can now watch for SERVO_OUTPUT_RAW msg.servo5_raw and detect the rising edge which emulates the trigger.

            msg = master.recv_match(type='SERVO_OUTPUT_RAW', blocking=True, timeout=2)
            if not msg:
                continue
            pwm = msg.servo5_raw
            

            I have done this on a ground station using pymavlink to listen for messages. What is the best way to listen for this mavlink message on the VOXL2? Reminder - I am using Ardupilot.

            Eric KatzfeyE 1 Reply Last reply
            0
            • R restore

              @Eric-Katzfey I configured the drone to have servo5 trigger the camera. When idle, servo 5 shows 1100. When triggered, it goes up to 1300. In the Mavlink messages I can now watch for SERVO_OUTPUT_RAW msg.servo5_raw and detect the rising edge which emulates the trigger.

              msg = master.recv_match(type='SERVO_OUTPUT_RAW', blocking=True, timeout=2)
              if not msg:
                  continue
              pwm = msg.servo5_raw
              

              I have done this on a ground station using pymavlink to listen for messages. What is the best way to listen for this mavlink message on the VOXL2? Reminder - I am using Ardupilot.

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

              @restore There are a few examples of code that listens for Mavlink messages in our SDK. For example, in voxl-mpa-tools, take a look at the source code for voxl-inspect-mavlink.c. https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/tools/voxl-inspect-mavlink.c?ref_type=heads

              Probably would be a good idea to run voxl-inspect-mavlink on the mavlink_onboard and mavlink_to_gcs pipes to see which one has the desired Mavlink message in it. Then create your own application that listens for the Mavlink message on that pipe.

              1 Reply Last reply
              0

              Reading along? Create a free ModalAI Forum account to join in.

              With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.

              Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.

              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