-
Pull into a folder, not the ardupilot folder.
-
Move broadcast into another folder. Run "make -f Makefile.cmd" to build the broadcast sim program.
-
Copy libraries/SITL/RemoteID to the ardupilot folder. Overwrite existing files if any.
-
Compare the rest of files to the existing files in the ardupilot folder, and make changes to the exsiting files.
Recommend to use a comparison tool, such as Meld Diff Viewer, to highlight the differences of the git files and the existing files. -
Recompile ardupilot.
Command is "./waf build" in the ardupilot folder. Or, in VSC, choose Terminal/Run build task/ardupilot build.
-
In the boradcast folder, run "./broadcast".
-
In the ardupilot folder, run "./build/sitl/bin/arducopter -S -I0 --model + --speedup 1 --remoteid 616263646566303132333435363738397778797A --home 30.270083225404864,-97.7730248064704,0,90 --defaults $HOME/ardupilot/Tools/autotest/default_params/copter.parm"
-I0 : means a instance number 0.
--remoteid 616263646566303132333435363738397778797A : means the remote id of the drone is 616263646566303132333435363738397778797A. The id must have 40 hex digits. -
To launch multiple drones.
3.a. Add incremental instance numbers, such as -I1, -I2 for each drone.
3.b. Add a unique id to each drone. -
Run dronekit program or mavproxy.
Example of run mavproxy for two drones: mavproxy.py --master tcp:127.0.0.1:5760 --master tcp:127.0.0.1:5770 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551 --console --map