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
1
sudo docker run -it xe1gyq/xardupilot "2" "20.6546009" "-103.3915602" "5"
2
sudo docker run -it xe1gyq/xardupilot "3" "20.6546030" "-103.3915603" "10"
3
sudo docker run -it xe1gyq/xardupilot "4" "20.6546009" "-103.3915602" "10"
4
python Telemetry.py --connect=tcp:172.17.0.2:5763
5
python GoTo.py --connect=tcp:172.17.0.2:5763 --lat=20.6595009 --long=-103.3964602 --alt=5
6
python Triangle.py --connect=tcp:172.17.0.2:5763
7
python Square.py --connect=tcp:172.17.0.2:5763
Copied!
  • 1

One

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

DJI Tello

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

Last modified 3yr ago
Copy link