Pilot software (running on companion computers) for the flight controller autopilot's. It can control and fly several flight controllers, including Pixhawk's, APM's and MultiWii's.
- mw-joystick.py -> Send joystick commands via UDP from a ground-station running Matlab to a FC running MultiWii software.
- mw-hover-controller.py -> Calculate commands to make a Multiwii multicopter hover over a specified x,y,z coordinate.
- pix-joystick.py -> Send joystick commands via UDP from a ground-station running Matlab to a pixhawk. Dronekit related.
-
pix-logdata.py -> Script that logs data from a vehicle and a MoCap system. Dronekit related.
-
pix-takeoff.py -> Script that makes a pixhawk take off in the most secure way. Dronekit related.
- pix-goto.py -> Script that commands the vehicle to follow waypoints.
- pix-velocity-vector.py -> Script that send the vehicle a velocity vector to form a square and diamond shape.
-
Multiwii boards (using MSP)
-
Pixhawk / PX4 / APM (using mavlink & drone kit)
-
Raspberry Pi
-
oDroid U3
Note: Code is in python, so, any linux computer would be able tu run it.
- Raspberry Pi (Rasbian)
- Update your Pi...
- Next this one:
- More utilities:
- Then mavlink and mavproxy:
- Clone this repository:
#### DroneAPI
You have to load the module inside mavproxy.py, to do that just type:
module load droneapi.module.api
Now you're ready to run .py files with droneapi/dronekit!
#### Simulation
If you're doing tests with simulation, don't forget to turn off the parameter checking inside the mavproxy console, so that you can arm the vehicle:
param set ARMING_CHECK 0
All set!! go do tests!!
This code is still under heavy development, everyday I add and remove stuff. Proceed with caution.
You can follow us in this URL's:
For the 'pix-' scripts the following assumptions must be noted:
- This script assumes that the pixhawk is connected to the raspberry pi via the serial port (/dev/ttyAMA0)
- In our setup, telemetry port 2 is configured at 115200 on the pixhawk
- rpi camera connected (for computer vision)
/etc/ssh/ssh_config
ServerAliveInterval 5
ClientAliveInterval 5
/etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
address 192.168.1.1
netmask 255.255.255.0
wireless-channel 1
wireless-essid RPiAdHocNetwork
wireless-mode ad-hoc
sudo ifdown wlan0
sudo ifup wlan0
sudo apt-get install dhcp3-server
/etc/dhcp/dhcpd.conf
ddns-update-style interim;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.5 192.168.1.150;
}
In case of failure starting DHCP:
sudo service ifplugd stop
sudo modprobe -v bcm2835-v4l2
git clone https://github.com/mpromonet/h264_v4l2_rtspserver.git
cd h264_v4l2_rtspserver
cmake .
make install
h264_v4l2_rtspserver -H <height> -W <width> -F <fps>
To start:
rtsp://192.168.1.1:8554/unicast
#!/bin/bash
echo "Deleting previous directory..."
rm -rf DronePilot/
echo "Done."
echo "Cloning DronePilot repository: "
git clone https://github.com/alduxvm/DronePilot.git
echo "Copying mavinit.scr to proper directory..."
mkdir DronePilot/TestQuad
mv DronePilot/mavinit.scr DronePilot/TestQuad/
echo "Done."
echo "Ready to do: mavproxy.py --master=/dev/ttyAMA0 --baudrate 115200 --aircraft TestQuad"
echo "Dont forget to go inside the DronePilot directory."
-
Same DHCP configuration as before
-
Install "hostapd"
sudo apt-get install hostapd netcat-traditional
- Interfaces:
auto wlan0
iface wlan0 inet static
address 85.85.85.1
netmask 255.255.255.0
- /etc/hostapd/hostapd.conf
interface=wlan0
ssid=HDFPV
hw_mode=g
channel=6
auth_algs=1
wmm_enabled=0
- /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
- On rpi, create fifo file:
mkfifo fifo.500
- On client (mac):
brew install netcat
brew install mplayer
- To start (mac):
netcat -l -p 5000 | mplayer -fps 60 -cache 1024 -
- To start (rpi):
cat fifo.500 | nc.traditional 85.85.85.6 5000 &
/opt/vc/bin/raspivid -o fifo.500 -t 0 -b 50000