Skip to content

RedwanNewaz/bebop2_controller

Repository files navigation

@mainpage Parrot Bebop2 Drone with Joystick Controller README File

Introduction

The Parrot Bebop 2 is a small, lightweight manufactured by Parrot, a French company specializing in consumer electronics. It is compact and lightweight, making it easy to transport and use on the go which makes it a popular choice It's camera has a most impressive electronic image stabilization and with a top speed of 40 mph, this drone can really move. The Bebop 2 has a battery life of up to 25 minutes.

This README file explains how to control the drone using a joystick and ROS drivers, add visual servoing capabilities, and scan for April Tags to find the drone's relative position.


Parrot Bebop2 Drone

Quick Run

Hardware Setup: Connect your joystick to the computer.

Before starting the program, the drone should be turned on and the computer connected to the drone WiFi.

Warning It is strictly recommended to use protective equipments while testing the drone.
If the drone needs to be shut down completely then we should flip the drone.

Joystick buttons perform following operations:

    IDLE = 0, // Setpoint can be freely moved with joystick. Sphere color blue

    TAKEOFF = 1, // Drone will takeoff from the ground
    
    LAND = 2, // Drone will land

    ENGAGE = 3, // Set current location as a set point (for hover). Sphere color yellow

    CONTROL = 4 // Start PID controller for the current (ENGAGE) setpoint. Sphere color cyan

Once control mode is enabled, setpoint can also be controlled using joystick axes. Note that, only position controller is implemented from the analog sticks. Orientation controller needs yaw angle which could be directly obtained from bebop odom.


Software Setup:

-- Installation of bebop_autonomy from fork manually is required to send relative move commands to the drone. Check out install bebop_autonomy from fork and build visp.

Bebop_autonomy is a ROS driver for Parrot Bebop 2.0 drones (quadrocopters), based on Parrot’s official ARDroneSDK3. You can check out this source code for the driver is for more understanding.


Joystick Controller

Operating the drone

The Parrot Bebop 2 Drone can be controlled from a PID Joystick Controller. The drone can be manuvered with the joytsick analog sticks.

The functions of the Four Action Buttons of the joystick is as follows:

// To be written down.

  1. A ---> TAKE OFF (Green button)
  2. B ---> LAND (Red Button)
  3. X ---> IDLE (Blue Button)
  4. Y ---> ENGAGE (Yellow Button)
  5. L ---> CONTROL (Top Left Button)

AprilTag 36h11

April Tags

AprilTag is a visual fiducial system, useful for a wide variety of tasks including augmented reality, robotics, and camera calibration. Targets can be created from an ordinary printer, and the AprilTag detection software computes the precise 3D position, orientation, and identity of the tags relative to the camera.

Using the built-in camera of the Parrot Bebop 2 Drone, it scans the tag and determines its relative postion from the tag.

An April Tag from 36h11 family that will serve as target for the visual servoing (see this page to print one).


Visualisation using Graphical Interface (RVIZ)

The Parrot Bebop 2 drone can be monitored and visualised using a graphical interface like rviz.

For RVIZ installtion :-

sudo apt-get install ros-[ros-version]-rviz 

For example:-

sudo apt-get install ros-noetic-rviz

To run rviz

rosrun rviz rviz

Check out http://wiki.ros.org/rviz/UserGuide for more information.


Parameter Tuning

Refer to config/param.yaml file to read about tuning parameters. Apriltags are used for landmarks and then the drone position is estimated from those landmarks. A complementary filter is implemented to compute state by combining multiple landmarks.


Steps to use the bebop2_controller Launch Files

  1. To use Dummy Filter : roslaunch bebop_controller bebop_frames_dummy.launch
  2. To use Complementary Filter : roslaunch bebop_controller bebop_complementary_filter.launch
  3. To run the apriltag_ros_continuous_node : roslaunch bebop2_controller apriltag.launch

Step 1. Press the A button on the Joystick Controller to take-off.
Step 2. Press the left-bottom (LB) button to engage Controller.
Step 3. Use the joystick axis to control the set-point

About

ros package for controlling parrot bebop2 in indoor environments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published