Skip to content
/ currant Public

Quadcopter flight control software

Notifications You must be signed in to change notification settings

castis/currant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currant

Quadcopter flight control software

quadcopter

Hardware

To do

Initial setup

The vehicle

From a fresh install of Raspian Stretch Lite:

Connect it to the local network with a cable (the wireless card will be used to manage it's own network)

  • note the IP
  • set a root password
  • run the following
    • raspi-config
      • Under Localisation Options, set the proper keyboard layout.
      • Under Advanced, expand the filesystem if it didn't automatically do this at first boot.
      • Under Interfacing Options, enable SSH and I2C.
    • sed -i -E "s/^#?(PermitRootLogin)/\1 yes/" /etc/ssh/sshd_config to change 'PermitRootLogin' for a moment. Ansible will later change that yes to prohibit-password.
    • systemctl restart ssh

The development machine

For /etc/hosts:

192.168.1.XXX currant

Create and sync an SSH key (the keys I generated from macOS with OpenSSH didn't play with paramiko nicely, I had to generate the keys on the Pi and move them locally):

ssh-keygen -t ecdsa -f ~/.ssh/currant_ecdsa -b 521 -N ''
ssh-copy-id -i ~/.ssh/currant_ecdsa root@currant

For ~/.ssh/config:

Host currant
    User root
    IdentityFile ~/.ssh/currant_ecdsa

The vehicle again

Assuming git, pipenv, and ansible are installed locally; clone this repo.

The ansible playbooks will configure the rest of the vehicle; cd into ./ansible/ and run them

  • ansible-playbook python3.yml installs the python version set in that file (takes like half an hour)
  • ansible-playbook setup.yml configures the wireless network, interfaces, house-cleaning, etc

(these are the instructions I used to originally configure the wireless setup)

The USB wireless card can now be used to connect to the vehicle's wireless network. By default, the network is currant, as is the username. Password is currantpw.

Once connected via wifi, change the line in your /etc/hosts/ to:

172.24.1.1 currant

Development

I open three terminal instances with itermocil --here:

  • One for git/local work (pictured left)
  • One for running ssh currant, and once inside the vehicle, running preflight and then ./fly.py. (top right)
  • One for running pipenv shell ./tower.py, which will watch and sync ./currant/* to /opt/currant on the vehicle. (bottom right)

preflight is ./ansible/files/preflight

Use ./fly.py --setup-bt to set up a bluetooth controller.

About

Quadcopter flight control software

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages