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

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Dev Kits
  3. VOXL Flight Deck
  4. Confusion/issues related to voxl-camera-server...

Confusion/issues related to voxl-camera-server...

Scheduled Pinned Locked Moved VOXL Flight Deck
6 Posts 2 Posters 1.6k Views 2 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.
  • Ed SutterE Offline
    Ed SutterE Offline
    Ed Sutter
    Regular
    wrote on last edited by
    #1

    I need to be able to change gain/exposure settings for the hires camera. Referring to the voxl-camera-server page I ran voxl-send-command hires set_exp_gain 200 150. The response comes back as if successful (which really only indicates that it was successfully sent), but when I look at the output of the voxl-camera-server service using journalctl -u voxl-camera-server it says:

    Invalid Control Pipe Exposure: 200.000000,
    Should be between 0.020000 and 0.000000
    

    So I rerun the command to use a setting within those limits (voxl-send-command hires set_exp_gain .015 150), but I still get the same error.

    Digging into this a bit more, I click on the link for the voxl-camera-server source code and it is redirected to apq8096-camera-server under voxl-sdk/services.

    I see from this post that this voxl-camera-server code is/was recently changing. What code should I be looking at to understand what the problem is here?

    Ed SutterE 1 Reply Last reply
    0
    • Ed SutterE Ed Sutter

      I need to be able to change gain/exposure settings for the hires camera. Referring to the voxl-camera-server page I ran voxl-send-command hires set_exp_gain 200 150. The response comes back as if successful (which really only indicates that it was successfully sent), but when I look at the output of the voxl-camera-server service using journalctl -u voxl-camera-server it says:

      Invalid Control Pipe Exposure: 200.000000,
      Should be between 0.020000 and 0.000000
      

      So I rerun the command to use a setting within those limits (voxl-send-command hires set_exp_gain .015 150), but I still get the same error.

      Digging into this a bit more, I click on the link for the voxl-camera-server source code and it is redirected to apq8096-camera-server under voxl-sdk/services.

      I see from this post that this voxl-camera-server code is/was recently changing. What code should I be looking at to understand what the problem is here?

      Ed SutterE Offline
      Ed SutterE Offline
      Ed Sutter
      Regular
      wrote on last edited by
      #2

      I now see that the code under voxl-camera-server has the error message "Invalid Control Pipe Exposure:..." commented out, so I must be running (and should be looking at) apq8096-camera-server code. If I rebuild and install on my flight deck, I'll assume that I should just change the name to voxl-camera-server.
      Please clarify!

      Ed SutterE 1 Reply Last reply
      0
      • Ed SutterE Ed Sutter

        I now see that the code under voxl-camera-server has the error message "Invalid Control Pipe Exposure:..." commented out, so I must be running (and should be looking at) apq8096-camera-server code. If I rebuild and install on my flight deck, I'll assume that I should just change the name to voxl-camera-server.
        Please clarify!

        Ed SutterE Offline
        Ed SutterE Offline
        Ed Sutter
        Regular
        wrote on last edited by Ed Sutter
        #3

        Looking at the file hal3_camera_mgr.cpp, I believe line 56...

        #define MAX_EXP 33
        

        should be changed to

        #define MAX_EXP 33.0
        

        That will at least fix the error message.

        Ed SutterE 1 Reply Last reply
        0
        • Ed SutterE Ed Sutter

          Looking at the file hal3_camera_mgr.cpp, I believe line 56...

          #define MAX_EXP 33
          

          should be changed to

          #define MAX_EXP 33.0
          

          That will at least fix the error message.

          Ed SutterE Offline
          Ed SutterE Offline
          Ed Sutter
          Regular
          wrote on last edited by
          #4

          @Alex-Gardner one other thing that may improve efficiency in hal3_camera_mgr.cpp...

          It appears that the code around 694-702...

                      m_currentExposure = m_nextExposure;
                      m_currentGain     = m_nextGain;
                      m_nextExposure    = -1;
                      m_nextGain        = -1;
          
                      uint8_t aeMode = 0; // Auto exposure is off i.e. the underlying driver does not control exposure/gain
                      m_requestMetadata.update(ANDROID_CONTROL_AE_MODE, &aeMode, 1);
                      m_requestMetadata.update(ANDROID_SENSOR_EXPOSURE_TIME, &(m_currentExposure), 1);
                      m_requestMetadata.update(ANDROID_SENSOR_SENSITIVITY, &(m_currentGain), 1);
          
          

          is called even when there's no change to exposure and gain. Those lines could probably be wrapped with a test for the change...

                      if ((m_currentExposure  != m_nextExposure) || (m_currentGain  != m_nextGain)) 
                      {
                      m_currentExposure = m_nextExposure;
                      m_currentGain     = m_nextGain;
                      m_nextExposure    = -1;
                      m_nextGain        = -1;
          
                      uint8_t aeMode = 0; // Auto exposure is off i.e. the underlying driver does not control exposure/gain
                      m_requestMetadata.update(ANDROID_CONTROL_AE_MODE, &aeMode, 1);
                      m_requestMetadata.update(ANDROID_SENSOR_EXPOSURE_TIME, &(m_currentExposure), 1);
                      m_requestMetadata.update(ANDROID_SENSOR_SENSITIVITY, &(m_currentGain), 1);
                      }
          
          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Hi,

            Thanks for digging into this a bit, in short: camera server went through a major overhaul to make it much cleaner and more robust when we released our qrb5165-based platforms. The release that we're currently testing and plan to release soon for all platforms has this updated camera server backported to voxl1(apq8096) as well.

            This rewrite was mostly cleaning up 3-4 year old code while maintaining the same behavior, but there were a few proper improvements, including redoing the state machine for the AE stuff. There's a known bug in the old camera server where the set commands will not work if the selected AE algorithm in the config file is to use the ISP's (default for the hires cam) since the module will ignore those set values. Additionally, in the new camera server we've included proper values for min/max exp/gain for each different sensor, not just the generic definitions of the old one.

            At this point we're not planning to make any additions to the apq-specific camera server since all the known issues have been ironed out of the cross-platform one and it'll take longer to test and release backports of the old camera server than it will for us to finish pushing out a full release for APQ with the new camera server (we're targeting the next week and a half or so).

            Ed SutterE 1 Reply Last reply
            0
            • ? A Former User

              Hi,

              Thanks for digging into this a bit, in short: camera server went through a major overhaul to make it much cleaner and more robust when we released our qrb5165-based platforms. The release that we're currently testing and plan to release soon for all platforms has this updated camera server backported to voxl1(apq8096) as well.

              This rewrite was mostly cleaning up 3-4 year old code while maintaining the same behavior, but there were a few proper improvements, including redoing the state machine for the AE stuff. There's a known bug in the old camera server where the set commands will not work if the selected AE algorithm in the config file is to use the ISP's (default for the hires cam) since the module will ignore those set values. Additionally, in the new camera server we've included proper values for min/max exp/gain for each different sensor, not just the generic definitions of the old one.

              At this point we're not planning to make any additions to the apq-specific camera server since all the known issues have been ironed out of the cross-platform one and it'll take longer to test and release backports of the old camera server than it will for us to finish pushing out a full release for APQ with the new camera server (we're targeting the next week and a half or so).

              Ed SutterE Offline
              Ed SutterE Offline
              Ed Sutter
              Regular
              wrote on last edited by
              #6

              @Alex-Gardner Will we be notified when the new version is available?

              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