I’m trying to get Cockpit to control my Siyi gimbal. Since it’s not (at the moment) available, I thought I could add them by creating an action that would be triggered by some data lake variable change.
My problem is that I can’t figure out why it’s not working as expected.
Should I use the name of the command (i.e MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW) or the ID of the command (1000) ? It’s also unclear if I should use the deviceID 1
The gimbal is working fine from QGroundControl - so I know it’s correctly configured and can receive the proper message.
You can definitely do that with actions and data-lake variables.
The first thing I would try do do is to create the MAVLink Action and run it, without any connections to the data-lake. Once you validate that, you can connect it to the data-lake.
You should use the name of the command. About the System ID and Component ID, I’m not familiar with this gimbal to answer properly. If you’re using BlueOS you can access the mavlink2rest page (http://blueos-avahi.local:6040) to see if the gimbal is already appearing there. If so, both the system and component ID will be there.
In the end your action will look something like this:
To see if the command is indeed being sent, I suggest going to the mavlink2rest page again and clicking the last COMMAND_LONG message under Vehicle=255/Component=240. If this was the last command you sent, it will be there.
If you’re using mavlink-server as your router, you can use its page under http://blueos-avahi.local:8080 to check the same. It’s UX is much better.
Can you open Cockpit, run the action, and them download the log from this session that is in Menu>Settings>Dev? Make sure the session start time matches this session. Sometimes it takes a while to appear.
Indeed - it seems Cockpit’s MAVLink commands reference doesn’t include it (because the latest reference update was before that command got changed from WIP to fully included in common). It’s possible MAVLink2REST doesn’t include it at all, but I haven’t checked that (and it’ll depend on the BlueOS version in use). It may be easiest to just try sending the command and seeing if it works. @rafael.lehmkuhl can hopefully provide an example HTTP request configuration to do so.
As I understand it we’re working on changing Cockpit’s MAVLink reference to be automatically updated weekly (for subsequent versions - it doesn’t get fetched/updated dynamically, although maybe that’s an option too).
Yes. I forgot to mention here, but I asked @patrickelectric if mavlink2rest had support for this message, and he confirmed it does not.
Patrick is working on a backport version of mavlink2rest including this message (and maybe some others) and a corresponding Beta of BlueOS. For now we will have to wait for it.
@rafael.lehmkuhl thanks for the followup - but now I have another question : is there anything I can do to add this ? I’m not fully clear if an addon for blueos would be beneficial, or digging into the code…
@ArcanumXIII sorry for the late response. We got back from holidays yesterday.
I just talked to @patrickelectric and he aims to release this week already a new version of MCM that supports those messages. With this version in hands you will be able to update the binary (file) on BlueOS (this is done through the BlueOS frontend, no need to worry about terminals) and test it.