Skip to content

Autonomoy Computer Software Setup

Let's get started making some software!


Installation

The software setup for the autonomy computer will assume that host operating system is Ubuntu 22.04.5 LTS and the required software has been installed according to their respective documents. The full list of software applications required and their installation procedures are listed below:

With everything installed, we need to make a slight configuration change to Docker to make it easier to use. With a fresh installation, Docker requires a root user (sudo) to function. If your device policies allow it, follow the Docker documentation to manage Docker as a non-root user.

Cloning the Repository

With that completed, we can clone the latest project workspace to a project directory on the machine. git clone https://github.com/Legohead259/ESP32-P4-Test The project (v1.0.0-rc1) has the following directory structure:

ESP32-P4-Test/
├── .git/
│   ├── COMMIT_EDITMSG
│   ├── FETCH_HEAD
│   ├── HEAD
│   ├── ORIG_HEAD
│   ├── branches/
│   ├── config
│   ├── description
│   ├── hooks/
│   ├── index
│   ├── info/
│   ├── logs/
│   ├── objects/
│   ├── packed-refs
│   └── refs/
├── .gitignore
├── apps/
│   ├── elegant_ota/
│   ├── ethernet_ota/
│   ├── ethernet_test/
│   ├── hello_world/
│   └── micro_ros_test/
├── boards/
│   └── esp32_p4.json
├── config/
│   └── uros_colcon.meta
├── docs/
│   ├── main.py
│   ├── mkdocs.yml
│   ├── site/
│   └── source/
├── envs/
│   ├── common.ini
│   ├── controller_1.ini
│   ├── controller_2.ini
│   ├── controller_3.ini
│   ├── controller_4.ini
│   ├── ethernet_ota_followup.ini
│   ├── ethernet_ota_initial.ini
│   ├── ethernet_test.ini
│   └── micro_ros_test.ini
├── include/
├── lib/
│   ├── README
│   ├── controller/
│   ├── micro_ros_controller/
│   ├── micro_ros_pubsub/
│   └── uros/
├── platformio.ini
├── src/
├── test/
└── variants/
    └── esp32_p4/

PlatformIO Environment File Interactions

Breaking down this structure, we can start with the platformio.ini file with is the main configuration file for the PlatformIO project workspace. It imports the files located in the env/ directory which in turn cross-reference each other and build the configurations for each controller programming environment. The interactions between the environmental files and the rest of the application code is documented in the chart below. Note that for brevity, only "controller_1" is shown in the chart. The interactions are the same for the other controllers. The blue boxes, "OTA Initial", "OTA Followup", and "MicroROS Test" denote the actual PlatformIO environments that are uploaded the microcontrollers. These will be explore more in-depth shortly.

PIO Environment File Interactions
Figure 1: The interactions between the PlatformIO environmental variables and the relevant sections of the workspace.

The green "ESP32-P4 Base" component leverages the Arduino framework's capability to define custom board variants for a project. This will allow us to define custom pin variables in the future depending on what is connected to the microcontroller. For the moment, we have to source the ESP32-P4 build framework from the PIOArduino fork of PlatformIO since official support has not been rolled out at time of writing. Within the "Common" configuration, we can also define environmental variables that will be shared by all the microcontrollers like the IP address domain. From the ESP32-P4 base, we can build out the "Controller Base" definition which will include all of the build flags like the IP domain, controller name, ROS domain ID. From the "Controller Base" definition, we can define an extended definition for "Controller OTA" that contains the information like the upload protocol, IP address, port, and login information to enable OTA programming.