ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Rowan Dempster
    • Profile
    • Following 0
    • Followers 0
    • Topics 32
    • Posts 101
    • Best 0
    • Controversial 0
    • Groups 0

    Rowan Dempster

    @Rowan Dempster

    0
    Reputation
    15
    Profile views
    101
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Rowan Dempster Unfollow Follow

    Latest posts made by Rowan Dempster

    • RE: Minimizing voxl-camera-server CPU usage in SDK1.6

      @Alex-Kushleyev Hi Alex, Happy New Years 🙂

      Is there an ETA on when the 32-bit ION buffer support in libmodal-pipe will be main-lined? For our internal time planning here at Cleo.

      Thank you,
      Rowan

      posted in Video and Image Sensors
      Rowan DempsterR
      Rowan Dempster
    • RE: Toolchain for m0054-data-fs.ext4

      @Moderator Hi Modal,

      Does this mean you can create a custom data file partition that you can flash using fastboot?

      Yes that is correct.

      We have not explored this before but it has been asked a few times. This could be very helpful for other developers.

      I'm certainly hopeful that it will be helpful here at Cleo Robotics! So far with my prototyping it works as expected and cuts flashing time of some large docker images we have here at Cleo down by a noticeable fraction (no file overhead via fastboot like with ADB).

      I think the snippet I posted covers the baseline functionality of getting a custom "payload" into the data partition. However if there is more I can elaborate on in terms of the toolchain / what's in the payload, and if that elaboration will be helpful to other VOXL2 developers, I would be happy to elaborate 🙂 Just let me know!

      Other similar discussion points I tackled recently that I'm happy to talk about lessons of:

      • Flashing the system image and VOXL/CLEO SDK through a Windows Machine (journeys in USB device drivers)
      • Building Flutter applications for uniform flashing process across all operating systems
      • Building release bundles (i.e. a collection of partition binaries) in CI
      posted in VOXL SDK
      Rowan DempsterR
      Rowan Dempster
    • RE: Toolchain for m0054-data-fs.ext4

      For anyone reading this in the future this works:

      docker run --rm --privileged \
          -v "$SYSTEM_IMAGE_DIR":/system-image:ro \
          -v "$CLEO_IMAGE_DIR":/cleo-image \
          -v "$CLEO_PROVISION_DIR":/cleo-provision:ro \
          ubuntu:18.04 bash -c "
          set -e
          
          # Install tools
          apt-get update -qq
          apt-get install -y -qq android-tools-fsutils e2fsprogs >/dev/null
          
          # Extract stock data partition contents
          echo 'Extracting stock m0054-data-fs.ext4...'
          mkdir -p /tmp/data_root
          
          # Convert sparse to raw and mount
          simg2img /system-image/m0054-data-fs.ext4 /tmp/stock_raw.ext4
          mkdir -p /mnt/stock
          mount -o loop,ro /tmp/stock_raw.ext4 /mnt/stock
          
          # Copy all stock files
          cp -a /mnt/stock/* /tmp/data_root/
          umount /mnt/stock
          rm /tmp/stock_raw.ext4
          
          echo 'Stock contents copied.'
          
          # Add cleo-provision directory
          cp -a /cleo-provision /tmp/data_root/cleo-provision
          
          echo 'Added cleo-provision directory'
          
          # Create the ext4 image using same parameters as BitBake recipe:
          #   -s            : sparse output
          #   -l SIZE       : filesystem size in bytes
          #   -a /data      : android mount point
          #   -b 4096       : block size
          make_ext4fs -s -l $USERDATA_SIZE_EXT4 -a /data -b 4096 /cleo-image/m0054-data-fs.ext4 /tmp/data_root
          
          echo ''
          echo 'Created sparse ext4 image successfully'
      "
      

      You'll need to be on an arm64 architecture.

      posted in VOXL SDK
      Rowan DempsterR
      Rowan Dempster
    • RE: Toolchain for m0054-data-fs.ext4

      I found https://gitlab.com/voxl-public/system-image-build/meta-voxl2/-/blob/qrb5165-ubun1.0-14.1a/recipes-products/image/qti-ubuntu-robotics-image.bbappend#L148, which is in bitbake language (not familiar)?

      Is

      do_makeuserdata() {
          make_ext4fs -s -l ${USERDATA_SIZE_EXT4} ${IMAGE_EXT4_SELINUX_OPTIONS} \
              -a /data -b 4096 ${DEPLOY_DIR_IMAGE}/${OVERLAYIMAGE_TARGET} ${IMAGE_ROOTFS}/data
      }
      

      something I could do just on normal ubuntu in CI? I'm thinking to build a cleo-specific userdata in CI with all of our custom software.

      What are ${IMAGE_EXT4_SELINUX_OPTIONS}, is there some secret sauce there?

      posted in VOXL SDK
      Rowan DempsterR
      Rowan Dempster
    • Toolchain for m0054-data-fs.ext4

      Hi Modal,

      I'm looking into adding some data in the m0054-data-fs.ext file system. I'm having some trouble getting the voxl2 to work correctly when I try to add the data and then create a new Android sparse image that I flash instead of m0054-data-fs.ext. Would it be possible to provide me with the tools used to create that m0054-data-fs.ext file system at ModalAI so that I can use the exact same tools to create the sparse android image after adding my files to it?

      Thank you,
      Rowan

      posted in VOXL SDK
      Rowan DempsterR
      Rowan Dempster
    • RE: Minimizing voxl-camera-server CPU usage in SDK1.6

      @Alex-Kushleyev Sounds good! I did not make any changes since the revisions you shared 5 days ago.

      posted in Video and Image Sensors
      Rowan DempsterR
      Rowan Dempster
    • RE: Minimizing voxl-camera-server CPU usage in SDK1.6

      @Alex-Kushleyev

      sure, that would be helpful.

      i will check with the team today to make sure we are all good, so perhaps you should wait for that.

      Will do!

      posted in Video and Image Sensors
      Rowan DempsterR
      Rowan Dempster
    • RE: Minimizing voxl-camera-server CPU usage in SDK1.6

      @Alex-Kushleyev Okay sounds like we're almost there in terms of readiness for mainline then. Would you like me to take that on and put up a gitlab MR from my fork into modalai's libmodal-pipe repo? I can schedule an hour or two to polish that up and get it ready sometime in the next few days.

      posted in Video and Image Sensors
      Rowan DempsterR
      Rowan Dempster
    • RE: Minimizing voxl-camera-server CPU usage in SDK1.6

      @Alex-Kushleyev Hi Alex,

      Success! I was able to run QVIO using the ION pipe and saw the resultant reduction in CPU util both on the camera server process as well as the QVIO process (small but noticeable reductions).

      Note that I was not able to run the camera server with the 32-bit customized libmodal-pipe was installed. So the approach I took was run voxl-camera-server first with the unmodified libmodal-pipe, then install the 32-bit customized libmodal pipe, and run QVIO. Of course this would not be feasible in production. Here are the errors I'm getting when trying to run voxl-camera-server with the 32-bit customized libmodal-pipe installed:

      =================================================================
      thread is locked to cores: 4 5 6 7
      connected to mavlink pipe
      Connected to cpu-monitor
      Starting Camera: back (id #0)
      gbm_create_device(156): Info: backend name is: msm_drm
      MISP Initializing for camera back
       Detected 1 platform(s)
       Detected 1 GPU device(s)
      Estimated imu dt = 0.000977s
      WARNING: OMX SetTargetBitrate: H265 CBR requires bps >= 3.0Mbit (1200000 bps provided). Using FPS hack. scale = 2.500000
      WARNING: Encoder expecting(16) more buffers than module allocated(1)
      ERROR:   OMX Set config failed!
      ERROR:   Failed to initialize MISP encoder for camera: back
      ERROR:   Failed to start camera: back
      Starting Camera: top (id #1)
      MISP Initializing for camera top
      WARNING: OMX SetTargetBitrate: H265 CBR requires bps >= 3.0Mbit (1200000 bps provided). Using FPS hack. scale = 2.500000
      WARNING: Encoder expecting(16) more buffers than module allocated(1)
      ERROR:   OMX Set config failed!
      ERROR:   Failed to initialize MISP encoder for camera: top
      ERROR:   Failed to start camera: top
      Starting Camera: tof (id #2)
      Starting Camera: hires (id #3)
      WARNING: OMX SetTargetBitrate: H265 CBR requires bps >= 3.0Mbit (2000000 bps provided). Using FPS hack. scale = 1.500000
      WARNING: Encoder expecting(16) more buffers than module allocated(1)
      ERROR:   OMX Set config failed!
      ERROR:   Failed to initialize encoder for camera: hires
      ERROR:   Failed to start camera: hires
      Starting Camera: bottom (id #4)
      MISP Initializing for camera bottom
      WARNING: OMX SetTargetBitrate: H265 CBR requires bps >= 3.0Mbit (1200000 bps provided). Using FPS hack. scale = 2.500000
      WARNING: Encoder expecting(16) more buffers than module allocated(1)
      ERROR:   OMX Set config failed!
      ERROR:   Failed to initialize MISP encoder for camera: bottom
      ERROR:   Failed to start camera: bottom
      

      What are the next steps towards mainlining this in a way that works "out of the box"? Anything else I should test or any way I can support that process?

      Thank you,
      Rowan

      posted in Video and Image Sensors
      Rowan DempsterR
      Rowan Dempster
    • RE: Minimizing voxl-camera-server CPU usage in SDK1.6

      @Alex-Kushleyev Here are the diffs:

      • libmodal-pipe: https://gitlab.com/rowan.dempster/libmodal-pipe/-/merge_requests/1/diffs
      • voxl-mpa-tools: https://gitlab.com/rowan.dempster/voxl-mpa-tools/-/merge_requests/1/diffs

      Thanks for your help!

      posted in Video and Image Sensors
      Rowan DempsterR
      Rowan Dempster