BoB robotics
The Brains on Board robotics library
BoBRobotics::Robots::UAV::Bebop Class Reference

An interface to Parrot Bebop 2 drones. More...

#include <bebop.h>

Inheritance diagram for BoBRobotics::Robots::UAV::Bebop:
BoBRobotics::Robots::UAV::UAVBase< Bebop >

Classes

class  VideoStream
 Interface to the drone's built-in camera. More...
 

Public Types

enum class  State {
  Stopped = ARCONTROLLER_DEVICE_STATE_STOPPED , Starting = ARCONTROLLER_DEVICE_STATE_STARTING , Running = ARCONTROLLER_DEVICE_STATE_RUNNING , Paused = ARCONTROLLER_DEVICE_STATE_PAUSED ,
  Stopping = ARCONTROLLER_DEVICE_STATE_STOPPING
}
 The drone's current state.
 
enum class  RelativeMoveState {
  Initial = -2 , Moving = -1 , Success = ARCOMMANDS_ARDRONE3_PILOTINGEVENT_MOVEBYEND_ERROR_OK , ErrorUnknown = ARCOMMANDS_ARDRONE3_PILOTINGEVENT_MOVEBYEND_ERROR_UNKNOWN ,
  ErrorBusy = ARCOMMANDS_ARDRONE3_PILOTINGEVENT_MOVEBYEND_ERROR_BUSY , ErrorNotAvailable = ARCOMMANDS_ARDRONE3_PILOTINGEVENT_MOVEBYEND_ERROR_NOTAVAILABLE , ErrorInterrupted = ARCOMMANDS_ARDRONE3_PILOTINGEVENT_MOVEBYEND_ERROR_INTERRUPTED
}
 

Public Member Functions

 Bebop (degrees_per_second_t maxYawSpeed=DefaultMaximumYawSpeed, meters_per_second_t maxVerticalSpeed=DefaultMaximumVerticalSpeed, degree_t maxTilt=DefaultMaximumTilt)
 Search for the drone on the network and connect to it.
 
 ~Bebop ()
 Land the drone and disconnect properly when the object is destroyed.
 
degree_t getMaximumTilt () const
 Return the current maximum tilt setting. More...
 
std::pair< degree_t, degree_t > & getTiltLimits ()
 Return the minimum and maximum permitted values for the maximum tilt setting.
 
meters_per_second_t getMaximumVerticalSpeed () const
 Return the current maximum vertical speed setting.
 
std::pair< meters_per_second_t, meters_per_second_t > & getVerticalSpeedLimits ()
 Return the minimum and maximum permitted values for the maximum vertical speed setting.
 
degrees_per_second_t getMaximumYawSpeed () const
 Return the current maximum yaw speed setting.
 
std::pair< degrees_per_second_t, degrees_per_second_t > & getYawSpeedLimits ()
 Return the minimum and maximum permitted values for the maximum yaw speed setting.
 
void takeOff ()
 Send take-off command.
 
void land ()
 Send land command.
 
void setPitch (float pitch)
 Set drone's pitch, for moving forwards and backwards.
 
void setRoll (float right)
 Set drone's roll, for banking left and right.
 
void setVerticalSpeed (float up)
 Set drone's vertical speed for ascending/descending.
 
void setYawSpeed (float right)
 Set drone's yaw speed.
 
void relativeMove (meter_t x, meter_t y, meter_t z, radian_t yaw=0_rad)
 Move to a new pose relative to the current one.
 
RelativeMoveState getRelativeMoveState () const
 Get the status of a relative move operation.
 
std::pair< Vector3< meter_t >, radian_tgetRelativeMovePoseDifference () const
 Get the distance moved in the last relative move operation.
 
void resetRelativeMoveState ()
 Reset the relative move state, e.g. after reading.
 
void doFlatTrimCalibration ()
 Carry out flat trim calibration.
 
float getBatteryLevel ()
 Get the drone's battery level from 0.0f to 1.0f.
 
State getState ()
 
VideoStreamgetVideoStream ()
 Return the an object allowing access to the drone's onboard camera.
 
void takePhoto ()
 Tell the drone to take a photo and store it.
 
void setFlightEventHandler (const FlightEventHandler &)
 Add an event handler for when the drone is taking off or landing.
 
- Public Member Functions inherited from BoBRobotics::Robots::UAV::UAVBase< Bebop >
void moveForward (float speed)
 
void turnOnTheSpot (float clockwiseSpeed)
 
void stopMoving ()
 

Static Public Attributes

static constexpr auto DefaultMaximumTilt = 8_deg
 Default maximum tilt for pitch and roll. More...
 
static constexpr auto DefaultMaximumYawSpeed = 100_deg_per_s
 Default maximum yaw speed.
 
static constexpr auto DefaultMaximumVerticalSpeed = 1_mps
 Default maximum vertical speed.
 

Detailed Description

An interface to Parrot Bebop 2 drones.

This class handles connection/disconnection and sending steering commands. It also provides an interface to access the drone's video stream.

Member Function Documentation

◆ getMaximumTilt()

degree_t BoBRobotics::Robots::UAV::Bebop::getMaximumTilt ( ) const

Return the current maximum tilt setting.

This affects pitch and roll.

Member Data Documentation

◆ DefaultMaximumTilt

constexpr degree_t BoBRobotics::Robots::UAV::Bebop::DefaultMaximumTilt = 8_deg
staticconstexpr

Default maximum tilt for pitch and roll.

BEGIN PUBLIC MEMBERS


The documentation for this class was generated from the following files: