Class TelloCommandSender

Class Documentation

class TelloCommandSender

Public Functions

TelloCommandSender(const std::string &tello_ip, const int port_command = 8890, const int port_command_client = 8890)

Construct a new TelloCommandSender object.

Parameters:
  • tello_ip – IP of the tello drone

  • port_command – Port of the client to send the command

~TelloCommandSender()

Destroy the TelloCommandSender object.

const std::string &getSDKVersion()

Get the SDK version from the tello drone.

Parameters:

response – SDK version received from the tello drone

Returns:

true if the command was sent

bool getTime(std::string &response)

Get the time from the tello drone.

Parameters:

response – Time received from the tello drone

Returns:

true if the command was sent

bool entrySDKMode()

Enter SDK mode.

Returns:

true if the command was sent

bool setPort(const int port_state = 8890, const int port_camera = 11111)

Set State and Camera Stream Ports.

Returns:

true if command was sent

bool takeoff()

Takeoff the tello drone.

Returns:

true if the command was sent

bool land()

Land the tello drone.

Returns:

true if the command was sent

bool emergency()

Emergency stop the tello drone.

Returns:

true if the command was sent

bool positionMotionCommand(const double x, const double y, const double z, const double speed)

Send position command to the tello drone.

Parameters:
  • x – X position in base link frame (m)

  • y – Y position in base link frame (m)

  • z – Z position in base link frame (m)

  • speed – Speed of the drone (m/s)

Returns:

true if the command was sent

bool speedMotionCommand(const double vx, const double vy, const double vz, const double yaw)

Send speed command to the tello drone.

Parameters:
  • vx – Velocity in x (m/s)

  • vy – Velocity in y (m/s)

  • vz – Velocity in z (m/s)

  • yaw – Yaw angle (rad)

Returns:

true if the command was sent

bool yawMotion(double yaw)

Send yaw motion command to the tello drone.

Parameters:

yaw – Yaw angle (rad)

Returns:

true if the command was sent

bool sendCameraCommand(const bool enable, const int timeout_milis = -1)

Send a control command to the tello drone for enabling/disabling the camera.

Parameters:
  • enable – Command to enable/disable the camera

  • timeout_milis – Timeout in milliseconds. If zero, dont wait for a response. If negative, wait indefinitely. Default: -1 (wait indefinitely)

Returns:

true if the command was sent If waiting for a response, true if a response was received and was ‘ok’, false otherwise.