Code Monkey home page Code Monkey logo

crazyflie-tools's Introduction

drake-crazyflie-tools

A collection of tools to develop controllers for the Crazyflie using Drake

Installation

  • install the lcm types
    cd lcm
    sudo python setup.py install
  • install the client
    cd crazyflie-clients-python
    sudo bash setup.sh
  • install the estimator
    cd estimation
    sudo python setup.py install
    sudo pip install filterpy
  • flash the firmware
    cd crazyflie-firmware-2
    make cload
  • install vicon
    cd vicon
    mkdir bin
    mkdir obj
    cp lib/libViconDataStreamSDK_CPP.so /usr/lib/libViconDataStreamSDK_CPP.so
    make

Main Usage

  • run the vicon client to get sensor data
    vicon/bin/vicon_lcm_client objectname
  • run the crazyflie client
    ./simpleclient
  • You can send lcm commands from the nanokontrol board
    ./nanokontrol
  • You can also use drake to send commands ("crazyflie_input" channel), and therefore build pretty sophisticated controllers. See Drake's documentation for more details.

LCM Types

You can regenerate the lcm types if you have lcm installed.

  • Install LCM (lcm-gen)
  • add lcm.jar to CLASSPATH
  • run lcm/make_types

Handling Logs

How to use LCM logging with MATLAB:

  • Take your logs. On a computer that is recieveing the relavent LCM messages, run
    $ lcm-logger

in the directory you want your log files. This will produce a file that contains all your LCM messages.

  • Export to .mat format
    $ python log_to_mat.py -f -l lcmtypesmodule,anotherlcmtypemodule lcmlogfile

Running the visualizer

After running make -j in the drake-distro/director folder:

drake-distro/build/bin/ddConsoleApp -m crazyflieviewer

you can play a log back

lcm-logplayer -s .5 lcmlog-2015-04-02.00

and visualize it in matlab

addpath_crazyflie
cf=Crazyflie()
cf.visualizeStateEstimates()

crazyflie-tools's People

Contributors

evoggy avatar peteflorence avatar dbenesj avatar omwdunkley avatar tobbeanton avatar allynbauer avatar ataffanel avatar aholler avatar david-benes avatar mikevoyt avatar phiamo avatar mchenryc avatar krasin avatar erget avatar foosel avatar sascha274 avatar danmark avatar derhuerst avatar jsgf avatar oxydation 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.