Embedded software

Major processes MyPiDrone and MyPiDrone2 (1):

ArduCopter transmits to the 3DR radio via the serial port Navio+ /dev/ttyAMA0 at 57600 baud rate  (to be configure in apmplanner2 software into the parameters list SERIAL0 BAUDRATE = 57 (instead of 115)
ArduCopter transmits on udp:127.0.0.1:14550 to MAVProxy software.
MAVProxy then return to the converter MAVLink/FrSky connected to the USB port /dev/ttyUSB0 at 57600 baud rate and  control the RPI2 using the module MyPiModule (see next chapter)
MyPiModule use picamera (1) to capture video and photos, overlay telemetry text and finally sent the video with a named pipe to tx version  befinitiv or alternative : tx Andrew Lamoureux (lwerdna) for a transmission over wifibroadcast. Prerequisites  : Configure Wifibroadcast Video over TP-LINK

(1) Overlaying telemetry text on video before Wifibroadcast

Processes started with systemd services management:

/usr/bin/ArduCopter-quad -A /dev/ttyAMA0 -C udp:127.0.0.1:14550

/usr/bin/python /usr/local/bin/mavproxy.py –master=udp:127.0.0.1:14550 –quadcopter –out=/dev/ttyUSB0,57600 –daemon –show-errors –default-modules=MyPiModule,mode

+

start_tx_and_recording_with_picamera_video_input.sh
…/…
tee $VIDEO < $pipeout | $WifiBroadcast_TX -p $PORT -b $BLOCK_SIZE -r $FECS -f $PACKET_LENGTH $WLAN 1>/dev/null 2>&1
…/…

To add service :

  • systemctl enable ArduCopter-quad
  • systemctl enable mavproxy

To start, stop or restart a  service  :

  • systemctl start ArduCopter-quad
  • systemctl start mavproxy

To get service status :

  • systemctl status ArduCopter-quad
  • systemctl status mavproxy

(1) : the loadavg should not exceed 4 on RPI2 or RPI3 quad core

Topics :

Pages

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

fr_FR
en_US