Get up and running with easy-drone in 5 minutes!
# Run the setup script
chmod +x setup.sh
./setup.sh
# Activate virtual environment
source venv/bin/activate
# Run examples
python examples/topic_list.py# 1. Create virtual environment
python3 -m venv venv
source venv/bin/activate
# 2. Install easy-drone from GitHub
pip install -r requirements.txt
# 3. Run examples
python examples/topic_list.py
python examples/simple_publisher.py
python examples/simple_subscriber.pypython examples/topic_list.pyExpected output if Gazebo is running:
Found X topic(s):
1. /clock
2. /world/default/clock
...
Terminal 1 (Subscriber):
source venv/bin/activate
python examples/simple_subscriber.pyTerminal 2 (Publisher):
source venv/bin/activate
python examples/simple_publisher.pyYou should see:
- Publisher:
[0001] Published: Hello World 0 - Subscriber:
[0001] Received: Hello World 0
If you have Gazebo running with a drone simulation:
# List Gazebo topics
python examples/topic_list.py
# Subscribe to odometry
python examples/simple_subscriber.py /world/default/model/x500/odometry- Is Gazebo running? Try:
gz topic -l - Check firewall: Allow UDP port 11317
- Wait longer: Discovery takes 2-3 seconds
# Reinstall
pip uninstall easy-drone
pip install --no-cache-dir git+https://github.com/TensorFleet/easy-drone-python.gitUse direct publisher address:
# Get address from Gazebo
gz topic -i -t /your/topic
# Output: tcp://172.17.0.1:45943, gz.msgs.Image
# Connect directly
GZ_PUBLISHER_ADDRESS=tcp://172.17.0.1:45943 python examples/simple_subscriber.py /your/topic- Read the full README.md
- Check out the main repository: https://github.com/TensorFleet/easy-drone-python
- Explore more examples in the main repo
# Activate environment
source venv/bin/activate
# Deactivate environment
deactivate
# Update easy-drone to latest version
pip install --upgrade --force-reinstall git+https://github.com/TensorFleet/easy-drone-python.git
# Use Zenoh backend instead of ZeroMQ
export GZ_TRANSPORT_IMPLEMENTATION=zenoh
python examples/simple_publisher.pyHappy flying! 🚁