Servers by jDrones

MP "Antenna Tracker" feature moving a camera gimbal to automatically follow a drone on air with zoom

Hi.

I’m trying to use MP’s “Antena Tracker” feature to move a gimbal holding a video camera to have it pointing constantly to a copter on the air, and be able to zoom on it.

I assume that MP, knowing camera location (“Tracker Home”) and receiving copter coordinates can calculate the pan and tilt angles and the pan and tilt servo pulse widths. So I modified a Mobius camera gimbal to admit two MG90S servos and hold a video camera with appropiate tilt angles. The span for these servos is 90º moreless, and the controller to use is a USB Pololu Maestro.

Not being able to make it work in the field, I prepared this SITL mission:


So pan total angle results 90º and the copter climbs 60 m from the south to the north point (camera angles moreless 0º and 77º).

With this servos setup
MP_tracker_BigWbay
the servos traveled correctly with this mission:

QGC WPL 110
0	1	0	16	0	0	0	0	33.740131	-118.376357	8.863070	1
1	0	3	22	0	0	0	0	33.74016190	-118.37637030	1	1
2	0	3	201	0	0	0	0	33.74011190	-118.37677030	1	1
3	0	3	93	0.001	0	0	0	0	0	0	1
4	0	3	16	0	0	0	0	33.74021590	-118.37649250	61.50	1
5	0	3	16	0	0	0	0	33.74000790	-118.37649250	1.50	1
6	0	3	177	3	-1	0	0	0	0	0	1
7	0	10	21	0	0	0	0	33.74011190	-118.37637030	0	1

as can be seen in this video (which includes the Maestro pulse widths).

The mission points shown are at sea level because I could only make it work it at sea level. When defining the “Tracker Home” no height information is given, and when I translate the mission on points above sea level the tilt servo moves very little or has only extreme values (2000).

(Obviously, the real process was the inverse: not getting correct tilt servo movement I finally saw that if the mission was at sea level it moved beautifully).

The problem is with the tilt servo; pan servo works. Tried with latest MP 1.3.7803.12511.

How can I get a correct tilt servo span above sea level?
Or, what am I missing?

so by default, the tracker alt = home alt

       MainV2.comPort.MAV.cs.TrackerLocation = new PointLatLngAlt(MouseDownEnd)
        {
            Alt = MainV2.comPort.MAV.cs.HomeAlt
        };

Thanks. I suppose then that the tracker altitude will be the home position altitude, or for a mission the mission defined home altitude point (second line in .waypoints file).

This video simulates guided mode (SITL) both at sea level and 48m above (I had simulated 178m above, so my error can be there):

Curiously, as appears in the video index, when changing guided target altitude (10m -> 1m -> 60/62m -> 10m) the tilt servo starts to move up or down before horizontal vehicle movement starts, since vehicle changes altitude then (before Fly to). Very realistic!!!

try graphing AZtoMAV
and ELtoMAV

Servo angles: very nice.

Here it is:


4K for better fit:
Chascar_4K_2160

As curiosity, when do you start and stop displaying AZtoMAV and ELtoMAV? (t=28s and t=14m14s)

Now the case for rover on a racing circuit with drivers’ podium, where the tracker will be located (around 4m above ground).
MP_rover_TrackerHome

On the far straight the tilt servo would be a little below horizontal, but when the car passes below the podium it would point to ground approaching vertical. However, I don’t see how to define tracker height over ground, needed in this case.

Please, see this video:


The tilt servo hardly moves, as it ‘thinks’ that the tracker is at ground level.

This is for SITL. In the real thing the same would happen. A GPS attached to the laptop would let the tracker know its height. If it is RTK, would MP send the corrections to it?

(Remote SITL possibility: leave a GPS at the drivers podium (up), and connect it (VCC/GND/TX/RX) with a several kilometers cable to the laptop with MP running, or use a GPS simulator).

If you are using the pololu driver implementation and your servo can make negative tilt travel, then you can easily adjust the trim to a known place.

1 Like

Not completely. Observe the tilt servo on the rover video: it varies very little, and trimming would simply change the center of the tilt interval. This corresponds to the tracker ‘thinking’ it is at ground level (red). If the tracker is up at the drivers’ podium the tilt servo span is higher (blue).
Tilt_span_ground-podium

Yes you are right, regarding the vantage point calculation, the trim would be only a rough work arround. Though i dont think that the podium is that much higher to exagerate like the your example.

Furthermore, i can think of 2 ways based on Michaels suggestion:
-Take home position at the podium or
-Take home in the track alt and then play with the QNH tool (ctrl-f) to play with the alt difference and see if the tracker behaves

Doing some trigonometry for the real circuit, with tracker up at the podium, the pitch angles down from the horizontal would be moreless:

  • 2.25º at the beginning of the far straight;
  • 63.47º when the car passes beside the podium, close to tracker.

So moreless 61º change. If 90º corresponds moreless to 1000µs, 61º would mean 677µs. Note on the car video above that the tilt servo hardly moves on the Pololu window.

Certainly, playing with the tilt setup parameters the camera could be set pointing to intermediate points and not change much, but what about zoom?

I had no idea that that existed. Changing it I get Param write denied (BARO1_GND_PRESS), so it seems related to barometer chip internals, and not to changing tracker altitude, or I don’t understand the trick.

BTW, for tracker home positioning having attached a GPS to the laptop running PM on SITL, Tracker Home -> Obtain From Module, I get
No_GPS
without chance to indicate port or baudrate so:

  • don’t know if it will work on the field;
  • no chance to try a GPS simulator.

Wouldn’ it be easier to ask for tracker altitude MainV2.comPort.MAV.cs.TrackerLocation.Alt when positioning it, 0 meaning at same level?

The real thing:

At t=12 the angles appear abruptly, servos are abruptly changed and the camera detects fast panning, which corresponds with AZtoMAV/ELtoMAV starting abruptly as seen on the .tlog log:

Pending:
-Bigger servos and gimbal
-Workaround for rover tracker on podium.
-Going brushless.

BTW, perhaps it would be usefull to provide distance as a third servo signal, to be electronically externally translated for some camera electronic zoom control, if that camera exists.

Instead of that, set it:

import System
import clr
import time
clr.AddReference("MissionPlanner")
import MissionPlanner
st =  MissionPlanner.MainV2.comPort.MAV.cs.TrackerLocation.Alt
print st
System.Console.WriteLine(st)
time.sleep(1)
while True:
	st = System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fff")
	print st
	System.Console.WriteLine(st)
	MissionPlanner.MainV2.comPort.MAV.cs.TrackerLocation.Alt = 5
	st =  MissionPlanner.MainV2.comPort.MAV.cs.TrackerLocation.Alt
	print st
	System.Console.WriteLine(st)
	time.sleep(1)

(adapted from examples).

5 above is a normal figure. Not knowing when happens Tracker=Home, it is set constantly.

For test, two simulations were tried, for 5m and for 10m. For 10m the tilt variations are higher, as should happen (maximum around 18.8m). Date/time and tracker altitude appear PIP at lower left.

Servers by jDrones