# voxl-docker-mavsdk-python build issues

Source: https://forum.modalai.com/topic/3463/voxl-docker-mavsdk-python-build-issues
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: voxl
Posted: 2024-05-21 17:30:23 UTC by Alexander Saunders
Replies: 46 · Views: 28755

## Alexander Saunders · 2024-05-21 17:30:23 UTC

@Alex-Kushleyev Good afternoon Alex,

I'm currently running into issues with the voxl-mavsdk-python docker image. I've been following the documentation and README: https://docs.modalai.com/mavsdk/  https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk-python/-/tree/master?ref_type=heads 

All params that are mentioned in the documentation have been updated. When adb shell in the VOXL and after running voxl-configure-docker-support.sh, gcr.io/modalai-public/voxl-mavsdk-python:v1.1 returns:
```
Error response from daemon: manifest for gcr.io/modalai-public/voxl-mavsdk-python:v1.1 not found: manifest unknown: Failed to fetch "v1.1" from request "/v2/modalai-public/voxl-mavsdk-python/manifests/v1.1".
```

:latest has also been tried with no success. When searching for similar image in Docker, the only image returned is: 
```
 jbruell94/drone-control-modalai:vectro-drone
```

Within here, there are similar, but not 100% the same folders/files between the two. Has the name of the image changed or been moved to a different location?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-05-22 04:30:47 UTC

@Alexander-Saunders , I am not sure about this one, i asked my colleague to check it out.

Alex

## Reply by Alexander Saunders · 2024-05-22 19:21:21 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Good afternoon,

I'm just following up with you to see if there an update with the process of enabling MAVSDK with the VOXL2.

I did some research on my end and am getting conflicting information on what is necessary for the older VOXL and the VOXL2.

In the section relating to VOXL2: https://docs.modalai.com/docker-on-voxl/#download--push-a-docker-image-to-voxl, voxl-configure-docker-support.sh is not recommended to be ran, but for the README from the link on MAVSDK on VOXL2, I'm told to run said command.

I am aware the link above is in reference to Ubuntu, but the command is shared between VOXL and VOXL2 documentation.

Also the location /data/docker/mavsdk does not exist that is referenced in the documentation, but /data directory does.

Could you or someone else follow up with me on which parts of the documentation is for VOXL or VOXL2 so that I can pull down the docker image for MAVSDK. If just enabling the parameters and running the services for voxl-vision-hub and voxl-mavlink-server is all or going through the normal Docker install on VOXL2, can you share that.

Thank you,
Alexander

