ViewPro gimbal, Point Camera Here function

This is just for copter and not plane? We really need a better driver for the vtol fixed wing. That is what is used the most. I tried it a while ago running lua but it had really poor performance

Monty

@Chaoschoppers,

This is a shared driver so it should work on all vehicles.

There have not been many users of either the Viewpro Lua driver nor this newer C++ driver so any feedback is greatly appreciated. In what was was the performance poor? Was it perhaps that as the vehicle moved the gimbal only moved about once per second to re-point at the target?

Yes. That was part of it. There was no way to assign all the channels to work correctly for the point camera here function to work properly. It was a while ago so ill have to try it again

@Chaoschoppers,

OK. Iā€™m not quite sure why (RC?) channels would need to be assigned for the point-camera-here function but maybe youā€™re referring to the mount-poi lua script which doesnā€™t point the camera/gimbal but rather displays the lat,lon,alt of what the camera gimbal is pointing at?

In any case, in case it is helpful we have instructions here on the wiki for various ways to control the gimbal. I hope to come up with another page to succintly describe the various camera controls.

Anyway, thanks again for the discussion.

Our goal is to have the camera view angle icon show up in the map on mission planner. That way we can direct search crews to the area we are looking at. And the. The next step is to use real time video with the map meta data on it just like shot over does

3 Likes

Hey, is this ViewPro Driver support present in the Plane Firmware yet?

I am Using a ViewPro Q10TE with a Hybrid VTOL Plane and would like to point the camera towards the next waypoint in Auto Mission.
Finding out how can I implement this in Lua.
Maybe modify the mount-viewpro-driver.lua to include a command something like POINT_GIMBAL_HERE with the lat, long as the coordinates of the next waypoint.

Hi @Suyash_Mali,

Plane-4.5.0 includes a new C++ driver for the viewpro and setup instructions are on the wiki. In particular look for, ā€œIf using 4.5.x (or higher)ā€ on this page.

To command the gimbal to point at the next waypoint, you could add DO_SET_ROI or DO_SET_ROI_LOCATION commands to the mission with the lat,lon,alt of the next waypoint. Itā€™s a little laborious to setup but that should work.

We do actually have a pull-request to add support for DO_SET_ROI_WPOFFSET but it hasnā€™t been reviewed and merged yet.

1 Like

Great, thanks for the references.
Will try using these methods.

Just had one question,


Is there any way to select the gimbal from ā€œvehicle or camera gimbalā€ options?
I think for fixed wings it would be the gimbal itself by default, right?

Hi @Suyash_Mali,

Yes, thatā€™s right.

1 Like

So this still just points the camera to a set location. This is what it did before. It would be nice to at least see where the camera is pointing in relation the plane icon.

Hi.
For my application, I need to use the mount:set_roi_target()
Trying to figure out how can I implement this along with the lua driver.
I dont want to shift to the V4.5 (beta) right now, can it be possible to use the set_roi_target() with the lua driver in some way.
Thanks in advance.

Hi @Suyash_Mali,

You should be able to point the ViewPro gimbal at a location using the older lua script driver. Are you finding this doesnā€™t work?

To keep things simple, it would be best to first test using a standard ground station and we have instructions on how to control a mount here on the wiki.

Sorry if you know this already, Iā€™m just want to make sure weā€™re taking known-to-be-working steps towards what you want to do to ensure there are no configuration errors on the vehicle before introducing extra complexity.

1 Like

Hi, good news is that I am able to use the mount:set_roi_target() and the gimbal points to the location accurately.
However, when the drone yaws, the gimbal also yaws along with the drone, and when the drone stops yawing, the gimbal again points to the roi. Basically, during the vehicle yaw, the gimbal cannot keep its focus on the roi coordinate.
here is the video of the same: Mount ROI Tests - Google Drive

And this is the test script I used in the above video:

local PARAM_TABLE_KEY = 82
assert(param:add_table(PARAM_TABLE_KEY, "GIMBAL_", 1), 'could not add param table')
assert(param:add_param(PARAM_TABLE_KEY, 1, "TARGET", 0), 'could not add the param')

function loop()
    TARGET_POI = param:get('GIMBAL_TARGET')

    if TARGET_POI == 1.0 then 
        gcs:send_text(7, string.format("Gimbal Target: %f", TARGET_POI))
        target = ahrs:get_location()
        target:lat(19.xxxxxxx*1e7)
        target:lng(73.xxxxxxx*1e7)
        target:alt(0)
        mount:set_roi_target(0, target)

    elseif TARGET_POI == 2.0 then 
        gcs:send_text(7, string.format("Gimbal Target: %f", TARGET_POI))
        target = ahrs:get_location()
        target:lat(19.xxxxxxx*1e7)
        target:lng(73.xxxxxxx*1e7)
        target:alt(0)
        mount:set_roi_target(0, target)

    end    
    return loop, 500
end

return loop()

Any suggestions on how to make the gimbal track the roi continuously even when the vehicle orientation changes.

That is the same issue I had and if the plane is in loiter the camera cant keep up. Its always pointing in the wrong direction with late updates.

Chaos Unmanned Systems
Swift current, Saskatchewan, Canada
Chaos-unmanned.ca
306-741.8368

1 Like

Hi @Suyash_Mali, @Chaoschoppers,

Thanks for the reports. So the issue is a limitation in the ViewPro itself (see developer note here). It does not support ā€œlockā€ while accepting angle targets.

I will bring this up with ViewPro to see if they have any suggestions.

1 Like

Hi @rmackay9 is there any progress for adding support viewpro point tracking?

1 Like

Hi @ahmet_nwpal,

No progress Iā€™m afraid. I will try and bring it up again with ViewPro.

1 Like