Setting up Lua Scripting with Ardupilot on Linux
This page will explain how to set up Lua Scripting (opens in a new tab) on an Ardupilot on Linux system, such as the MUREX Carrier Board (opens in a new tab), Navio2 (opens in a new tab), Blue Robotics Navigator (opens in a new tab), and others. This method has been tested on a Raspberry Pi 4/Compute Module 4, but should apply for other boards built on the Ardupilot Linux HAL.
- Enable the
SCR_ENABLE
parameter, and restart the binary (./ardusub, ./arducopter, etc.
) - A folder should be created from the directory that you started running the binary from. You can also configure a custom storage path (opens in a new tab) where the
scripts
are located.- Find any folder named
scripts
that appear to be related to Ardupilot or newly created from setting theSCR_ENABLE
parameter. - If none can be found, create a folder from the directory that you started running the binary from named
scripts
- Find any folder named
- Load Lua scripts in the
scripts
folder. Ardupilot will automatically search.lua
files.