ViewPro gimbal, Point Camera Here function

I am trying to get the point camera here function working on mission planner. I sort of got it working when using sbus direct to the camera but it does not get any feedback from the gimbal. I need it to point to a spot on the map and stay there even if the drone moves. My camera has the gps coordinates right on it as well as a laser range finder so the information is all there. I am controlling the camera with a serial port SR2. I do not know exactly how I got it working but there is 3 wires connected to the tx/rx and ground on the gimbal side and its plugged into telem 2 port. I believe its sbus control running through the serial port in The pixhawk. This is the part where I cant get the parameters setup to have any control over the gimbal. I tried all the options for camera type and protocol type but nothing. Using my rc control it works perfectly. If I switch the connection over to rc out xx I can use the do commands or manual actions under each channel assigned but there is not enough servo out channels available for my gimbal to work properly so Sbus is the way to go. When I am setup this way the camera point here function sort of works but just spins continuously. So I need to get mission planner to see the gimbal and get its information because the gimbal is already getting information from the flight controller.


It looks like you might be using a ViewPro gimbal, is this correct? If “yes” then AP 4.4 includes support for the ViewPro gimbals although this support is very new and hasn’t been tested by many yet. Support requires the autopilot be capable of running Lua scripts though which means it will require an F7 or H7 CPU (e.g. CubeOrange, Durandal, etc).

Here’s the new wiki page for the ViewPro gimbals.

By the way, in the diagram you’ve attached above, it looks like the gimbal and autopilot are connected using a serial port (not SBUS). This serial port connection could use MAVLink or the ViewPro’s custom protocol. In the setup described on the new wiki page, it’s the custom protocol that is used.

1 Like

Possibly a dumb question but wheres the link for the lua script?

I am using a viewpro gimbal yes. And a pixhawk orange

1 Like

The whole goal of this project is to click on the map and the camera will point to that location and not drift off regardless of what the drone does


The mount-viewpro-driver.lua script can be found here. You’ll need to right-mouse-click and select “Save Page As” and put it somewhere on your PC from where you can then upload it to the autopilot’s SD card using MAVFtp.

It’s also linked from the AP viewpro wiki page if you search for “Download mount-viewpro-driver.lua (from here))”

… maybe we need to clarify these steps a little more to make it easier to install…

Yes, I understand what you’re trying to do and it should work.

Thanks. Ill tackle this tomorrow and post the results

1 Like


Ah, by the way, make sure that “latest” ArduPilot is installed on the autopilot. So from MP’s Install Firmware screen, press Ctrl-Q and the version label below each icon should change to 4.4.0-DEV… then push the icon as per usual.

Txs for testing, you’re only the 3rd person to try it. :slight_smile:

When I upload the .lua file it adds the .lua.txt. I cant get rid of it. I tried saving as all files instead of txt but no luck.

Ok. Update. Its working. I copied and pasted it to notpad then saved it. Now it works. Camera points in correct direction. But …… I no long have rc control. When I switched serial 2 to scripting i lost the mavlink protocol I was using. So i fixed one problem and created another. Any way around this? Also when I move the plane the gimbal is behind in correcting the position. It needs to be corrected a lot faster if possible

So that allows the camera to point to the correct location now but disables almost everything else. No more direct rc control. The lua script allows for very basic operations of the camera. I can change the camera eo to ir and zoom but thats about it. The camera staying on target is also very delayed. Somehow this needs to be more of a hybrid setup allowing the camera’s internal tracking software to help or other internal sensors in the camera. Im not sure if this is a viewpro thing or a mission planner thing. I am working with viewpro on this and we have tried various firmware versions to try and get this function working with their viewlink software as well. We can get the camera pointing to a location and still have rc direct control over ride but the camera does not stay on target. We need something like how the waypoint function works. Allowing the pilot to nudge the camera or switch modes to “manual” or “guided” for camera control.

Hi @Chaoschoppers,

Thanks for the feedback. Re the RC control, I suspect the issue is that the mode isn’t being set to RC_Targeting. We’ve got a wiki page here that describes how to control a gimbal.

Switching between MAVLink Targeting and RC Targeting is awkward in Mission Planner and I’m unsure how it is done with QGC but a new QGC gimbal control screen is already being developed that will make this easier.

Image tracking support is also on the to-do list but before then I hope to add zoom position support. This will allow the user to specify the actual zoom they want, like 10x or 5x instead of just zooming in or out.

Ok. I tried rc targeting but that gives me very little camera control. Where ever I move the gimbal it automatically goes back to where it was. I have my rc option setting set to 213,214 for pitch and yaw. This needs to changed to allow full rc pass through ideally. Then I could choose if I want the point camera here to work or have full rc control. I still may be missing something to.

Hi @Chaoschoppers,

Txs for the feedback. I think maybe the issue is that you’re using angle control instead of rate control. Could you try setting MNT1_RC_RATE = 30?

For reference this is listed in the Control with an RC transmitter on the wiki.