I have created an app using the GroundSDK, but I need to toggle a setting that is only available in the AirSDK. I do not want an AirSDK mission that manages the flight of the drone, which seems to be the focus of all of the examples.
Ultimately what I’d really want is a method on the MainGimbal in the GroundSDK that would unlock the yaw axis, so this functionality is what I want from the AirSDK and nothing else.
It seems cumbersome to add another whole project and build system just for this, but let me know if there are other options available.
I understand this is the case. I am struggling with the interaction between the GroundSDK and AirSDK as all of the examples are using Olympe. Looking at the documentation, I see Messages can be sent from the MissionManager but these include a “Service ID” which does not seem to be explained anywhere and this doesn’t seem to exist in the Olympe code.
I would appreciate either an example of this interaction or more thorough explanation of each of the constructor arguments in the documentation.
The service ID used in mission messages is the jenkins 16bit
hash of the protobuf package name + ".Command" (for messages to send to the drone) or ".Event" (for messages received from the drone).
For the message ID, you can freely choose an int value and increment it for each message.
The payload is the built protobuf message you want to send as byte array.
Now a couple more questions about the interaction.
If I’m sending a message that doesn’t need a payload, would I just supply an empty bytearray for that parameter or do I need to provide something?
When I’m receiving events from the drone, do need to send a message first to get it to send something? I have not had luck with the latestMessage from the MissionManager. For example, receiving the mean distance from the HelloDrone AirSDK sample (My other post about this)
Is this documented anywhere? I haven’t seen anything about the Jenkins Hash in the docs and this seems like a pretty crucial piece of the interaction between GroundSDK and AirSDK
We can keep the discussion for both this post and the other one here, since they’re both about interacting with the AirSDK
One more question. I see that the gimbal lock is controlled by a custom guidance mode, but is it possible to unlock the gimbal for existing modes? For example when I command the drone with PilotingInterfaces from the GroundSDK. In my testing I am able to rotate the gimbal when I have my gimbal unlock miission active, but once I take off it resets back to the center.
Also I see that there was a request for more python documentation back in 2022. Are there any updates on this?
I think you can send a message with an empty payload if you need to send only one kind of information.
You don’t need to send a message first, the drone can send the first one. However, you should notice that latestMessage is transient, so you have to add an observer to MissionManager to get the messages, like this:
drone.getPeripheral(MissionManager::class.java) { missionManager ->
val message = missionManager?.latestMessage
...
}
Now I think all that I still need is the ability to unlock the gimbal for all missions/modes/piloting interfaces. I am able to unlock it with a custom guidance mode but once I take off it locks again.