Skip to content

Telsim WebSocket API

elsell edited this page Sep 5, 2019 · 13 revisions

Overview

Telsim aims to emulate the behavior of the Tello quadcopter as faithfully as possible. This includes accepting the same command syntax as the Tello quadcopter. Supported commands are listed below. Support for advanced features will increase with time.

Telsim accepts commands via a WebSocket, port 9990 by default.

Usage

To send a command to Telsim, open a WebSocket on Telsim's port (Default: 9990) and send a command. Supported commands are listed below.

Sending a Command (up 100) with Python 3

$ python3 -m pip install websocket_client
from websocket import create_connection

# Connect to NodeJS WebSocket Server
ws = create_connection("ws://localhost:9990")

# Send a Command via the WebSocket
ws.send("up 100")

# Recieve and Save the Response Code
result = ws.recv()

# Close the WebSocket
ws.close()

Supported Commands

Note: At this time, Telsim does not support mission pads.

Command Description Implemented
land Automatically land. NO
emergency Stop motors immediately NO
up x Ascend to x cm. x = [20-500] YES
down x Descend to x cm. x = [20-500] YES
left x Fly left for x cm. x = [20-500] YES
right x Fly right for x cm. x = [20-500] YES
forward x Fly forward for x cm. x = [20-500] YES
back x Fly backward for x cm. x = [20-500] YES
cw x Rotate x degrees clockwise. x = [1-360] NO
ccw x Rotate x degrees counterclockwise. x = [1-360] NO
flip x Flip in x direction. l: left r: right f: forward b: back NO
go x y z speed Fly to (x,y,z) at speed (cm/s) x,y,z = [-500,500]. NO
stop Hovers in the air. NO
speed x Set speed to x cm/s x = [10-100]. NO
reset Returns copter to the origin (0,0,0) facing north (0,0,-1) with a velocity of 0. NO
Clone this wiki locally