How to use execute-script


How to use execute-script api ?
Does it pass command to app in PX4 ?


Checkout the ‘API usage information’ section in documentation. You
should find it at the bottom of above page.

You can not pass any command to px4 app directly using this api. However if you have a program in C, bash, python, etc. which can call px4 app then you can trigger that program using exec script API.
In short exec script can remotely trigger scripts on single board computer.


Thank you.
I think i can use parameter API to enable/disable a function in PX4 app.


Well there is an undocumented API,

rosservice call /flytos/mavros/autopilot_app_control "app_name: ''
arguments: ''"

This command works on ONLY PX4, and not on APM.

WARNING: Use this API with caution. Make sure you don’t send any incorrect command to the autopilot. Your autopilot may get hanged or misbehave in case you do so, and then the drone may eventually crash.