Deprecated mav_cmd_do_set_roi used by mission planner? What parameters?

Getting ready to create missions to test a camera gimbal, I’ve dug into the ROI waypoint.

According to the mavlink command in the waypoints file, Mission Planner uses command “201” (mav_cmd_do_set_roi) - which was deprecated in 2018.

And the parameters stored in the waypoint file don’t seem to have parameters that match the docs for the “201” command.

Out of curiosity, I added a command “197” which cancels “201” - and Mission Planner wouldn’t accept it as valid to upload to the flight controller.

I’m guessing there’s something going on here that I’ve missed. Can someone please point me in the right direction?

Thank you!

We use our own mavlink fork.
That specific message is one of the messages that differ between our own fork and the upstream mavlink repository where you are getting your documentation from.

Please use our fork instead.

1 Like

Where do I find docs on the ArduPilot MavLink fork?

The DEV section of the ArduPilot docs pointed me a couple of places - but I still don’t have a good picture.

The DEV section has a link to the “ardupilotmega.xml” dialect of Mavlink. I don’t know if this is the ArduPilot fork or not.

Command #201 in the arudupilotmega dialect is listed as GIMBAL_CONTROL - and doesn’t have the parameters I would expect.

The ArduPilot DEV section on Mavlink that contains mission commands lists MAV_CMD_DO_SET_ROI - but it doesn’t list any parameters.

In addition to this, I recall seeing mention of “hidden” mission commands on the recent video about creating a mission that lands, disarms, and re-arms and flies another segment of the mission. I expect those commands may be in here too - and, how to use them in Mission Planner.

I realize I’m opening a huge can of worms - unless there is documentation that explains all this that I’ve missed, it’s no small thing to get someone to explain it all. Unfortunately all this wonderful functionality is of little use one can’t figure out how to use it.

Thanks Amilcarlucas for sticking with me!

The URL to ArduPilot’s fork is all there is. The documentation IS the .xml file contained in that repository:

So, not in the ArduPilot docs - glad I didn’t miss it.

I’m still not sure this will do the trick. Command “197” is in the XML docs, but Mission Planner rejects this when attempting to upload that value by manually entering it into a waypoints file. (I tried it.)

So I’m going to need more help. For instance, for command 201, one parameter is “ROI Index”. But how does one establish an ROI Index?

And in Mission Planner, parameters 5, 6 and 7 are latitude, longitude and altitude. But the XML doc is abstract - it says “x” “y” and “z” as locations. That suggests to me that there’s more to specifying the ROI point in space.

There seems to be a lot going on here.

You will need to do as I do, look at the source code:

calls:

calls:

You are making a mountain of a molehill.

2 minutes’ worth of searching:

https://ardupilot.org/copter/docs/common-mavlink-mission-command-messages-mav_cmd.html?highlight=roi#mav-cmd-do-set-roi

https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_ROI_LOCATION

https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_ROI

Respectfully, Yuri, I disagree.

I’m trying to understand how to use ArduPilot as a tool.

For example - on my new Alexmos gimbal, the “Point Camera Here” feature on Mission Planner doesn’t work because ArduPilot and Alexmos don’t synchronize the initial heading. The Storm32 gimbal does. I can’t tell if I’m doing something wrong - or if there’s some shortcoming on how Ardupilot talks to Alexmos over Mavlink.

Once that’s sorted out, I’m hoping to create missions that take full advantage of the Alexmos gimbal.

In the Alexmos forum, Alexmos himself states (only a year or so ago) that the serial protocol provides more functionality than Mavlink. I need to know where the limitations are.

There’s a whole host of things to understand. Why for example, is a command that’s documented in the Ardupilotmega dialect of Mavlink (resetting ROI to null) get rejected when loading a mission to the flight controller?

And - there’s the whole topic of the “extra” mission commands that can be entered using undocumented techniques - as mentioned in the video that demonstrates creating a mission that restarts after landing and dis-arming.

There seems to be a lot to know - and I’m simply trying to learn.