I have installed PDrAW on my Mac before, but now I am trying to make it run in a Ubuntu container in Docker on a Windows 10 machine.
I’m not a programmer, and I have limited experience with Docker, so I’m not sure exactly where the problem lies, and I’m hoping someone can help me in the right direction.
When I get to the point where I need to install repo, I get the message that there is no such file or directory. I’ve tried
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
bash: /root/bin/repo: No such file or directory
I’ve also tried manually downloading repo and copy it from my local machine into /bin/repo. I can see it in the /bin folder but the system refuse to recognize it.
root@9c0bf3f8ffd:/# chmod a+x ~/bin/repo
chmod: cannot access ‘/root/bin/repo’: No such file or directory
I have a theory that it might related to the default Docker user being root, but I don’t know how to get around it?
Of course, as soon as I hit post I figured it out
It was looking in the root user folder, but the folder is just /bin. When I removed /root and ~ from the commands it worked flawlessly.
It took a bit more trial and error, I ended up creating a user specifically for running PDrAW, and it was installed successfully. I managed to extract a .csv file from a video using vmeta-extract.
However, when I try to run the PDrAW viewer I get an error. Is this due to limitations in Docker? Is there a way around this? Can anyone chip in with some tips?
pdraw@9c0bf3f38ffd:~/code/groundsdk-tools$ ./out/groundsdk-linux/staging/native-wrapper.sh pdraw -u ~/Ubuntu/P4573520.MP
| _ \ \ _ _ /\ \ / /
| / |) | '/ _ \ // /
|| |_/||// __/_/
Parrot Drones Awesome Video Viewer
Copyright (c) 2016 Aurelien Barre
Copyright (c) 2017 Parrot Drones SAS
Offline playing of file ‘/home/pdraw/Ubuntu/P4573520.MP4’
error: XDG_RUNTIME_DIR not set in the environment.
E pdraw_desktop: SDL_Init() failed: -1(No available video device)
Hasta la vista, PDrAW!
You have this error because PDrAW can not create a SDL window. This is kind of expected in this case, as your host computer does not provides the graphical server that the libsdl expects. It might be possible to make this work by running a X-server on the host windows machine, and setting the proper DISPLAY environment on your docker image, but this is out-of-scope for the SDK.
The easiest way to run a graphical PDrAW program on a Windows host is to run a full Linux virtual machine, including its own graphical interface.
Thanks @Nicolas , that confirms my suspicion.
I guess I’ll look for other solutions than docker for this (although it is nice to know that I can extract the csv file at least, which is most important for my use). Do you have a recommendation for a VM solution?
Hi @Vaakefjell ,
You should be able to get your local xserver to display windows from inside the docker container. We have done this, for instance, using the streaming.py example in Olympe where the frames from the drone are opened in a cv2.window. For it to work, you have to run a command before you launch the container and then pass the display environment variable to the container as @Nicolas alluded to.
- Launch the container with the following additional flags:
docker run ... --env DISPLAY=$DISPLAY --env="QT_X11_NO_MITSHM=1" (Note the ellipsis. This is meant to denote the additional argument to docker run and not to be included literally).
I was not able to get it to work on the first attempt, but I’ll look into it some more when I have time.
For now I’m leaning in the direction of running a full Linux vm instead.
Your original post mentions an error about the XDG_RUNTIME_DIR env variable. You probably need to set this in the same way you set DISPLAY. I just don’t know what the value should be.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.