Yes, I have been able to arm using:
rosrun mavros mavsafety arm
At present I can arm the rover(boat) using either QGC “or” using mavros.
I’m trying to make it such that it isn’t “or”, but it must be “and”, i.e, the QGC cannot arm the bot unless there is explicit permission received from a companion computer (using mavros, or anything else you suggest), that the boat can arm.
Thanks for your reply.
Yes, but considering that Lua scripts have the low priority while running, I’m not sure it would be wise to use it for critical safety checks that the companion computer will perform before giving the command to arm/disarm the boat.
Correct me if I’m wrong and do let me know how to proceed with the implementation.
Basically it’s a mechanism to require an additional condition to be met prior to arming. The example script is just a battery check but others might be that a valid mission is loaded, or an external authorisation (UTM permissions etc) has been granted.
The Lua based arm authorisation feature requires a positive “OK” from the lua script so there’s no issue with the priority with which Lua runs. E.g. the vehicle can’t arm until the script says it is OK to arm … so worst case the vehicle can’t arm but more broadly we haven’t had any reports of Lua script thread priority causing problems even in cases where the script is in control of the vehicle so I don’t think there’s any need to worry about this.