### Setup Environment on Linux or WSL Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/common/source/docs/common-wiki-editing-setup.rst Execute the setup script to install necessary dependencies for building the wiki. ```bash ./Sphinxsetup.sh ``` -------------------------------- ### System Configuration Output Example Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/common/source/docs/common-beagle-bone-blue.rst An example of the expected output from the version.sh script, showing details about the bootloader, kernel, and installed packages. ```bash git:/opt/scripts/:[1583f354594aabfaff08dee2a4aabdfe61433024] eeprom:[A335BNLTBLA21736EL001182] model:[TI_AM335x_BeagleBone_Blue] dogtag:[BeagleBoard.org Debian Buster Console Image 2021-12-01] bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2019.04-g923f8b8 (Oct 26 2021 - 14:46:57 +0000)]:[location: dd MBR] bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-g923f8b8]:[location: dd MBR] bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-g923f8b8 (Oct 26 2021 - 14:46:57 +0000)]:[location: dd MBR] bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-g923f8b8]:[location: dd MBR] UBOOT: Booted Device-Tree:[am335x-boneblue.dts] UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0.kernel] UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel] kernel:[4.19.94-ti-r68] device-tree-override:[dtb=am335x-boneblue.dts] /boot/uEnv.txt Settings: uboot_overlay_options:[enable_uboot_overlays=1] uboot_overlay_options:[uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo] uboot_overlay_options:[enable_uboot_cape_universal=1] pkg check: to individually upgrade run: [sudo apt install --only-upgrade ] pkg:[bb-cape-overlays]:[4.14.20210821.0-0~buster+20210821] pkg:[bb-customizations]:[1.20211201.1-0~buster+20211201] pkg:[bb-usb-gadgets]:[1.20211012.0-0~buster+20211012] pkg:[bb-wl18xx-firmware]:[20210922.2-0~buster+20211007] pkg:[kmod]:[26-1] WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED] pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305] groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev gpio admin tisdk weston-launch cloud9ide] cmdline:[console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] dmesg | grep remote [ 26.835790] remoteproc remoteproc0: wkup_m3 is available [ 26.901553] remoteproc remoteproc0: powering up wkup_m3 [ 26.901586] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148 [ 26.901840] remoteproc remoteproc0: remote processor wkup_m3 is now up [ 28.464026] remoteproc remoteproc1: 4a334000.pru is available [ 28.480195] remoteproc remoteproc2: 4a338000.pru is available dmesg | grep pru [ 28.464026] remoteproc remoteproc1: 4a334000.pru is available [ 28.464212] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully [ 28.480195] remoteproc remoteproc2: 4a338000.pru is available [ 28.480412] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully dmesg | grep pinctrl-single [ 0.975434] pinctrl-single 44e10800.pinmux: 142 pins, size 568 dmesg | grep gpio-of-helper END ``` -------------------------------- ### Run DroneKit Example Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/common/source/docs/common-erle-brain-linux-autopilot.rst Commands to clone the DroneKit examples, start MAVProxy, and execute a demo script. ```bash # fetch the code $ git clone https://github.com/ArduPilot/droneapi-python.git $ cd droneapi-python/example # Start MAVProxy (install if not present) $ mavproxy.py --master=udp:192.168.7.2:6000 MANUAL> module load droneapi.module.api DroneAPI loaded MANUAL> ``` ```bash MANUAL> api start small_demo.py Mode: VehicleMode:MANUAL Location: Location:lat=21.2938874,lon=-157.8501416,alt=0.189999997616,is_relative=None ``` -------------------------------- ### Start JetPack Installation Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/companion-computer-nvidia-tx2.md Execute the downloaded JetPack installer script to begin the installation process on the host machine. This will launch the graphical installer. ```bash ./JetPack-L4T-3.3-linux-x64_b39.run ``` -------------------------------- ### Build MAVProxy Windows Installer Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/ardupilot/source/docs/development/mavdevenvwindows.md Creates a one-click Windows installer for MAVProxy. Requires Inno Setup to be installed. ```bash MAVProxyWinBuild.bat ``` -------------------------------- ### Run MAVProxy with DroneKit Example Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/ardupilot/source/docs/intel-edison.md Starts MAVProxy, connecting to the flight controller via /dev/ttyMFD1 at 57600 baud, and loads the small_demo.py DroneKit example script. ```default edison@ubilinux:~/dronekit-python/example$ mavproxy.py --master=/dev/ttyMFD1,57600 --rtscts Logging to mav.tlog libdc1394 error: Failed to initialize libdc1394 Failed to load module: No module named terrain Running script /home/edison/.mavinit.scr -> module load droneapi.module.api DroneAPI loaded Loaded module droneapi.module.api MAV> Flight battery warning AUTO> Mode AUTO APM: Plane V3.2.0 (a9defa35) APM: PX4v2 002E001B 3433470D 32323630 T|D0 .Received 486 parameters AUTO> api start small_demo.py (If you see the messages below your vehicle is now happily talking to mavproxy/dronekit) AUTO> mode is AUTO Mode: VehicleMode:AUTO Location: Location:lat=0.0,lon=0.0,alt=1.38999998569,is_relative=False Attitude: Attitude:pitch=0.00390338362195,yaw=-1.69979262352,roll=-3.12372088432 Velocity: [0.0, 0.0, 0.0] GPS: GPSInfo:fix=0,num_sat=0 Armed: False groundspeed: 0.0 airspeed: 14.2826738358 ``` -------------------------------- ### Install MAVProxy from Source Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/development/mavdevenvlinux.md Installs MAVProxy using its setup script after making changes to the source code. This step is necessary for modifications to take effect. ```bash python3 -m pip install . ``` -------------------------------- ### Install libnl-dev Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/ardupilot/source/docs/odroid-wifi-access-point-for-sharing-files-via-samba.md Install the libnl-dev package if hostapd fails to start. ```default apt-get install libnl-dev ``` -------------------------------- ### Start Vagrant Instance Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/setting-up-sitl-using-vagrant.md Initiate the virtual machine setup using Vagrant. This command downloads the base VM and configures the development environment. It may take some time on the first run. ```default vagrant up ``` -------------------------------- ### MAVProxy mavinit.scr Example Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/getting_started/mavinit.md This example demonstrates how to set up aliases and load modules within a MAVProxy startup script. Use this to define shortcuts for common commands and ensure necessary modules are loaded upon MAVProxy initialization. ```bash # this is setting up aliases @alias add g graph @alias add gbatt g SYS_STATUS.current_battery # run command on startup module load graph gbatt ``` -------------------------------- ### Load RC Setup Module Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/modules/rcsetup.md Initializes the RC setup environment. ```bash module load rcsetup ``` -------------------------------- ### Example: Launch Copter SITL with GDB Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/debugging-with-gdb-on-linux.md This example demonstrates launching the default Copter SITL simulation using GDB with specific options. ```bash gdb --args $HOME/ardupilot/build/sitl/bin/arducopter -S -I0 --home -35.363261,149.165230,584,353 --model + --speedup 1 --defaults $HOME/ardupilot/Tools/autotest/default_params/copter.parm ``` -------------------------------- ### Configure Windows Terminal starting directory Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/building-setup-windows11.md Example configuration snippet for setting the default starting directory in Windows Terminal settings. ```default { "guid": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", "hidden": false, "name": "Ubuntu-20.04", "source": "Windows.Terminal.Wsl", "startingDirectory" : "//wsl$/Ubuntu-20.04/home//ardupilot" }, ``` -------------------------------- ### Install u-boot tools Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/building-for-beaglebone-black-on-linux.md Download and build the u-boot tools required for creating uImage files. ```bash wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 tar -xjf u-boot-latest.tar.bz2 ``` ```bash cd u-boot-2013.10 (look to see what this is called, it may have changed) ``` ```bash make tools (don't work with last revision of u-boot need a revision) install tools/mkimage /usr/local/bin ``` -------------------------------- ### Run SITL Example Sketch Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/learning-ardupilot-the-example-sketches.md Start a compiled example sketch in SITL mode. This command executes the sketch with specified parameters for simulation. ```bash ./build/sitl/examples/RCProtocolDecoder -M quad -C ``` -------------------------------- ### List Waf Examples Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/learning-ardupilot-the-example-sketches.md List all examples that can be built using the `waf` build system. This command helps discover available example sketches. ```bash cd $ARDUPILOT_HOME ./waf list | grep 'examples' ``` -------------------------------- ### MAVProxy SET_POSITION_TARGET_GLOBAL_INT Examples Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/ardupilot/source/docs/mavlink-rover-commands.md Example commands for MAVProxy/SITL to control vehicle movement and orientation. Ensure the vehicle is in GUIDED mode and armed before execution. ```text message SET_POSITION_TARGET_GLOBAL_INT 0 0 0 3 3580 -353621474 1491651746 0 0 0 0 0 0 0 0 0 ``` ```text message SET_POSITION_TARGET_GLOBAL_INT 0 0 0 3 3559 0 0 0 1 0 0 0 0 0 0 0 ``` ```text message SET_POSITION_TARGET_GLOBAL_INT 0 0 0 3 2535 0 0 0 0 0 0 0 0 0 0.7854 0 ``` ```text message SET_POSITION_TARGET_GLOBAL_INT 0 0 0 3 1511 0 0 0 0 0 0 0 0 0 0 0.174 ``` -------------------------------- ### Initialize Submodules Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/building-ardupilot-with-arduino-windows.md Navigate to the repository directory and initialize all required submodules. ```default cd ardupilot git submodule update --init --recursive ``` -------------------------------- ### Install ArduPilot Prerequisites on Ubuntu Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/building-the-code-onlinux.md Installs all necessary dependencies for building ArduPilot on Ubuntu using the provided script. This simplifies the setup process. ```bash ardupilot/Tools/environment_install/install-prereqs-ubuntu.sh -y ``` -------------------------------- ### Prepare and Run JetPack Installer Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/companion-computer-nvidia-tx1.md Set the installer file permissions and execute the JetPack installation script on the host machine. ```bash chmod a+x JetPack-L4T-3.1-linux-x64.run ``` ```bash ./JetPack-L4T-3.1-linux-x64.run ``` -------------------------------- ### Start and Manage Hostapd Source: https://github.com/ardupilot/ardupilot_wiki/blob/master/antennatracker/source/docs/odroid-wifi-access-point-for-sharing-files-via-samba.md Commands to test hostapd and configure the service for startup. ```bash hostapd /etc/hostapd/hostapd.conf ``` ```bash apt-get install libnl-dev ``` ```bash DAEMON_CONF=/etc/hostapd/hostapd.conf ```