Skip to content

Latest commit

 

History

History
134 lines (95 loc) · 2.53 KB

File metadata and controls

134 lines (95 loc) · 2.53 KB

Quick Start Guide

Get up and running with easy-drone in 5 minutes!

Option 1: Automatic Setup (Recommended)

# Run the setup script
chmod +x setup.sh
./setup.sh

# Activate virtual environment
source venv/bin/activate

# Run examples
python examples/topic_list.py

Option 2: Manual Setup

# 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.py

Testing the Examples

Test 1: List Topics

python examples/topic_list.py

Expected output if Gazebo is running:

Found X topic(s):
  1. /clock
  2. /world/default/clock
  ...

Test 2: Publisher & Subscriber

Terminal 1 (Subscriber):

source venv/bin/activate
python examples/simple_subscriber.py

Terminal 2 (Publisher):

source venv/bin/activate
python examples/simple_publisher.py

You should see:

  • Publisher: [0001] Published: Hello World 0
  • Subscriber: [0001] Received: Hello World 0

Test 3: Connect to Gazebo

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

Troubleshooting

"No topics found"

  • Is Gazebo running? Try: gz topic -l
  • Check firewall: Allow UDP port 11317
  • Wait longer: Discovery takes 2-3 seconds

"Module not found: gz_transport"

# Reinstall
pip uninstall easy-drone
pip install --no-cache-dir git+https://github.com/TensorFleet/easy-drone-python.git

Discovery not working with Docker

Use 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

Next Steps

Common Commands

# 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.py

Happy flying! 🚁