Giter VIP home page Giter VIP logo

bcs-lighthouse-calibration's Introduction

BCS-Lighthouse-Calibration

These scripts can be used to calibrate the lighthouse positioning system for use with the Crazyflie 2.1. They are supposed to help people working in the DroneLab at the BCS group at TU Darmstadt.

get_bs_position.py

Outputs the coordinates of the lighthouse base stations. The Vive headset has to be connected and SteamVR has to be running for the script to work. It seems to work best with the headset on the floor in the middle of the room facing the windows. The coordinates will look something like this:

{.origin = {-1.755063, -2.378910, 2.727174, }, .mat = {{0.569296, -0.795590, 0.207216, }, {0.750985, 0.605805, 0.262721, }, {-0.334551, 0.006050, 0.942358, }, }},
{.origin = {1.653693, 2.383405, 2.723262, }, .mat = {{-0.646577, 0.740935, -0.181529, }, {-0.676042, -0.666786, -0.313627, }, {-0.353419, -0.080062, 0.932033, }, }},

These coordinates have to be copy/pasted into the lighthouse.c file in the crazyflie firmware. Additionally, the lines

#ifndef DISABLE_LIGHTHOUSE_DRIVER
 #define DISABLE_LIGHTHOUSE_DRIVER 1
#endif

have to be commented out to compile the firmware with lighthouse positioning enabled.

print_position.py

Connects to a drone and prints its position. Useful to check if everything is working correctly. (0, 0, 0) should be in the middle of the room. One unit should be more or less one meter. The script outputs the position every 500 ms for 10 s, but this can easily be changed.

autonomousSequence.py

Connects to a Crazyflie and makes it fly to a predefined sequence of points. If everythings works correctly, it should start, fly a square, and land. The Crazyflie should be close to (0, 0, 0) before executing this script.

Lighthouse deck LED meanings

The blue LED means that the FPGA has booted and the RED LED means that the FPGA is in bootloader mode, the YELLOW LED means that the bootloader is busy doing something. When in firmware mode, the blue led should be lit but none of the other leds are currently controlled.

The board starts in bootloader mode, the Crazyflie checks the firmware and then boots the board in firmware mode so the sequence you are supposed to see is:

  • blue ON, red ON, yellow OFF # Bootloader IDLE, if stuck here the communication to the bootloader is not working well
  • blue ON, red ON, yellow ON # Checking firmware version or flashing new firmware
  • blue OFF, red OFF, yellow OFF # FPGA rebooting, if stuck there the firmware image is bad
  • blue ON, red OFF, yellow OFF # Firmware mode

bcs-lighthouse-calibration's People

Contributors

fswienty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.