📊
KerloudUAV
  • Kerloud UAV Main Page
  • 📗Kerloud UAV User Guide
    • Introduction
    • System Overview
    • Hardware Options
      • Kerloud 300
      • Kerloud 600
    • Gallery
    • Quick Start
    • Application Programming Interface (API)
    • Tutorials
      • Powering and Programming Interface
      • Offboard Control with Mavros (C++)
      • Offboard Control with Mavros (Python)
      • Indoor Positioning with Optical Flow
      • Flight Data Analysis
      • Virtual Simulation
      • Camera Pod Operation
      • Real Time Visual Recognition
      • Deep Learning in ROS
      • Enabling Autonomous Indoor Flight with a Tracking Camera
      • Hardware-in-the-loop Simulation in Airsim Environment
      • Visual Inertial System (VINS) with Stereo Vision and GPU Acceleration
      • DASA Swarm Simulation Toolbox
    • Video Instructions
  • 📘Kerloud UAV使用说明
    • 介绍
    • 系统组成
    • 硬件选项
      • Kerloud 300
      • Kerloud 600
    • 展示区
    • 快速启动
    • 应用程序接口 (API)
    • 使用教程
      • 供电和编程界面
      • Mavros在线控制 (C++)
      • Mavros在线控制 (Python)
      • 室内光流定位
      • 飞行数据分析
      • 虚拟仿真空间
      • 吊舱操作
      • 实时视觉识别
      • ROS深度学习集成
      • 基于跟踪相机的室内自主飞行实现
      • Airsim环境下的硬件在环仿真
      • 基于立体视觉和GPU加速的视觉里程系统(VINS)
      • DASA集群仿真工具箱
    • 视频指导
Powered by GitBook
On this page
  • How to Setup
  • Firmware Setting
  • Network Setting
  • Semi-Autonomous Indoor Flight
  • Demo Video

Was this helpful?

  1. Kerloud UAV User Guide
  2. Tutorials

Enabling Autonomous Indoor Flight with a Tracking Camera

PreviousDeep Learning in ROSNextHardware-in-the-loop Simulation in Airsim Environment

Last updated 3 years ago

Was this helpful?

Note: This tutorial is applicable for Kerloud Nano VIO Indoor only.

Indoor localization is essential to enable autonomous indoor flight for UAVs. Practical methods include optical flow, laser based and vision based SLAM methods. With the belief that vision can provide rich information not limited to localization, we focus on vision-based methods for indoor tasks to differentiate from other products in market. Here we provide Kerloud vision drones for advanced users.

How to Setup

Firmware Setting

The onboard Kerloud flight controller is configured properlly in factory. The Kerloud Nano VIO Indoor platform is able to perform both indoor and outdoor tasks. We provide the param EKF2_INDOOR_EN to facilliate the switching between indoor and outdoor scenes. By setting the EKF2_INDOOR_EN as 1, the drone will be automatically configured for indoor use.

Network Setting

The Kerloud vision drone should be connected in a local network with wifi connection so that it can be easily operated remotely. With the ssh tool, users can access the onboard computer with its corresponding IP address:

        ssh ubuntu@<drone IP address>

The drone IP address can be found by logging into the administration page of the router. Taking the TP-Link router as an example, users can visit 192.168.1.1 or http://tplogin.cn/ to checkout all computers connected in the local network. The computer name for the Kerloud vision drone is ubuntu by default. The IP address is then displayed as shown below:

You might also use a mobile phone as a hotspot alternatively to setup the required network

Semi-Autonomous Indoor Flight

We advise all users to perform the semi-autonomous indoor flight as the first step, as the flight can help validate the localization accuracy of the onboard software. The Kerloud vision drone utilizes Intel Realsense tracking camera T265 for onboard perception. The onboard software consists of the realsense library, mavros and visual odometry packages, and the workspace is located at ~/src/catkinws_realsense.

To build the workspace,

    cd ~/src/catkinws_realsense
    catkin build -j 3

To start the localization process, wait at least 1 minute after the system is powered up,

    cd ~/src/catkinws_realsense
    bash run.sh

Then we can see the necessary nodes are brought up in terminal. Make sure that the message "Realsense is up" is shown as below:

  • Replug the camera usb cable, and this is a temporary solution

  • Users can restart the usb hub with commands below:

      # install the uhubctl tool from source
      git clone https://github.com/mvp/uhubctl
      cd uhubctl
      make
      sudo make install
    
      # restart the usb hub manually
      sudo uhubctl -a cycle -p 1-4

Note that the above bug has been resolved in our latest product release.

Users can then confirm the localization output by viewing the output from the command:

    rostopic echo /mavros/odometry/out

Usually the localization can take 20-30 seconds to stabilize in the low level flight controller. Users can checkout the local position topic for the flight controller to verify localization states, and this is achieved by typing the following command in the Mavlink console from the Qgroundcontrol station:

    listener vehicle_local_position

Sometimes the console output is not complete due to network burden. Users can try alternatively the command:

    listener vehicle_local_position -n 20

Users can only attempt the semi-autonomous flight (Position mode) when all values of x,y,z positions and velocities are confirmed to be valid. The procedures are the same as the Quick Start Section. The drone is expected to hover quite well or even better than the outdoor case.

To add up, make sure that there are some features in front of the camera, and don't make the drone face a clean white wall.

Demo Video

If the Intel Realsense camera fails to boot with the msg "No realsense devices were found", which is a reported bug for the realsense library , users can try the following suggestions:

📗
https://github.com/IntelRealSense/librealsense/issues/3657
video link