Skip to content

Latest commit

 

History

History
executable file
·
103 lines (68 loc) · 3.71 KB

README.md

File metadata and controls

executable file
·
103 lines (68 loc) · 3.71 KB

ROS2 Package for Parrot Anafi Drones Navigation

This ROS2 package contains an interface to control drones from the Parrot Anafi family (4K, Thermal, USA, Ai, Sphinx).

Overview

Author: Andriy Sarabakha
Affiliation: Nanyang Technological University (NTU), Singapore
Maintainer: Andriy Sarabakha, [email protected]

Keywords: Parrot, UAV, controller

This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.

Installation

This package has been tested with python3 in ROS2 Humble/Ubuntu 22.04 (recommended) and ROS2 Jazzy/Ubuntu 24.04.

Dependencies

  • anafi_ros - ROS bridge for Parrot Olympe SDK

  • (optional) xterm - terminal emulator:

    sudo apt-get install xterm
    

Clone

To build from source, clone the latest version from this repository into your ROS2 workspace and build the package using:

cd ~/ros2_ws/src
git clone -b ros2 https://github.com/andriyukr/anafi_autonomy.git
sudo chmod -R 777 anafi_autonomy/
cd ..
colcon build
source install/setup.bash

Usage

Method 1 (without xterm):

To control the drone,

  1. in the terminal 1, run:

    ros2 launch anafi_autonomy anafi_autonomy_launch.py ip:='192.168.53.1' model:='ai'
    

    where

    • ip has to be
      • '192.168.53.1', for connection through Skycontroller (recommended),
      • '192.168.42.1', for direct connection to the drone through WiFi,
      • '10.202.0.1', for connection to the simulated drone in Sphinx;
    • model can be '4k', 'thermal', 'usa' or 'ai', depending on the drone model you are connectiong to.
  2. in terminal 2, run:

    ros2 run anafi_autonomy keyboard --ros-args -r __ns:=/anafi
    

The commands can be keyed in terminal 2.

Method 2 (with xterm):

To control the drone, in the terminal, run:

ros2 launch anafi_autonomy control_anafi_launch.py ip:='192.168.53.1' model:='ai'

where

  • ip has to be
    • '192.168.53.1', for connection through Skycontroller (recommended),
    • '192.168.42.1', for direct connection to the drone through WiFi,
    • '10.202.0.1', for connection to the simulated drone in Sphinx;
  • model can be '4k', 'thermal', 'usa' or 'ai', depending on the drone model you are connectiong to.

A new window will pop up where commands can be keyed in.

Manual Flight using Keyboard

  1. Arm the drone by pressing Ins on the keyboard.
  2. Take off by pressing T.
  3. Switch to offboard mode by pressing F2 or the zoom reset button on the Skycontroller.
  4. To fly the drone, use the following keys:
    • - move forward
    • - move backward
    • - move left
    • - move right
    • W - move up
    • S - move down
    • A - yaw counterclockwise
    • D - yaw clockwise
  5. Land by pressing L.

Warning

To immediately cut off the motors, press Esc. Use this only in emergency situations!

Demonstration Video

anafi_autonomy.mp4

Warning

To pilot the drone using the keyboard, you must switch to offboard mode. To switch to offboard mode, press F2 in the action terminal or press the zoom reset button on the Skycontroller.

Package details

The complete list of subscribed and published topics, available services and parameters is here.