Code Monkey home page Code Monkey logo

bitcraze-raspberry-pi's People

Contributors

ataffanel avatar evoggy avatar knmcguire avatar krichardsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitcraze-raspberry-pi's Issues

Time out on the Raspberry based Crazyflie client.

In most of recent main Linux distributions, a new concept is used to boot the system. The former systemV process is replaced by the sytemd organization. This means that the way to make a Rasberry nano computer as a base station to fly a Crazyflie is no longer available (see https://wiki.bitcraze.io/misc:hacks:rasberrypi). The client software is launched when connecting the Crazyradio but after a short time the client stops (25 seconds in my case).
A way to overcome this difficulty is to create a new "service" in the system which launches the headless client. Now, connecting the Crazyradio runs a script in the directory /root/bin, as before but this script calls the new service which has no time out.
The service is defined through the following script:

§§§ FILE cfheadless.service
[Unit]
Description=Client Crazyflie
After=tlp-init.service

[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/usr/local/bin/cfheadless -i -u radio://0/80/250K

[Install]
WantedBy=multi-user.target
§§§END OF FILE
where is one of the existing maps in the ../src/cfclient/configs/input directory. You can choose your own map by putting it in that place. The radio URI is as usual in Crazyflie client.

In my Debian distributions this script is placed in the directory /etc/systemd/system. Its owner must be root and can be executed by everybody (+x).
The new headless.sh file is now:
§§§ FILE headless.sh
#! /bin/sh
if test "$ACTION" = "add"
then
sudo systemctl start cfheadless.service
echo $! > /tmp/cfheadless.pid
else
killall -9 cfheadless
if test -f /tmp/cfheadless.pid
then
PID = cat /tmp/cfheadless.pid
kill -9 $PID
fi
fi
§§§END OF FILE
Perhaps some tuning must be made according to your Raspberry's Linux system. The proposed solution was tested "working" on a Raspberry Pi2 with Raspbian jessie system.

Move config-files to FAT partition

To make it easier to configure the SD-card image move the configuration files (link.conf, controller.conf and the input directory) to the bootable FAT partition. This will enable easy re-config in Windows.

Include flashing in README.txt

Update the README.txt to include instructions on how to flash the Crazyradio and Crazyflie with new firmware from the commandline.

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.