The sandbox connects to the MQTT broker just fine, and is able to log and run some setup code. It also is able to detect autonomous enable/disable just fine, but does not execute the flight path. Here is my code:
I’m testing this in the sim right now, it connects just fine and starts running code but when it executes send_message(“avr/fcm/takeoff”, {}) nothing happens even though there are no errors. I also added some pauses like you said. Anyone know how to get it to actually takeoff autonomously?
For some reason it’s not in the documentation, but you need to put the altitude that you want to take off in the payload.
{“avr/fcm/actions”, {“action”: “takeoff”, “alt”: }
I realize this is a bit tricky. Not sure if you watched my video describing some of the fundamentals:
The topic should be avr/fcm/actions and the message is in JSON format like this:
{"action": "takeoff", "payload": { "alt": 1.5 }}
I’m going to update the documentation but one thing to keep in mind is that for any navigation commands I believe the default speed is 5m/s which is WAY TOO FAST for the AVR game court. This is a PX4 parameter that you should update to slow it down: