Main Content

move

Move Ryze drone in all three axes

Since R2020a

Add-On Required: This feature requires the MATLAB Support Package for Ryze Tello Drones add-on.

Description

move(droneObj,relativeCoordinate) moves the Ryze Tello drone by a relative distance in x,y and z axes specified by relativeCoordinate.

example

move(droneObj,relativeCoordinate,Name,Value) moves the Ryze Tello drone by a relative distance in x, y, and z axes with additional option specified as Name,Value pair argument.

The following schematic shows the quadcopter axis characteristics:

Quadcopter axis characteristics, showing the X, Y and Z axis

The quadcopter body axis is centered in the center of gravity.

  • The x-axis starts at the center of gravity and points in the direction along the nose of the quadcopter.

  • The y-axis starts at the center of gravity and points to the right of the quadcopter.

  • The z-axis starts at the center of gravity and points downward from the quadcopter, following the right-hand rule.

example

Examples

collapse all

Connect to a Ryze Tello drone.

droneObj = ryze("TelloEDU")
droneObj = 
          ryze with properties:

                    Name: ""TelloEDU""
                      ID: "TELLO-D2B07B"    
               IPAddress: "192.168.10.1"
                   State: "landed"
            BatteryLevel: 50%
             StationMode: 0
        AvailableCameras: ["FPV"]

Use takeoff to initiate takeoff of the drone.

takeoff(droneObj)

While the Ryze Tello is in flight, move the drone forward by 1.2m.

move(droneObj,[1.2 0 0]);

Connect to a Ryze Tello drone.

droneObj = ryze("TelloEDU")
droneObj = 
          ryze with properties:

                    Name: ""TelloEDU""
                      ID: "TELLO-D2B07B"
                   State: "landed"
            BatteryLevel: 50%
        AvailableCameras: ["FPV"]

Use takeoff to initiate takeoff of the drone.

takeoff(droneObj)

While the Ryze Tello is in flight, move the drone diagonally at a speed of 0.5 m/s by 1.2m along the x and y axes.

move(droneObj,[1.2 1.2 0],'Speed', 0.5);

Input Arguments

collapse all

Ryze drone connection object, specified as a droneObj.

Relative distance the drone moves in the xyz axes specified as a 1-by-3 array. The relative coordinate value must have values between -5m and 5m and at least one value greater than 0.2m or less than -0.2m.

Data Types: double

Name-Value Arguments

Example: move(droneObj,[1.2 1.2 0],'Speed',0.5);

Specify optional comma-separated pair of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

The speed (in m/s) at which the drone must move, specified as a double.

Data Types: double

Mode of operation for the moveback command, specified as logical value of true or false.

WaitUntilDone is true by default and blocks MATLAB® command line execution until the current move command runs to completion. If WaitUntilDone is set to false, the MATLAB command line is unblocked, while the previous move command is still in progress.

Note

The Ryze drone ignores any subsequent move commands that is executed before completion of the previous move command.

Data Types: logical

Version History

Introduced in R2020a