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

    Problems with voxl-uvc-server

    VOXL
    2
    3
    294
    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.
    • A
      amitga
      last edited by

      Hi.
      I'm using voxl-uvc-server (v0.1.3) on system image v3.8.

      I have experienced a few problems:

      1. When two different cameras are attached via USB hub (either powered or unpowered) to debug board's USB, voxl-uvc-server usually fails at opening the device.
        If I boot with only one camera attached to the USB hub, it works on the first try. With two cameras attached, it fails (uvc_open failed) around two to three consecutive tries, until its successful.
        In this scenario I was only running one instance of voxl-uvc-server. No other software was accessing UVC (AFAIK) on the VOXL.

      2. I'm trying to use voxl-uvc-server for both cameras. From the docs it should be possible, as they are different brand/type of cameras, and I'm giving each one a unique frame rate.
        5aa30359-0a5f-445d-9718-e5c1c09e8ba5-image.png
        But in practice, it doesn't work: The code for voxl-uvc-server prevents two instances from running simultaneously:

      int main(int argc, char *argv[]) {
      
          ////////////////////////////////////////////////////////////////////////////////
          // gracefully handle an existing instance of the process and associated PID file
          ////////////////////////////////////////////////////////////////////////////////
      
          // make sure another instance isn't running
          // if return value is -3 then a background process is running with
          // higher privaledges and we couldn't kill it, in which case we should
          // not continue or there may be hardware conflicts. If it returned -4
          // then there was an invalid argument that needs to be fixed.
          if(kill_existing_process(SERVER_NAME, 2.0)<-2) return -1;
      
          // start signal handler so we can exit cleanly
          if(enable_signal_handler()==-1){
              fprintf(stderr,"ERROR: failed to start signal handler\n");
              return -1;
          }
      
          // make PID file to indicate your project is running
          // due to the check made on the call to rc_kill_existing_process() above
          // we can be fairly confident there is no PID file already and we can
          // make our own safely.
          make_pid_file(SERVER_NAME);
      

      How can I run two instances on the VOXL ?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • A
        amitga
        last edited by

        Any help about running 2 USB cameras ?
        Can I just remove the code that limits this in UVC-server ?
        Thanks

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

          @amitga Yes you can. That code shouldn't be there since it prevents the exact use case that you are trying to run.

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