Based on PyTello, TelloLib and the tello Go
Software in development and provided "as is". Use at your own risk. Safety first! Remove props before test!
const NodeTello = require('./lib/nodetello.js');
const NodeTello_webclient = require('./lib/nodetello_webclient.js');
// init web client
//var webclient = new NodeTello_webclient('ffmpeg'); // in-browser video
var webclient = new NodeTello_webclient('mplayer'); // open mplayer window with low latency video
webclient.init();
// init drone
var drone = new NodeTello();
// set video path
drone.save_video_path = "./video/";
// set callback for video feed
drone.tello_video_output = function (h264) { webclient.h264encoder_in(h264); };
// config drone telemetry (drone -> node.js -> browser)
drone.tello_telemetry_config = {
px: "MVO.PX",
py: "MVO.PY",
pz: "MVO.PZ"
};
// set callback for telemetry feed
drone.tello_telemetry_output = function (data) { webclient.telemetry(data); };
// lets go!
drone.init();
// browser -> webclient -> tello commands
webclient.tello_cmd = function (data) { drone.tello_cmd(data); }
Init process is basic at that moment:
Web client must be available on http://127.0.0.1:8080 after npm start
and show almost fine video from drone with 0.5 seconds lag.
Video feeds stored to ./video/TIMESTAMP.h264
and must be redecode, e.g. ffmpeg -i TIMESTAMP.h264 -crf 20 video.mp4
Shift
+ Space
- TakeoffSpace
- LandArrowUp
and ArrowDown
- Pitch (forward/backward)ArrowLeft
and ArrowRight
- Roll (left/right)W
and S
- Throttle (Up/Down)A
and D
- Yaw (Rotate)Speed is limited = 0.5
WARNING, used SHANWAN PS3/PC Gamepad (Vendor: 2563 Product: 0575) in Linux
Left Stick
- trottle and yaw (MODE2)Right Stick
- pitch and roll (MODE2)X
, Y
, A
, B
- landstart
- takeoffSpeed is limited = 0.5