Skip to content

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

License

Notifications You must be signed in to change notification settings

blandry/crazyflie-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ed3ca66 · Oct 2, 2015
Jul 31, 2015
Feb 13, 2015
Feb 21, 2015
Jun 28, 2015
Mar 15, 2015
Jun 28, 2015
May 25, 2015
May 25, 2015
Jul 29, 2015
Apr 3, 2015
Apr 10, 2015
May 7, 2015
May 26, 2015
Feb 21, 2015
May 25, 2015
Oct 10, 2014
Oct 2, 2015
Jul 31, 2015
May 26, 2015
Mar 26, 2015
Jun 28, 2015
Jul 31, 2015
Apr 9, 2015

Repository files navigation

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()

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published