Stopping the standard containers#
To setup the development environment you need to bring down all docker containers and then setup a special development container.
To do so:
Bring down all the containers by going to
http://<hostname>.local:9000/#/containersin your browser and stopping each container.
The only exception would be the
wifi-access-pointcontainer. Keep it running if you want to be able to connect to the Duckiedrone own access point.
Reboot, and run
docker update --restart=no <CONTAINER_NAME_1> <CONTAINER_NAME_2> <...>
for all containers that you had stopped and automatically restarts.
Reboot again. When you are done,
docker ps -ashould show no containers running.
Development container setup#
To make it possible for you to develop your own code on the drone, you need to set up a docker workspace from the source code of the repository
ssh duckie@yourdronefrom your base station to ssh into your drone. The password is
duckieuser home directory, install the needed dependencies by running:
sudo apt install rake git -y
Then clone the repository to your Duckiedrone’s SD card and switch to the branch
mkdir -p catkin_ws/src && cd catkin_ws/src git clone https://github.com/h2r/pidrone_pkg && cd pidrone_pkg
Finally build the Docker image needed to run the software (which is back on an older version of ROS, ROS Kinetic).
rake build && rake create
The next step will take a long time because it has to download all the dependencies to build the image. Make sure your Raspberry Pi is plugged into an external USB power supply.
Before using this container, you will want to bring down all the other containers. We recommend doing this from the Portainer page (accessible at
<hostname>:9000), stopping all the running containers.
You will need to do this each time you reboot the drone.
If you are running the access point (AP) configuration by shorting the pins on the Raspberry Pi Hat, do not stop the container
Doing so will make the AP stop and you will lose your connection, requiring to reboot.
You also need to download the
raspicam_nodepackage to be installed later:
cd ~/catkin_ws/src/ git clone https://github.com/UbiquityRobotics/raspicam_node
You can start the container and go inside it by running, from the
Once in the container, you need to install the
raspicam_nodeROS packages. To do this execute:
cd ~/catkin_ws catkin_make && catkin_make install
Now that all the packages are installed, to access the workspace you will use to control the drone, run:
screen -c pi.screenrc
This will start a screen session with each of the ROS nodes needed to run the drone and make it fly.
Anytime you’ll want to interact with the drone software you will first need to start the container by running
rake start from the
~/catkin_ws/src/pidrone_pkg directory and then, inside the container, running
screen -c pi.screenrc.