All three language implementations accept the following configuration parameters:
| Option | Python | C++ | JS | Default |
|---|---|---|---|---|
host |
str |
std::string |
string |
"localhost" |
port |
int |
int |
number |
53001 |
password |
str\|None |
std::string |
string\|null |
None/"" |
timeout |
float (seconds) |
std::chrono::milliseconds |
number (ms) |
10s |
auto_reconnect |
bool |
bool |
boolean |
True |
reconnect_interval |
float (seconds) |
std::chrono::milliseconds |
number (ms) |
1s |
max_reconnect_interval |
float (seconds) |
std::chrono::milliseconds |
number (ms) |
30s |
max_retries |
int |
int |
number |
3 |
heartbeat_interval |
float (seconds) |
std::chrono::milliseconds |
number (ms) |
5s |
heartbeat_cmd |
str |
std::string |
string |
"state" |
connect() / connect() / connect()Establish the WebSocket connection, start background worker threads/tasks, and automatically log in if a password is configured.
Returns: None (Py sync), awaitable None (Py async / C++ void / JS Promise
Raises:
- LLUAVConnectionError โ if the initial connection or login fails.
disconnect() / disconnect() / disconnect()Gracefully close the connection, stop all background threads/tasks, and cancel/reject any pending commands in the queue.
Returns: None / void / Promise<void>
is_connected() / is_connected() / isConnected()Check whether the WebSocket is currently open and ready.
Returns: bool
send_cmd(cmd, args, timeout, block) / send_cmd(cmd, args, timeout) / sendCmd(cmd, args, options)The fundamental API used by all high-level methods. Enqueues a command and waits for the JSON response.
Parameters:
- cmd (str) โ Command name, e.g. "takeoff".
- args (str, optional) โ Command arguments string. Default "".
- timeout โ Override the default timeout for this specific command.
- block (Python sync only) โ If True, blocks until response. If False, returns a concurrent.futures.Future.
Returns:
- Python sync: dict if block=True, else Future[dict].
- Python async: dict.
- C++: nlohmann::json.
- JS: Promise<object>.
Raises:
- LLUAVConnectionError โ not connected and reconnect failed or disabled.
- LLUAVCommandError โ server returned ret != 0, or command timed out / exceeded max retries.
add_periodic_task(name, interval, cmd, args) / add_periodic_task(name, interval, cmd, args) / addPeriodicTask(name, intervalSec, cmd, args)Register a named periodic task. The SDK will automatically enqueue this command at the specified interval.
Parameters:
- name โ Unique task identifier.
- interval โ Interval in seconds.
- cmd โ Command name.
- args โ Command arguments (optional).
Behavior: - Tasks are enqueued into the same FIFO queue as user commands, so they never interrupt an in-flight command on the wire. - If the queue is backed up, the task may be delayed but will never be dropped.
remove_periodic_task(name) / remove_periodic_task(name) / removePeriodicTask(name)Unregister a previously added periodic task.
login(password)Explicitly authenticate with the given password. Usually not needed if password was provided to the constructor (auto-login handles it).
Parameters:
- password โ The login password string.
admin_lock() / admin_unlock()Enable or disable admin lock mode. Requires admin privileges (password "1025").
| Method | Args | Description |
|---|---|---|
get_state() |
โ | Full FSM state JSON |
get_param(name) |
name (optional) |
All params, or specific param by name |
get_version() |
โ | Firmware version info |
get_sysinfo() |
โ | Uptime, RAM, CPU load |
get_disk_usage() |
โ | Available disk space (MB) |
get_statics() |
โ | Comm stats, ROS record stats, node uptime |
get_machine_id() |
โ | Unique hardware ID |
get_hud1() |
โ | Submap info + UAV ENU pose + volume estimate |
get_lidar_pose() |
โ | Lidar pose in ENU degrees |
get_apron_state() |
โ | Charging pad status and comm stats |
get_mavlink_msgs() |
โ | MAVLink message reception counts |
get_submap_info() |
โ | Submap keyframe info |
show_setpoint() |
โ | Current setpoint |
show_ap_guid2() |
โ | AP GUID2 |
show_msg(count) |
count (default -1) |
Recent log messages |
| Method | Args | Description |
|---|---|---|
takeoff() |
โ | Command takeoff |
land() |
โ | Emergency land |
rtl() |
โ | Return to launch |
mission_rtl() |
โ | Mission RTL |
tether_land() |
โ | Tethered landing |
set_sp_ned(x, y, z, yaw) |
4 floats | Set NED setpoint (meters, radians) |
relocate_pos(x, y, z, yaw) |
4 floats | Relocate position (requires map_locate) |
tunnel_fly(enable) |
bool |
Enable/disable tunnel fly |
disarm() |
โ | Force disarm |
sleep() |
โ | Enter sleep mode |
wakeup() |
โ | Wake from sleep |
auto_sleep_enable(enable) |
bool |
Enable auto-sleep |
zyhk(heights, land_x, land_y, land_yaw) |
list<float>, floats |
Multi-height hover mission |
| Method | Args | Description |
|---|---|---|
mission(ext_id, path_or_json) |
int, str |
Submit mission with external ID |
start_plan(plan_str) |
str |
Start a flight plan |
unlock_plan() |
โ | Clear plan execution lock |
mission_wp_list() |
โ | Get mission waypoint list |
mission_wp_exec(ext_id, wp_ids) |
int, str |
Execute comma-separated waypoint IDs |
ai1_mission(task_id, mission_file) |
str, str |
Submit AI1 mission |
obs_mission(enable) |
bool |
Toggle obstacle mission live |
dump_mission_result(ext_id) |
int (optional) |
Dump result by ext ID |
dump_mission_list() |
โ | Dump short mission list |
abort_report(abort_id) |
int (default -1) |
Finish/abort mission report |
set_taskname(name) |
str |
Set task name |
| Method | Args | Description |
|---|---|---|
save_map(path) |
str |
Save current map |
set_map_locate(enable) |
bool |
Enable/disable map localization |
set_map_path(path) |
str |
Set localization map path |
list_maps() |
โ | List saved maps |
rm_map(name) |
str |
Remove a saved map |
| Method | Args | Description |
|---|---|---|
capture() |
โ | Capture single photo (RGB + IR) |
snapshot() |
โ | System snapshot |
record_toggle() |
โ | Toggle video recording |
savebag(start) |
bool |
Start/stop ROS bag recording |
siyi_reboot() |
โ | Reboot SIYI camera/gimbal |
siyi_format() |
โ | Format SIYI SD card |
siyi_center() |
โ | Center SIYI gimbal |
siyi_init() |
โ | Initialize SIYI (close HDMI) |
siyi_downvideo(vid) |
int (default -1) |
Download latest video |
siyi_sync() |
โ | Trigger SIYI sync |
| Method | Args | Description |
|---|---|---|
led_on() / led_off() |
โ | Turn LED on/off |
led_enable() / led_disable() |
โ | Enable/disable LED control |
led_pwm(pwm) |
int |
Set LED PWM |
led_blink() |
โ | Start LED blinking |
| Method | Args | Description |
|---|---|---|
set_param(name, value) |
str, value |
Set parameter |
get_param_value(name) |
str |
Get single parameter |
reset_params() |
โ | Reset all to defaults |
save_params(force) |
bool |
Save persistently |
change_password(new_password) |
str |
Change WS password |
| Method | Args | Description |
|---|---|---|
set_apron_vol(voltage) |
float |
Set charging voltage |
set_apron_amp(amperage) |
float |
Set charging amperage |
| Method | Args | Description |
|---|---|---|
reboot_node() |
โ | Reboot flight control node |
reboot_ap() |
โ | Reboot autopilot |
reboot_system() |
โ | Reboot onboard computer |
poweroff_system() |
โ | Power off onboard computer |
prepare_poweroff() |
โ | Flush logs before poweroff |
reboot_dlo() |
โ | Reboot DLO |
restart_dlo() |
โ | Restart DLO pipeline |
kill_livox(script) |
str (optional) |
Kill Livox driver |
| Method | Args | Description |
|---|---|---|
lidar_onoff(on) |
bool |
Turn lidar on/off |
lidar_warn() |
โ | Get lidar warning zones |
utg_get() |
โ | Trigger UTG thickness read |
utg_set(speed) |
int |
Set UTG sonic speed |
| Method | Args | Description |
|---|---|---|
grabber_ctrl(pwm) |
int |
Control grabber PWM |
ara8_center() |
โ | Set ARA8 to center |
ara8_pitch(angle) |
int |
Set ARA8 pitch angle |
cv_test() |
โ | Trigger CV test |
preflight_check() |
โ | Run preflight checks |
preflight_enable(enable) |
bool |
Enable preflight before takeoff |
clear_bags(min_gb) |
int (default -1) |
Clear old bag files |
clear_images(min_gb) |
int (default -1) |
Clear old images |
list_imagedir(size) |
int (default -1) |
List image directories |
rm_imagedir(name) |
str |
Remove image directory |
test_wp(x, y, z) |
3 floats | Test waypoint reachability |
test_wp_list(file_path) |
str |
Test waypoint list from file |
save_msg() |
โ | Save messages to log |
bms_setpower(on) |
bool |
Set BMS power |
bms_setcharge(on) |
bool |
Set BMS charge |
help() |
โ | List available commands |