ROS Melodic on VOXL-Flight
-
Hello,
I've been trying to set up my drone to fly autonomously for my research (I'll be flying it indoors). I wanted to follow these instructions https://docs.modalai.com/mavros/ but my drone came with ROS Indigo installed. Can anybody tell me if the VOXL-Flight is compatible with ROS Melodic? I was thinking of uninstalling ROS indigo to install ROS Melodic. My goal is to fly the drone around a pillar and take photos. Please any tips would be much appreciated. Also, If you know another way, please let me know as well.
-
Hi @Kiazoa-Joao I would recommend leveraging Docker in this case and building a local instance of ros melodic and then pushing that docker instance to the voxl flight to control the drone.
Zach
-
@Zachary-Lowell-0 thank you. Do you have any tips on how I can do that?
-
Docker is basically a tool that lets you create 'images' and run 'containers' that emulate certain environments in other foreign environments. So, you can have a container with ubuntu 18 running ROS melodic on a machine with an outdated version of ROS running kinetic or indigo or something old.
This is how I did it:
- Install docker on your base machine
- VOXL is an arm based processor as opposed to amd64, so you will need to run this: https://github.com/multiarch/qemu-user-static which will let you build containers for different system architectures
- To build a docker image, you can either pull a prebuilt base image, run it as a container, install any dependencies and copy over your ROS stuff, then docker commit it to a new image, or list all that out in a dockerfile. I prefer the first way, even though it is pretty scuffed
In your case you would want arm64v8 ubuntu 18.04 ROS melodic
Here's a list of the official docker ROS prebuilts: https://hub.docker.com/r/arm64v8/ros/ - Compress the image into a tar.gz archive, adb push it onto the VOXL and unpack it there. Then you can launch a container from the image (make sure to run it with --net=host argument), and run your ROS nodes inside the container.
There's documentation online for all four steps, and LLMs like chatgpt give pretty good general pointers on command syntax.
-
@jonathankampia thanks a lot. This is very helpful.
I have another issue now. I deleted ROS indigo in an attempt to install ROS melodic, but I am having a hard time re-installing it since VOXL-Flight does not support apt-get. Do you know how I can re-install it? -
@jonathankampia sorry for asking so many questions, I have no experience with development drones, but I need to get this done for my research project. I am a grad student.
-
@Kiazoa-Joao I haven't worked with the voxl flight but if there's no other way probably just reflash the board? Here's a link to the modalai developer downloads: https://developer.modalai.com/
You (shouldn't?) need ROS indigo natively if you are just going to dockerize your onboard ROS stuff. All the dependencies needed by whatever code you run in the container should be satisfied within the container; what is/isn't installed outside the container shouldn't matter. But it sounds like you are running a pretty old board with possibly not the most updated firmware, so reflashing with the latest for the VOXL Flight from that website I sent might be a good idea
-
@jonathankampia got it. Thank you so much.