ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. kasarrowtec
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 33
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by kasarrowtec

    • RE: Autostart docker containers via docker-autorun.service not working

      Thanks for the suggestion Eric but unfortunately i have tried those suggestions. I have identified the last executing service file on boot and made the docker-autorun.service run after and also added a sleep and a ping test.

      I have come to the conclusion that --net=host is causing the problem, im not sure why. So i need to pass the ports through when running the container via a different method.

      Do you guys have a certain way of passing ports through when running docker containers on the VOXL ? something like docker run -p 14551:14551 ?

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Autostart docker containers via docker-autorun.service not working

      I understand the docker kernel is a little different on the VOXL so if you could just tell me how you would map ports from the VOXL to the container ? as -p is not working

      ive also tried --add-host and --expose

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Autostart docker containers via docker-autorun.service not working

      when i do not use the --net=host flag it does work !

      but to pass through the ports we need i added the -p 14551:14551 flag but was met with this error from docker -

      failed to create endpoint on network bridge: iptables failed: iptables -t nat -A DOCKER -p tcp -d 0/0 --dport 14551 -j DNAT --to-destination 172.17.0.2:14551 ! -i docker0: iptables: No chain/target/match by that name.
      

      any idea how i might fix this ?

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Autostart docker containers via docker-autorun.service not working

      i tried disabling the wifi service so the VOXL only uses LTE and it still gives the same error.

      I disabled the wifi through systemctl disable wlan-daemon.service

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Autostart docker containers via docker-autorun.service not working

      I believe it may be an issue with the wifi connecting alongside the LTE and breaking the docker container when a new host is added to ifconfig.

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Autostart docker containers via docker-autorun.service not working

      via the LTE module for the VOXL, using a sim cardphoto_2022-03-29_10-16-44.jpg

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Autostart docker containers via docker-autorun.service not working

      also the SD card has been emptied and has more then enough available space - regardless of the error code.

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • Autostart docker containers via docker-autorun.service not working

      Hi,

      We are using a VOXL flight deck with LTE and require that the drone starts some c++ logic inside a container on start up. We have done this through the docker-autorun.service file below -

      [Unit]
      After=docker-daemon.service
      Requires=docker-daemon.service
      
      [Service]
      
      Type=forking
      
      ExecStartPre=/usr/bin/docker-prepare.sh
      ExecStart=/etc/modalai/docker-autorun-script.sh
      #ExecStop=/bin/bash -c "docker kill $(docker ps -q)"
      
      [Install]
      WantedBy=default.target
      

      Then inside the docker-autorun-script.sh we have the following -

      echo "initializing primevoxl"
      
      ((count =60))
      while [[ $count -ne 0 ]] ; do
          ping -c 1 8.8.8.8                    # Try once.
          rc=$?
          if [[ $rc -eq 0 ]] ; then
              ((count = 1))                    # If okay, flag loop exit.
          else
              sleep 1                          # Minimise network storm.
          fi
          ((count = count - 1))                # So we don't go forever.
      done
      
      if [[ $rc -eq 0 ]] ; then               # Make final determination.
      docker run -i --restart=always --privileged --net=host primevoxl &
      else
          echo "Timeout"
      fi
      

      The code does a ping test then on success runs a docker container via -
      docker run -i --restart=always --privileged --net=host primevoxl &

      The docker image ends with starting a piece of c++ code via a CMD in the dockerfile. The code that we run inside the container is a simple pubsub code with AWS IoT core to listen for missions etc. this works fine with no errors when i run the container normally and even when i run /etc/modalai/docker-autorun-script.sh it works fine and gets a connection.

      But when the docker-autorun-script.sh is started with the service file on reboot we get the following error -
      error-code.jpg

      I cant seem to see where the error lies and whether i am starting the container correctly via service ?

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: HITL simulation with VOXL Flight

      Hi,

      Thanks for the link, i have been following that tutorial but when i connect my voxl flight to Qgroundcontrol i get my drone is "not ready" . ive set it to HITL mode. It says one of the sensors need calibration but wont allow me to do it -

      Capture.JPG
      Capture1.JPG
      photo_2022-02-23_15-24-17.jpg

      posted in VOXL Flight
      kasarrowtecK
      kasarrowtec
    • RE: HITL simulation with VOXL Flight

      when i try to run ./Tools/jmavsim_run.sh -q -s -d /dev/ttyACM0 -b 921600 -r 250 i get a port busy error ?

      posted in VOXL Flight
      kasarrowtecK
      kasarrowtec
    • HITL simulation with VOXL Flight

      Hey,

      I am trying to do a HITL simulation with a VOXL Flight - is this possible ? after following the instructions via - https://docs.px4.io/master/en/simulation/hitl.html i keep getting preflight check errors with the compass sensor. If i connect a GPS receiver to the VOXL Flight deck will it work ? or do you guys have any advice on how to fake a GPS or a better solution for this ?

      Best regards
      Kas Arrowtec

      posted in VOXL Flight
      kasarrowtecK
      kasarrowtec
    • RE: RTK (without Qgroundcontrol)

      Thanks a lot Eric this definitely helps, will keep updated on progress.

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: RTK (without Qgroundcontrol)

      @Eric-Katzfey said in RTK (without Qgroundcontrol):

      Mavlink messages for PX4.

      the custom IOT board is at the base station, not on the drone - it uses wifi/LTE to send RTK data via AWS cloud.

      We get the RTCM messages from AWS via MQTT - So we are able to get the RTK data on the linux part of the voxl. Now we want to send those RTCM messages into mavlink messages to the PX4 part of the VOXL and are unsure of the software to use etc.

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RTK (without Qgroundcontrol)

      Hi,

      We are trying to achieve RTK without Qgroundcontrol. We have a base station thats streaming RCTM messages (with a custom IOT board) to the VOXL over MQTT. The base station board has a ublox FP9 chip.

      Were a little unsure of how to approach things on the VOXL side in terms of connecting to the PX4 or just how to pump in our GPS stream. The end goal is to have RTK working independently from QGC and with our custom board.

      Any suggestions or pointers will be much appreciated, thank you.

      Best regards

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • Multi Stage Docker Builds

      Hi,

      I am trying to do a multi stage docker build as my current docker image is too large but it seems that it is not possible with my current dockerfile.
      I start with

      FROM arm64v8/ubuntu:latest as BUILDER

      and it is unable to pull the image from docker.

      I also tried just
      FROM arm64v8/ubuntu:latest
      then when i need to copy the compiled file over in the next part using -
      COPY --from=0
      (0 being the first build)
      and i am returned with an error stating the --from parameter doesnt exist in voxl-docker.

      Does voxl-docker support multi stage deployment and if so how would i go about it ? or any useful tips ?

      Best regards

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: execute script to start docker container on start up

      So i managed to get it to work with the following service file and script file -

      [Unit]
      After=docker-autorun.service
      
      [Service]
      Type=simple
      ExecStart=/bin/bash /home/root/mastervoxl_init.sh
      
      [Install]
      WantedBy=multi-user.target
      
      #!/bin/bash
      echo 'initializing mastervoxl docker container'
      docker run --restart=always -i mastervoxl /bin/bash
      
      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: execute script to start docker container on start up

      The most promising way seemed to be to make a service file in etc/systemd/system -

      [Unit]
      Description=Starts the mastervoxl docker container on startup.
      
      [Service]
      Type=simple
      ExecStart=/bin/bash /home/root/mastervoxl_init.sh
      
      [Install]
      WantedBy=multi-user.target
      

      and the script mastervoxl_init.sh being -

      #!/bin/bash
      echo 'initializing mastervoxl docker container'
      docker run -it mastervoxl /bin/bash
      
      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • execute script to start docker container on start up

      Hi,

      i am trying to execute a script that will start a docker container every time the VOXL is started.

      A lot of the suggestions for running a script on start up on linux like using crontab or systemd or rc.local is not available with this custom yocto build on the VOXL.

      Does anyone have the best way of doing this ?

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Docker cant log in to push to docker hub

      Hi Alex,

      this was very helpful - got it working and managed to get the docker image out.

      thank you for your help !

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec
    • RE: Docker cant log in to push to docker hub

      @Eric-Katzfey

      Hi Eric,

      when using docker save myimage:latest | gzip > myimage_latest.tar.gz
      how do i specify where to build the tar file ? to build on the SD card and not /data.

      posted in Ask your questions right here!
      kasarrowtecK
      kasarrowtec