@Chad-Sweet Also, PLEASE stop telling people to download the roskinetic-xenial docker image that you host. There is nothing modalAI-specific about your docker image, and forcing people to use xenial means forcing them to use Python 3.5 or lower. Furthermore, rosnoetic is far superior than roskinetic when it comes to ROSv1. There are important features added and bugs fixed in rosnoetic.
On our modalAI drones, we simply do a docker pull of a rosnoetic image (that runs on Ubuntu focal):
docker pull ros:noetic-robot
You can find out more information about pulling a ROS docker image this way at the ROS docker tutorial here:
http://wiki.ros.org/docker/Tutorials/Docker
Then just run that docker image (using the docker run -it ...
described at the link above) and start installing other packages you need. For example, we use apt-get to download important ROS packages we need, like mavros, mavros_msgs, etc. and geographic information required. You can follow the nice ROS with MAVROS installation guide (in the "Binary Installation (Debian/Ubuntu)" section):
https://docs.px4.io/main/en/ros/mavros_installation.html
Of course, you will have to create a MAVROS launcher file within the "launch" folder of a ROS package that is customized to the voxl-mavlink-server/voxl-vision-px4. Here is an example with the correct UDP port:
<launch>
<!-- vim: set ft=xml noet : -->
<!-- example launch script for PX4 based FCU's -->
<!-- <arg name="fcu_url" default="/dev/ttyACM0:57600" /> -->
<arg name="fcu_url" default="udp://127.0.0.1:14551@:14551" />
<arg name="gcs_url" default="" />
<!-- <arg name="tgt_system" default="1" /> -->
<arg name="tgt_system" default="$(env PX4_SYS_ID)" />
<arg name="tgt_component" default="1" />
<arg name="log_output" default="screen" />
<arg name="fcu_protocol" default="v2.0" />
<arg name="respawn_mavros" default="true" />
<!-- <arg name="ns" default="drone_n" /> -->
<arg name="ns" default="drone$(env PX4_SYS_ID)" />
<include ns="$(arg ns)" file="$(find mavros)/launch/node.launch">
<arg name="pluginlists_yaml" value="$(find mavros)/launch/px4_pluginlists.yaml" />
<arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" />
<arg name="fcu_url" value="$(arg fcu_url)" />
<arg name="gcs_url" value="$(arg gcs_url)" />
<arg name="tgt_system" value="$(arg tgt_system)" />
<arg name="tgt_component" value="$(arg tgt_component)" />
<arg name="log_output" value="$(arg log_output)" />
<arg name="fcu_protocol" value="$(arg fcu_protocol)" />
<arg name="respawn_mavros" default="$(arg respawn_mavros)" />
</include>
</launch>
Finally, you can also install python packages you might need, including pip3 itself (use apt-get
to install pip
and then use pip
to install other packages). Once you're done, installing, you just need to commit before exiting your shell. So, in another terminal issue:
docker ps
to find the container ID (or at least the first few characters of it) for the currently running rosnoetic container. Then issue:
docker commit CONTAINER_ID DESIRED_IMAGE_NAME:DESIRED_TAG
For example, you might issue:
docker commit 42c731c5 myproject-rosnoetic-focal:v1.0
You can then exit your docker image. You can then remove the original ros-noetic image from your local library (if you wish). You can export your new docker image with:
docker save myproject-rosnoetic-focal:v1.0 | gzip > myproject-rosnoetic-focal-v1.0.tar.gz
Then transfer that resulting tarball (myproject-rosnoetic-focal-v1.0.tar.gz) to your /data partition on the m500 and use
docker load -i myproject-rosnoetic-focal-v1.0.tar.gz
to load the image onto the VOXL. The resulting image will work just as well as the roskinetic image. You can load it on the VOXL with the --net=host
and -v outside_folder:inside_folder:rw
options (among others) to make sure the docker image has the same network access as the VOXL and allows for a folder (or folders) on the VOXL to be mapped to folders inside the docker image (which makes it easier to develop code for your drone without having to rebuild the docker image each time). I believe that modalAI has documentation on this part.
So, please, use a rosnoetic-focal image from ROS directly. It is crazy to be using a roskinetic image (with xenial!) in 2023 or beyond. Of course, ROSv1 will be deprecated in a couple of years anyway (if that's not pushed). Sadly, if you want a ROSv2 image, you will have to implement a ROS bridge between your docker image and the VOXL until the VOXL gets updated to ROSv2, but rosnoetic is very capable (and much better than roskinetic, especially given that you run rosnoetic on focal (not xenial)).