![Screenshot 2024-05-22 at 2.50.32 PM.png](https://forum.modalai.com/assets/uploads/files/1716405566791-screenshot-2024-05-22-at-2.50.32-pm.png) ![Screenshot 2024-05-22 at 3.20.42 PM.png](https://forum.modalai.com/assets/uploads/files/1716405652542-screenshot-2024-05-22-at-3.20.42-pm.png) ![Screenshot 2024-05-22 at 3.20.07 PM.png](https://forum.modalai.com/assets/uploads/files/1716405659048-screenshot-2024-05-22-at-3.20.07-pm.png) ![Screenshot 2024-05-22 at 3.09.43 PM.png](https://forum.modalai.com/assets/uploads/files/1716405671556-screenshot-2024-05-22-at-3.09.43-pm.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-22 19:54:59 UTC (in reply to Alexander Saunders)

@Alexander-Saunders VOXL has Docker pre-installed but you need to run voxl-configure-docker-support.sh in order to enable it. VOXL 2 does not have Docker pre-installed, but since it is a Debian-based platform you can just install Docker the standard way. For VOXL 2 you do not use voxl-configure-docker-support.sh.

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-22 19:57:07 UTC (in reply to Alexander Saunders)

@Alexander-Saunders You should try building the Docker container instead of downloading it from the repo since that seems to not be functional at the moment (Looking into it).

## Reply by Alexander Saunders · 2024-05-22 20:40:13 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Just to make sure I'm not misunderstanding you, you want me to the instructions below that is coming from: https://gitlab.com/voxl-public/voxl-docker-images/voxl-docker-mavsdk-python![Screenshot 2024-05-22 at 4.39.11 PM.png](https://forum.modalai.com/assets/uploads/files/1716410401758-screenshot-2024-05-22-at-4.39.11-pm.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-22 22:13:33 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Yes

## Reply by Alexander Saunders · 2024-05-23 13:24:28 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Good morning Eric,

So I tried building the image for both voxl-docker-mavsdk & voxl-docker-mavsdk-python. I run into the same issue with both, adb: command not found. Additionally, with voxl-docker-mavsdk-python the common file is not found.

the ./build-image.sh was run on both directories in both SSH and ADB shell.

I am at a standstill with testing until I can get the docker image built. Any additional documentation is greatly appreciated!

Respectfully,
Alexander

![Screenshot 2024-05-23 at 9.20.56 AM.png](https://forum.modalai.com/assets/uploads/files/1716470625144-screenshot-2024-05-23-at-9.20.56-am.png) ![Screenshot 2024-05-23 at 9.05.11 AM.png](https://forum.modalai.com/assets/uploads/files/1716470625190-screenshot-2024-05-23-at-9.05.11-am.png) ![Screenshot 2024-05-23 at 9.14.44 AM.png](https://forum.modalai.com/assets/uploads/files/1716470625210-screenshot-2024-05-23-at-9.14.44-am.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-23 15:43:17 UTC (in reply to Alexander Saunders)

@Alexander-Saunders You run build-image.sh on your host computer, not on the voxl

## Reply by Alexander Saunders · 2024-05-23 17:10:27 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Hey Eric, I'm running the ./build-image.sh on a laptop and am running into this error. ![Screenshot from 2024-05-23 13-02-42.png](https://forum.modalai.com/assets/uploads/files/1716484185797-screenshot-from-2024-05-23-13-02-42.png)

## Reply by Alexander Saunders · 2024-05-23 17:15:27 UTC (in reply to Eric Katzfey)

@Eric-Katzfey ![image.png](https://forum.modalai.com/assets/uploads/files/1716484524089-image.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-24 15:33:20 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Oh, the repo probably has the name `master` changed to `main`. Can you change the Dockerfile to try to use main instead of master and see if that works?

## Reply by Alexander Saunders · 2024-05-24 16:39:39 UTC (in reply to Eric Katzfey)

@Eric-Katzfey No luck with that. Also the branch is a master. ![image (1).png](https://forum.modalai.com/assets/uploads/files/1716568773569-image-1.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-24 17:10:39 UTC (in reply to Alexander Saunders)

@Alexander-Saunders But that's a different problem. Before it was the checkout of master. This is something else.

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-24 17:11:00 UTC (in reply to Alexander Saunders)

@Alexander-Saunders I'll try it and see what happens.

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-24 17:18:44 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Okay, yes, I see the same error. Sorry about that. Let me see if I can figure out what is going wrong.

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-24 17:20:41 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Can you try with the `origin/ascend/docker` branch of voxl-docker-mavsdk-python instead? Seems like that's where the latest updates have happened and haven't been merged back into master yet.

## Reply by Alexander Saunders · 2024-05-24 17:29:54 UTC (in reply to Eric Katzfey)

@Eric-Katzfey I went ahead and tried the voxl-docker-mavsdk repo also and get the same issue. I tried docker pull docker.io/arm64v8/ubuntu:bionic and giving the user permissions for the file/folder.

What is stumping me is the registry-1.docker.io. I can ping it and do a DNS lookup just fine. Also pinging google is fine. But the error is persisting in relation to it.

I will try the other branches for voxl-docker-mavsdk andvoxl-docker-mavsdk-python. Will that require changing main to the branch name for the DockerFile?

## Reply by Alexander Saunders · 2024-05-24 17:40:55 UTC (in reply to Eric Katzfey)

@Eric-Katzfey ![image (2).png](https://forum.modalai.com/assets/uploads/files/1716572447055-image-2.png) This is from the ascend branch

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-26 17:03:31 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Not sure why that is happening. That does not happen when I try it. I'm guessing that you have a networking issue of some sort or perhaps all this messing with Docker on the target has somehow corrupted it and it needs to be reinstalled.

## Reply by Alexander Saunders · 2024-05-28 14:18:32 UTC (in reply to Eric Katzfey)

@Eric-Katzfey So I deleted and re cloned voxl-docker-mavsdk-python branch ascend/docker. The build image failed halfway in. Is there any work that needs to be done on the VOXL2 or host computer that I am not aware of? ![Screenshot from 2024-05-28 10-15-10.png](https://forum.modalai.com/assets/uploads/files/1716905898369-screenshot-from-2024-05-28-10-15-10.png) ![Screenshot from 2024-05-28 10-14-45.png](https://forum.modalai.com/assets/uploads/files/1716905902798-screenshot-from-2024-05-28-10-14-45.png)

## Reply by Alexander Saunders · 2024-05-28 15:47:36 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Also in the environment, the SDK is 1.2, python 3.10.12, Ubuntu 22.04.4 LTS

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-28 16:41:33 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Okay, we're looking into it, thanks!

## Reply by Alexander Saunders · 2024-05-28 19:14:13 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Thank you! What kind of timeline should I expect to hear back from you?

## Reply by brahim · 2024-05-28 19:27:28 UTC (in reply to Alexander Saunders)

@Alexander-Saunders I am testing a fix for this issue as we speak. I've sourced the problem to a Mavsdk dependency that had a recent upstream change which is causing issues on the voxl2 build image script.

## Reply by brahim · 2024-05-28 21:31:07 UTC (in reply to Alexander Saunders)

@Alexander-Saunders can you try the following patch to the Dockerfile?

 I noticed that the mavsdk 3rd party package updated their header files to include a filesystem header that is incompatible with standard cpp libraries on ubuntu 18.04, hence switching the dockerfile to focal instead of bionic. You can save the text in a *.patch file (e.g. "filesystem.patch") and then run

```
git apply filesystem.patch
```

Alternatively just switch the docker base image from "bionic" to "focal"

```
diff --git a/Dockerfile b/Dockerfile
index c38a5c7..08e668b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM arm64v8/ubuntu:bionic
+FROM arm64v8/ubuntu:focal
 
 WORKDIR /home
 
@@ -8,7 +8,7 @@ RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/nul
 RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
 RUN apt-get update
 RUN apt-get install -y cmake build-essential colordiff git doxygen -y
-RUN apt-get install -y python3 python3-pip -y 
+RUN apt-get install -y python3 python3-pip -y
 RUN apt-get install -y git libxml2-dev libxslt-dev curl
 
 RUN git clone https://github.com/mavlink/MAVSDK.git

```

## Reply by Alexander Saunders · 2024-05-28 21:58:57 UTC (in reply to brahim)

@brahim Thank you for getting back to me! I do not have access to the VOXL at this moment, but will be able to test first thing in the morning.

## Reply by Alexander Saunders · 2024-05-29 17:58:21 UTC (in reply to brahim)

@brahim Changing from bionic to focal lead to Docker being installed successfully. I am currently following this documentation: https://docs.modalai.com/voxl2-PX4-hitl/ . 

The commands were ran fine: 
```
1. wget https://storage.googleapis.com/modalai_public/modal_dockers/voxl-gazebo-docker_v1_2.tgz
2. docker load < voxl-gazebo-docker_v1_2.tgz
3. docker tag voxl-gazebo-docker:v1.2 voxl-gazebo-docker:latest
```

I am not using QGC because I am troubleshooting why only heartbeat packages are being sent and not GPS, Odometry, etc. voxl-px4 and qvio-server have been disabled.

In a separate terminal, voxl-px4-hitl is being ran as called for in the documentation. The main issues are gazebo seems to not give expected outputs with some of the commands and the lack of status data from dsp_hitl. I've also looked through the forum to see if anyone else had a similar problem. If you or anyone could point me in the correct direction, I would greatly appreciate that!

-Alexander
![Screenshot from 2024-05-29 13-27-31.png](https://forum.modalai.com/assets/uploads/files/1717005496768-screenshot-from-2024-05-29-13-27-31.png) ![Screenshot from 2024-05-29 13-28-05.png](https://forum.modalai.com/assets/uploads/files/1717005496801-screenshot-from-2024-05-29-13-28-05.png) ![Screenshot from 2024-05-29 13-32-45.png](https://forum.modalai.com/assets/uploads/files/1717005496860-screenshot-from-2024-05-29-13-32-45.png)

## Reply by Stefan Amundarain · 2024-05-29 19:04:45 UTC (in reply to Alexander Saunders)

@Alexander-Saunders @brahim to add on a follow up, what is the correct pin out of the FTDI cable we plug into the j18 port? Documentation says no power, just RX, TX, and Gnd; but YouTube instruction by Ascend Engineering uses Power as well. YouTube video by ModalAI matches instructions but the information doesn’t seem to be read, just heartbeat packets.

## Reply by Vinny (ModalAI staff) · 2024-05-29 19:13:32 UTC (in reply to Stefan Amundarain)

Hi @Stefan-Amundarain 
Not all FTDI cables are the same. There are literally over a dozen variations out there.
If the specific FTDI cable requires a "VTREF" to set the logic levels, then a VCC is needed as on Ascend's example. If you use one that is USB powered and TTL levles, then likely it is already set for 3.3V, and no power is required.
So, please double check your specific FTDI cable before following any tutorials you may see and make appropriate mods as needed.

Thanks!

## Reply by Alexander Saunders · 2024-05-30 19:16:43 UTC (in reply to Vinny)

@Vinny @brahim @Eric-Katzfey We're still running into the issue of no meaningful data being sent to gazebo. The only data is still the heartbeat packets. 
We're referencing: https://docs.modalai.com/voxl2-PX4-hitl/ 

We've done the steps up to: docker run --rm -it --net=host --privileged -e DISPLAY=$DISPLAY -v /dev/input:/dev/input:rw -v /tmp/.X11-unix:/tmp/.X11-unix:ro voxl-gazebo-docker ./run_gazebo.bash

and 

qshell dsp_hitl status which is telling us about the heartbeat only.

Also, we tried the archived instructions to see if we would get a different output.

The FTDI cable used is the same, but the serial port closed issue has stopped. Don't know why.

The warning for SDF I feel like is the source of the problem.

The warning when running docker run --rm: 
![image (5).png](https://forum.modalai.com/assets/uploads/files/1717096478749-image-5.png) 

Status output:
![image (3).png](https://forum.modalai.com/assets/uploads/files/1717096598677-image-3.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-31 00:15:02 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Are you doing `xhost +` before running docker?

## Reply by Alexander Saunders · 2024-05-31 12:51:43 UTC (in reply to Eric Katzfey)

@Eric-Katzfey The latest attempts, yes. After running that and 
```
docker run --rm -it --net=host --privileged -e DISPLAY=$DISPLAY -v /dev/input:/dev/input:rw -v /tmp/.X11-unix:/tmp/.X11-unix:ro voxl-gazebo-docker ./run_gazebo.bash
```
gazebo will open up. The issue is connect gazebo with VOXL2 to run in HITL mode. I've followed two of the video from Modalai and Ascend exactly with no luck. Also went through the documentation again.

All instances are being ran on the host computer. When comparing the image from above to docs, we are only getting heartbeat packets.
![Screenshot 2024-05-31 at 8.48.34 AM.png](https://forum.modalai.com/assets/uploads/files/1717159892820-screenshot-2024-05-31-at-8.48.34-am.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-31 16:09:00 UTC (in reply to Alexander Saunders)

@Alexander-Saunders The heartbeat counter is the amount of heartbeat messages being sent out, not received. So you are not getting anything on the serial port.

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-31 16:10:28 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Also, take a look at this: https://www.reddit.com/r/linux4noobs/comments/lu1plx/hi_i_get_this_authorization_required_but_no/

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-31 16:11:10 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Definitely looks like a permissions issue of some sort in your system.

## Reply by Alexander Saunders · 2024-05-31 17:15:52 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Are you suggesting giving the file/repo permissions with 
```
xhost si:localuser:root
```

Also we are using the FDTI cable provided with the ESC AND USB C to A to connect to host.

## Reply by Eric Katzfey (ModalAI staff) · 2024-05-31 18:06:47 UTC (in reply to Alexander Saunders)

@Alexander-Saunders I'm only suggesting that there is a permissions problem of some sort. I don't see that on my machine so just trying to figure out what is different in your environment.

## Reply by Alexander Saunders · 2024-06-03 13:00:19 UTC (in reply to Eric Katzfey)

@Eric-Katzfey I tried giving permission to user with no change.
![image (6).png](https://forum.modalai.com/assets/uploads/files/1717419616874-image-6.png) ![image (7).png](https://forum.modalai.com/assets/uploads/files/1717419617039-image-7.png)

## Reply by Alexander Saunders · 2024-06-03 13:08:44 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Is it possible to see a picture of your terminal of the commands you sent?

## Reply by Alexander Saunders · 2024-06-03 13:21:56 UTC (in reply to Eric Katzfey)

@Eric-Katzfey ![image (8).png](https://forum.modalai.com/assets/uploads/files/1717420909608-image-8.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-06-03 16:01:46 UTC (in reply to Alexander Saunders)

@Alexander-Saunders iris_hitl.sdf is part of the docker image so it will be the same.

## Reply by Eric Katzfey (ModalAI staff) · 2024-06-03 16:03:43 UTC (in reply to Alexander Saunders)

@Alexander-Saunders 
```
modalai@modalai-XPS-15-9570:~$ docker run --rm -it --net=host --privileged -v /dev/input:/dev/input:rw voxl-gazebo-docker
root@modalai-XPS-15-9570:/usr/workspace/voxl2_hitl_gazebo# ls
CMakeLists.txt           build-gazebo.bash    include       package.xml            scripts
Dockerfile               build-mavlink.bash   mavlink       resources              src
README.md                cmake                mavlink-libs  run-docker-image.bash  unit_tests
build                    docker-commands.txt  models        run_gazebo.bash        worlds
build-docker-image.bash  external             msgs          run_headless.bash
root@modalai-XPS-15-9570:/usr/workspace/voxl2_hitl_gazebo# ls /dev/ttyUSB0
/dev/ttyUSB0
root@modalai-XPS-15-9570:/usr/workspace/voxl2_hitl_gazebo# ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Jun  3 16:02 /dev/ttyUSB0
root@modalai-XPS-15-9570:/usr/workspace/voxl2_hitl_gazebo# ./run_headless.bash 
GAZEBO_PLUGIN_PATH :/usr/workspace/voxl2_hitl_gazebo
GAZEBO_MODEL_PATH :/usr/workspace/voxl2_hitl_gazebo/models
LD_LIBRARY_PATH :/usr/workspace/voxl2_hitl_gazebo/build
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Opened serial device /dev/ttyUSB0
```

## Reply by Eric Katzfey (ModalAI staff) · 2024-06-03 16:19:23 UTC (in reply to Alexander Saunders)

@Alexander-Saunders 
```
modalai@modalai-XPS-15-9570:~$ docker images | grep gazebo
voxl-gazebo-docker            latest       1c8ce4f31e4f   3 months ago    3.73GB
voxl-gazebo-docker            v1.2         1c8ce4f31e4f   3 months ago    3.73GB
```

## Reply by Eric Katzfey (ModalAI staff) · 2024-06-03 16:21:23 UTC (in reply to Alexander Saunders)

@Alexander-Saunders We have quite a few customers using HITL successfully and they are using the instructions in the document so I'm thinking there is something in your environment that is causing the issue. Do you have access to a different Linux machine that you can use?

## Reply by Alexander Saunders · 2024-06-10 21:00:15 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Update:

We switched some of the wires for the FTDI cable and now receiving data. We went back to following the HITL docs along with https://forum.modalai.com/topic/3511/serial-port-closed-and-other-hitl-errors/9 . We have the drone running in HITL via QGC and running the voxl-px4-hitl command. Despite this, gazebo is still not showing the drone or connecting. Could the issue possibly be with the Dockerfile that reflects bionic instead of focal since that had to be changed for the image to be pulled? We also tried running ./run-docker.sh within the directory and received docker run --help.

![image (11).png](https://forum.modalai.com/assets/uploads/files/1718053207579-image-11.png) ![image (12).png](https://forum.modalai.com/assets/uploads/files/1718053207699-image-12.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-06-10 23:10:59 UTC (in reply to Alexander Saunders)

@Alexander-Saunders Looks better now. What does the `dsp_hitl start` command look like now? Seems like it is setup for VIO only.
