Uses Cases

Use Cases

Options
Steps
  • Execution Environment
  • Autopilot
    • DroneKit SITL
      • MavProxy
    • Ardupilot SITL
      • export PATH=$PATH:$HOME/ardupilot/Tools/autotest
      • export PATH=/usr/lib/ccache:$PATH
      • sim_vehicle.py -v ArduCopter -l 20.6546009,-103.3915602,30,0
      • ToDo
        • Add Ardupilot Start Point
  • Implementation Details Each UAV
    • Vehicle ID
      • PX4 SYSID_THISMAV
      • Ardupilot MAV_SYS_ID
      • Obtain, Assign, Modify, Report Back
        • param show SYSID_THISMAV
        • param set SYSID_THISMAV 2
    • Ports
      • Internals 14550 14551
      • Assign
  • Map
    • MapMoveDemo
  • Missions

Demo

Containers should do one thing and do that well.
  • Setup
    • cd Bitol/VirtualDroneSolution/UseCases/XunanKab/Ardupilot
    • sudo docker build -t xe1gyq/ardupilot .
    • sudo docker ps -a
    • sudo docker commit -m "Ardupilot" -a "Abraham Arce" c398fc22eeba xe1gyq/ardupilot
  • Unnmaned Aerial vehicle
    • ip addr
    • run
      • sudo docker run -it xe1gyq/xardupilot "2" "20.6546009" "-103.3915602" "30"
      • sudo docker run -it -v ardupilot:/home/user/ardupilot xe1gyq/ardupilot bash
        • 172.17.0.2/16
          • export PATH=$PATH:$HOME/ardupilot/Tools/autotest
          • export PATH=/usr/lib/ccache:$PATH
          • sim_vehicle.py -v ArduCopter -l 20.6546009,-103.3915602,30,0
        • 172.17.0.3/16
          • export PATH=$PATH:$HOME/ardupilot/Tools/autotest
          • export PATH=/usr/lib/ccache:$PATH
          • sim_vehicle.py -v ArduCopter -l 20.6546009,-103.3915602,30,0
      • sudo docker run -it -p 14550:15001 -p 14551:16001 -v ardupilot:/home/user/ardupilot xe1gyq/ardupilot bash
  • Ground Control Station
    • ./QGroundControl.AppImage
      • 172.17.0.2:5762
  • Developer API
    • python Telemetry.py --connect=tcp:172.17.0.2:5763
sudo docker run -it xe1gyq/xardupilot "2" "20.6546009" "-103.3915602" "5"
sudo docker run -it xe1gyq/xardupilot "3" "20.6546030" "-103.3915603" "10"
sudo docker run -it xe1gyq/xardupilot "4" "20.6546009" "-103.3915602" "10"
python Telemetry.py --connect=tcp:172.17.0.2:5763
python GoTo.py --connect=tcp:172.17.0.2:5763 --lat=20.6595009 --long=-103.3964602 --alt=5
python Triangle.py --connect=tcp:172.17.0.2:5763
python Square.py --connect=tcp:172.17.0.2:5763
  • 1

One

[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/One$ sudo apt install npm
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/One$ npm install csv-parse/home/user/Bitol/VirtualDroneSolution/UseCases/XunanKab/One
npm WARN enoent ENOENT: no such file or directory, open '/home/user/Bitol/VirtualDroneSolution/UseCases/XunanKab/One/package.json'
npm WARN One No description
npm WARN One No repository field.
npm WARN One No README data
npm WARN One No license field.
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/One$
[email protected]:~$ cd Bitol/VirtualDroneSolution/UseCases/XunanKab
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab$ ls
Dockerfile
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab$
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab$ sudo docker build -t xe1gyq/xunankab .
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
xe1gyq/xunankab latest 3f38626133a0 2 minutes ago 692MB
ubuntu 16.04 f975c5035748 3 weeks ago 112MB
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab$
[email protected]:~/Bitol/VirtualDroneSolution/UseCases/XunanKab$ sudo docker run -it xe1gyq/xunankab bash
^[email protected]:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
130: [email protected]: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
valid_lft forever preferred_lft forever
[email protected]:~$ dronekit-sitl --list
solo-1.2.0
solo-2.0.18
solo-2.0.20
plane-3.3.0
copter-3.3
rover-2.50
[email protected]:~$ dronekit-sitl copter --home=20.654544,-103.3930971,30,0 --instance 0
os: linux, apm: copter, release: stable
Downloading SITL from http://dronekit-assets.s3.amazonaws.com/sitl/copter/sitl-linux-copter-3.3.tar.gz
Download Complete.
Payload Extracted.
Ready to boot.
Execute: /home/user/.dronekit/sitl/copter-3.3/apm --home=20.654544,-103.3930971,30,0 --instance 0 --model=quad
Started model quad at 20.654544,-103.3930971,30,0 at speed 1.0
bind port 5760 for 0
Starting sketch 'ArduCopter'
Serial port 0 on TCP port 5760
Starting SITL input
Waiting for connection ....

DJI Tello

[email protected]:~/TelloPy$ git clone https://github.com/hanyazou/TelloPy
[email protected]:~/TelloPy$ sudo sudo apt-get install -y libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev
[email protected]:~/TelloPy$ sudo pip install av