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

    How can I upload a python code to my m500 with voxl mavsdk

    Ask your questions right here!
    2
    10
    297
    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.
    • José QuintanillaJ
      José Quintanilla
      last edited by

      So I recently was able to use the sdk function on my m500 drone, and I want to modify one of the codes in my computer and then try it on my drone, but I don't really know how to upload the new code to the docker image, Does anyone know how to do it?

      1 Reply Last reply Reply Quote 0
      • tomT
        tom admin
        last edited by

        @José-Quintanilla You'll want to mount whatever directory or files you want inside the container using something like: docker run -v /host/directory:/container/directory

        José QuintanillaJ 1 Reply Last reply Reply Quote 0
        • tomT
          tom admin
          last edited by

          @José-Quintanilla https://docs.docker.com/storage/bind-mounts/

          1 Reply Last reply Reply Quote 0
          • José QuintanillaJ
            José Quintanilla @tom
            last edited by

            @tom and I can do that from my computer using the adb shell? Im kinda new at this

            1 Reply Last reply Reply Quote 0
            • tomT
              tom admin
              last edited by

              @José-Quintanilla You'd just modify this command that you're using: docker run -it --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-python:v1.1 /bin/bash

              You can push your script to the VOXL with adb push FILE_NAME PATH_ON_VOXL and then add the -v option to the docker command to point to where the script lives on VOXL and where you'd like it to live inside the docker container

              1 Reply Last reply Reply Quote 0
              • José QuintanillaJ
                José Quintanilla
                last edited by

                I still don't get it

                1 Reply Last reply Reply Quote 0
                • José QuintanillaJ
                  José Quintanilla
                  last edited by

                  so instead of docker run -it --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-python:v1.1 /bin/bash it woul be: docker run -v --rm --privileged --net=host gcr.io/modalai-public/voxl-mavsdk-python:v1.1 /bin/bash?

                  1 Reply Last reply Reply Quote 0
                  • tomT
                    tom admin
                    last edited by

                    @José-Quintanilla No, look at the doc page I sent, you have to specify the location of the file on VOXL and well as where you'd like it to mount inside the container. This is a very common docker use-case and there is plenty of documentation out there to show you how to do it.

                    1 Reply Last reply Reply Quote 0
                    • José QuintanillaJ
                      José Quintanilla
                      last edited by José Quintanilla

                      Hi tom, do you have another source I can look up? I still can't seem to understand how to do it

                      1 Reply Last reply Reply Quote 0
                      • tomT
                        tom admin
                        last edited by

                        @José-Quintanilla https://www.baeldung.com/ops/docker-mount-single-file-in-volume

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