M5StickC Dji Tello Drone Control

1. はじめに

    ドローン「Tello」を「M5StickC」でコントロールするスケッチを作ってみました。

    2. 環境

    「Tello」と「M5StickC」間は、WiFi無線、UDPプロトコルで通信を行います。
    Telloのコマンドは公式のTello SDKを使用しました。

    https://www.ryzerobotics.com/jp/tello/downloads

    2.1 開発環境

    Arduino IDE 1.8.9

    3. 操作方法

    (1) ボタン操作

    ボタンA(真ん中): 時計回りに45度回転

    ボタンB(右側面): 離陸と着陸トグル切替

    (2) 前進・後退・左・右移動

    「M5StickC」を傾けた方向に「Tello」が移動します。

    (3) 上・下移動

    後退に傾けながら、ボタンA(真ん中)を押す: 上昇

    前進に傾けながら、ボタンA(真ん中)を押す: 下降

    4. スケッチ

    https://github.com/tomtaozhou/ubi-tello/tree/main/ubi_tello_M5StickC

    4.1 変数

    変数名コメント
    const char*TELLO_SSID自分のTello WiFi1SSIDを設定
    const char*TELLO_IPTelloのIPアドレス(初期値:192.168.10.1)
    const intPORTTelloのポート番号(初期値:8889)
    WifiUDPUdpWifiUDPクラスからUdpインスタンス作成
    charpacketBuffer[255]TelloからのUDPメッセージ受信バッファー
    StringmessageTelloからの受信メッセージ
    floataccX加速度x
    floataccY加速度y
    floataccX_sum加速度xの10回合計(平均値を求める)
    floataccY_sum加速度yの10回合計(平均値を求める)
    floataccX_sum加速度xの補正値
    floataccY_sum加速度yの補正値
    charmsgx[6]加速度x文字列
    charmsgy[6]加速度y文字列
    boolif_land離陸、着陸の状況フラグ(初期値:true 着陸)

    4.2 ユーザ関数

    ユーザ関数コメント
    void print_msg(String status_msg)画面メッセージエリアへ状況メッセージ表示
    void tello_command_exec(char* tello_command)Telloへメッセージ送信&コマンド実行
    String listenMessage()Telloからのメッセージ受信

    5. スケッチでの注意点

    (1) TelloのWiFi SSIDの修正

    8行目

    const char* TELLO_SSID = “TELLO-XXXXXX”; // 自分のTelloのWi-Fi SSIDを入力

    自分のTelloの値に置き換える。

    Tello本体のバッテリー装着するところにSSIDが書かれたシールがあります。

    (2) 加速度X,Y基準値の調整

    142行目

    if (fabs(y)> 0.5){

    161行目

    if (fabs(x)> 0.5){{

    173行目

    if (fabs(y)> 0.5){

    左右前後の移動がうまくいかないときはこの値を調整してください。

    6. 終わりに

    加速度X,Yの補正値を取得するために、10回ダミーで加速度を読み取ったのちに、10回読み取りを行なってからその平均値を補正値としました。

    位置情報は四元数を使えばより正確になると思いますが、今回は簡易的な方法で行いました。

    Decentralized Data Storage: A Paradigm Shift

    UPOD Technology stands in stark contrast to traditional data silos, where personal information is centralized and controlled by third-party entities. Instead, UPOD employs a decentralized architecture, distributing data across multiple devices and servers. This decentralized nature offers several compelling advantages, including:

    Increased Safety Through the removal of centralized data storage, UPODs greatly diminish the hacker’s attack surface. It is significantly more difficult for illegal access and data breaches to occur when data is dispersed across several places. Encouraging People Individuals have solid control over their data thanks to UPODs. Users are more in control of their privacy and autonomy since they may choose who can access and use their data. Cooperation UPODs support open standards, which facilitates easy data sharing between services and applications. A more interconnected digital ecosystem is facilitated by this interoperability, which dismantles silos.

    目标

    Journals

    期刊简称期刊全称出版社网址
    IMWUTACMhttps://dl.acm.org/journal/imwut
    IoTIEEE Internet of Things JournalIEEEhttps://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=6488907
    IEEE Transactions on Big DataIEEEhttps://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=6687317

    Conferences

    Abbr. of Conf.ConferencesOrganizerWebsite
    WWWThe Web ConferenceACMhttps://dl.acm.org/conference/webconfCCF A
    CHIACM Conference on Human Factors in Computing SystemsACMhttps://dl.acm.org/conference/chiCCF A
    UbiCompACM International Joint Conference on Pervasive and Ubiquitous ComputingACMhttps://dl.acm.org/conference/ubicompCCF A
    SMCIEEE International Conference on Systems, Man, and CyberneticsIEEECCF C (Cross-disciplinary/Comprehensive/Emerging)
    UICIEEE International Conference on Ubiquitous Intelligence and ComputingIEEECCF C (Human Computer Interaction and Pervasive Computing)