Class Tello

Class Documentation

class Tello

Class defining the drone, associated sockets, and input methods.

In addition to defining instances of the sockets and input methods, this class also acts as a single point of communication for any and all command input and output, and encapsulates a tello

Public Functions

Tello(asio::io_service &io_service, std::condition_variable &cv_run, const std::string drone_ip = "192.168.10.1", const std::string local_drone_port = "8889", const std::string local_video_port = "11111", const std::string local_state_port = "8890", const std::string camera_config_file = "../camera_config.yaml", const std::string vocabulary_file = "../orb_vocab.dbow2", const int n_retries = 0, const int timeout = 5, const std::string load_map_db_path = "", const std::string save_map_db_path = "", const std::string mask_img_path = "", bool load_map = false, bool continue_mapping = false, float scale = 1.0, const std::string sequence_file = "")

Constructor.

Return
none
Parameters
  • io_service: io_service object used to handle all socket communication
  • cv_run: condition variable for the lifetime of the code
  • drone_ip: ip address of drone
  • local_drone_port: local port through which commands will be sent to the drone
  • local_video_port: local port that will receive the drone video stream
  • local_state_port: local port which will receive state information from the drone
  • camera_config_file:
  • vocabulary_file:
  • n_retries: number of retries for command if no response received
  • timeout: timeout before a command is said to have failed and is resent if retries are enabled
  • load_map_db_path: path and file name from which the map must be loaded
  • save_map_db_path: path and file name to which the map must be saved
  • mask_img_path: path to pattern mask input images
  • load_map: bool for whether the map should be loaded
  • continue_mapping: continue adding to the map even when a map has been loaded
  • scale: scale for SLAM
  • sequence_file: file containing a sequence of commands that will be added to execute queue

void readSequence(const std::string &file)

reads a sequence of commands from a file and adds them to the execution queue

Return
void
Parameters
  • file: name of the file containing the sequence of commands

~Tello()

Destructor.

Return
none

Public Members

std::unique_ptr<CommandSocket> cs

Unique pointer to CommandSocket object associated with this tello.

std::unique_ptr<Joystick> js_

Unique pointer to Joystick object associated with this tello.

std::unique_ptr<VideoSocket> vs

Unique pointer to VideoSocket associated with this tello.

std::unique_ptr<StateSocket> ss

Unique pointer to StateSocket associated with this tello.