2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MATLABでDJIのtelloを動かそう。2

Posted at

基本の設定やコマンドは1を参照

MATLABでDJIのtelloを動かそう。1


ちょっと高度な飛行コマンド(rはオブジェクト)

回転
telloを空中で回転させるコマンドです。
flip(r,'回転させたい方向')

''に入るコマンド forward back right left
回転方向 後ろ

前後左右への移動

telloをカメラの方向とは逆向きに移動させるコマンドです。
moveback(r)
telloをカメラの方向と同じ向きに移動させるコマンドです。
moveforward(r)
telloを右に移動させるコマンドです。
moveright(r)
telloを左に移動させるコマンドです。
moveleft(r)

rの次に,を入れ数字を打ち込むとその秒数、指定した方向に移動します。

例(5秒間後方に移動)
moveback(r,5)

例(5秒間1.5m/秒で移動)
moveback(r,5,'speed',1.5)

上下移動
telloを上方向に移動させます。
moveup(r)
telloを下方向に移動させます。
moveup(r)

例(5秒間1.5m/秒で上方向に移動)
moveup(r,5,'speed',1.5)

方向転換
右回りでtelloが方向転換をします。
turn(r,deg2rad(45))
ここでのdeg2radとは()に入れた数字を角度の度で読み取りラジアンで返す構文です。


45度ー>deg2rad(45)ー>0.7854 radians

これで一通りの飛行コマンドを書いたのでみんなも飛ばしてみよう。


引用

https://jp.mathworks.com/help/supportpkg/ryzeio/drone-navigation.html?s_tid=CRUX_lftnav

次はカメラやフライトデータの使い方

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?