Skip to content

01 How To Run

MHefny edited this page Nov 18, 2020 · 1 revision

App Structure

The application has two parts:

Website that runs and uses websockets.

UDP2WebSocket this is a nodejs app that receives udp packets from SITL and send equivalent data via websocket to Website.

Example Running two vehicles "Quad & Plane"

Plane

python3 ~/ardupilot/Tools/autotest/sim_vehicle.py -j4 -v ArduPlane -M --map --console --instance 80 --out=udpout:127.0.0.1:14550 --out=udpout:192.168.1.139:16450

Quad

python3 ~/ardupilot/Tools/autotest/sim_vehicle.py -j4 -v ArduCopter -M --map --console --instance 70 --out=udpout:127.0.0.1:16450 --out=udpout:192.168.1.139:14450 --add-param-file=./quadPlus_2.parm

quadPlaus_2.param is a parameter file that specifies ID of the vehicle so that the system knows it is another vehicle.

quadPlus_2.param

SYSID_THISMAV 2 FRAME_CLASS 1.000000 FRAME_TYPE 0.000000

instance specified to run SITL on different ports.

Now run websocket:

node udp2websocket.js

Run Website

cd static http-server -c0

That is all ... you should be able to see vehicles.

you can also run script run.sh

Have fun !

Clone this wiki locally