Main Content

ryze

Connection to Ryze drone

Since R2020a

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

Description

This object represents a connection from MATLAB® to the Ryze drone. To interact with the Ryze drone, use this object with the functions listed in the Object Functions.

Creation

Description

droneObj = ryze() connects to the first available Ryze drone over the wireless network.

example

droneObj = ryze(droneName) connects to the Ryze drone with the specified name over the wireless network.

example

droneObj = ryze(droneID) connects to a Ryze drone with a specific ID over the wireless network.

example

droneObj = ryze(droneIP) connects to a Ryze drone with a specific IP address.

example

Input Arguments

expand all

Name of the Ryze drone.

ID of the Ryze drone.

IP address of the Ryze drone.

Properties

expand all

This property is read-only.

Name of the connected Ryze drone, returned as a string.

Example: "Tello"

Data Types: string

This property is read-only.

The ID of the specific Ryze drone returned as a string scalar.

Example: "TELLO-D2B07B"

Data Types: string

IP address of the Ryze Tello drone returned as a string scalar.

Example: r = ryze('192.168.10.15') creates a connection to an Ryze Tello drone that uses the IP address 192.168.10.15.

Data Types: string

This property is read-only.

The piloting state of the Ryze drone, returned as a string. The value of State does not change if the drone crash lands or force lands due to low battery.

Example: "Landed"

Data Types: string

This property is read-only.

Current battery level of the drone, returned as a percentage.

Example: 50%

Data Types: double

This property is read-only.

Drone's station mode status, returned as numeric or logical 1 (true) or 0 (false).

Data Types: logical

This property is read-only.

Available cameras of drone, returned as an array of strings. If the drone is in station mode, an empty array is returned.

Example: ["FPV"]

Data Types: string

Object Functions

The object functions are used to interact with your Ryze drone

abortEnd flight of Ryze drone
flipFlip Ryze drone in specified direction
landLand Ryze drone
moveMove Ryze drone in all three axes
movebackMove Ryze drone backwards
movedownMove Ryze drone down
moveforwardMove Ryze drone forward
moveleftMove Ryze drone left
moverightMove Ryze drone right
moveupMove Ryze drone upwards
readHeightRead current height of Ryze drone relative to the takeoff surface
readOrientationRead current orientation of Ryze drone in terms of Euler angles
readSpeedRead current speed of Ryze drone
takeoffInitiate Ryze drone takeoff
turnTurn Ryze drone by a specified angle

Examples

collapse all

Connect to a Ryze drone.

droneObj = ryze()
droneObj = 

  ryze with properties:

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

Connect to a Ryze Tello drone.

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

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

Connect to a specific Ryze Tello drone with the ID.

droneObj = ryze("TELLO-D2B07B")
droneObj = 
          ryze with properties:

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

Connect to a specific Ryze Tello drone using its IPAddress.

droneObj = ryze("192.168.10.1")
droneObj = 

  ryze with properties:

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

You can also connect to a drone that is in station mode using its IP address. Identify the drone using the ryzelist function.

list = ryzelist
list =

  3×3 table

          ID            IPAddress       BatteryLevel
    ______________    ______________    ____________

    "TELLO-D2B07B"    "192.168.10.1"       92    
    "TELLO-D3EB8E"    "192.168.18.2"       94    
    "TELLO-D45AD2"    "192.168.18.9"       87    

Now connect to the third drone in the above table.

ryzeObj = ryze("192.168.18.9")
ryzeObj = 

  ryze with properties:

                   Name: "TelloEDU"
                     ID: "TELLO-D45AD2"
              IPAddress: "192.168.18.9"
                  State: "landed"
           BatteryLevel: 100 %
            StationMode: 1
       AvailableCameras: []

Drones set to station mode cannot access the drone camera. The AvailableCameras parameter is returned as empty.

Version History

Introduced in R2020a

See Also

| | |

External Websites