Installation
This section provides a guide to install and configure the environment required to run the DJI Tello control on Raspberry Pi 4. It covers dependency installation, ROS 2 Humble setup, and development environment configurations.
System Requirements
Hardware Requirements
- Raspberry Pi 4 (8GB RAM)
- Storage: 32 GB microSD card (Class 10)
- DJI Tello Drone
Software Requirements
- Operating System: Ubuntu 22.04 LTS (64-bit, ARM)
- Python: 3.10
- ROS 2: Humble Hawksbill distribution
- Additional: Git, pip, Python virtual environment
Environment Setup
Update the system
ROS 2 Humble Installation
To install ROS 2 Humble fallow the instructions of the next web page: ROS 2 Humble installation!
Creating a Python virtual environment
To verify if virtualenv is ready installed, run:
If virtualenv is not installed, run: Create a new workspace: open the directory: To create the virtual environment, run: Activate the virtual environment using the next source command: After you activate the environment your command prompt will change to show that you are in a Python virtual environment.To use a virtual environment with ROS 2 you must tell colcon to ignore the directory that contains the files that manage the virtual environment:
To exit your virtual virtual environment type:To ensure your ROS 2 distribution can access Python packages installed in your virtual environment, you need to explicitly add the virtual environment's Python path to ROS's Python system path. This bridges the gap between your isolated Python environment and the ROS 2 ecosystem.
Add the following lines to your virtual environment's activation script to automatically configure the Python path when the environment is activated:
Example: Modify Virtual Environment Activation Script
Your virtual environment's path or your python version will differ. Ensure you use the correct path for your venv name and Python version in the following commands
Navigate to your env-package path:
Use the next command to get the absolute path of your current file:navigate to your virtual environment activate file:
open the activate file using a text editor:
Open activate file
Add the env-package path to your activate file:
Edit activate file
Project Cloning and Initialization
clone the repository into your drone_simple_gui_ws workspace:
Activate your Python virtual environment: Install the necessary Python modules for the application: Compile the packages:Use colcon build only within your drone_simple_gui_ws workspace
Activate the environment you just compiled:
Run the app:
Open activate file
Edit activate file