I've got this working with (limited) success.
I'm noticing that the flight plan will periodically stall when using a flight plan with an ROI specified.
It is pretty weird as I'll basically set a series of waypoints around an ROI's radius at 0, 45, 90, 135, 180, 225, 270, 315, and back to 0.
When it does stall it tends to happen between the 2nd and 3rd waypoint. The drone just starts floating around . This would spell disaster if it happened outside of wifi range.
It seems I can create the stall fairly frequently the shorter the radius I use (5-10 meters) and the lower the altitude (5-10 meters). However I've had it stall at 50, 100, even 200 meters.
If I use the Absolute View Type I can fly from point to point all day with no issues.
I'm also leveraging the DoSpeed do event but I doubt it is root cause. I'm clearly doing something wrong as I know this (ROI's) is available as of 3.2.0.
@Djavan or @Nicolas would it be helpful if I posted the resulting mavlink file for a plan?
Here's a "static" example of how I'm building my plan:
final ARMavlinkMissionItem roi = ARMavlinkMissionItem.CreateMavlinkSetROI(MAV_ROI.MAV_ROI_LOCATION, 0, marker.getId(), (float) marker.getLatitude(), (float) marker.getLongitude(), 2);
final ARMavlinkMissionItem speed = ARMavlinkMissionItem.CreateMavlinkChangeSpeedMissionItem(1, marker.getSpeed(), 100);
view = ARMavlinkMissionItem.CreateMavlinkSetViewMode(MAV_VIEW_MODE_TYPE.VIEW_MODE_TYPE_ROI, marker.getPoi().getId());
Now picture me doing this for each of the calculated coordinates to create a full circle around the POI:
final ARMavlinkMissionItem destination = ARMavlinkMissionItem.CreateMavlinkNavWaypointMissionItem((float) marker.getLatitude(), (float) marker.getLongitude(), (float) marker.getAltitude(), (float) yaw);
And this is what it looks like visually:
And the result when it works... I can rerun this plan multiple times. One try it will work and the next it won't. Sometimes I can clear the plan, set a simple single waypoint run, reload and execute and it'll work. Other times it just stalls.