Command Thread

Thread resposible for sending control information/instructions to drone socket port=5556.

Sending Commands

Sending commands is implemented using the interface provided by the drones manufacturers. You can send as in the following example for land instruction:

socket.send("AT*REF=#ID#," + "290717696" + "\r")

Refer to the official documentation for more details.

Command Class

class dronevis.drone_connect.command.Command(ip='192.168.1.1')

Command thread implementation for sending commands through a socket created between the drone and the sender.

__init__(ip='192.168.1.1')

Initialize thread instance

Parameters

ip (str, optional) – ip of the drone. Defaults to “192.168.1.1”.

Raises

ConnectionError – raise an error if user is not connected to the drone

command(command='')

Send a command to the AR.Drone

Parameters

command (str, optional) – command string. Defaults to “”.

Returns

flag for valid sequence of operations

Return type

bool

configure(argument, value)

Set a configuration onto the drone

Parameters
  • argument (str) – keys for configs

  • value (str) – values for configs

Returns

flag for valid config operations

Return type

bool

ack_command()

Call this function when the command is acknowledge

Returns

flag for valid ack

Return type

bool

activate_navdata(activate=True)

Call this function when navdata are enabled

Parameters

activate (bool, optional) – whether to activate navdata. Defaults to True.

run()

Send commands every 30ms

reconnect()

Try to restart the socket

stop()

Stop the communication

Returns

flag whether drone stopped corretly

Return type

bool