Not many people know but we have an piece of open source software for controlling an Antenna Tracker. It's been built by Tridge (Arduplane lead developer) for use in the outback challenge.
Sadly we have no documentation and, as far as I know, nobody except Tridge has used it. Still given Tridge's track record on building great software I suspect it works well and if it doesn't, I'm sure we can fix it. So to not let this piece of code go to waste, I'd like some help from people who are interested to give it a try and help me figure out how it works.
Here's the little that I know:
- It runs on any of our supported board (APM1, APM2, PX4, Pixhawk, Flymaple and perhaps VRBrain)
- For APM1/APM2 users building the code is as easy as opening our hacked ArduinoIDE and selecting File > SketchBook > Tools > AntennaTracker and then building in the normal way. For PX4/Pixhawk, our autobuilder doesn't automatically build a binary but I can provide one if people are interested.
- It can control a Pan and Tilt gimbal like this or this found on servocity.com.
- It may or may not require a GPS
- It must somehow receive vehicle position updates from the ground station which has the telemetry radio that is connected to the vehicle. Maybe through a USB cable. Tridge probably uses the python ground station, MAVProxy, to passthrough the vehicle position data to the AT but perhaps we can get MichaelO to build out a similar feature in Mission Planner.
- I imagine this antenna tracker could also be used to keep a camera focused on the vehicle which might be good for easing the burden on creating videos of our vehicles.
So if you want to give it a try please do and stick any findings, questions or issues below. Alternatively Issues can go into the issues list.
I'll start sticking things into the wiki as they become clear.
Replies
We've just pushed out a new beta of the Antenna Tracker. This is the beta for 0.8.0 (increased the version numbers a bit).
Changes from 0.7.8
1) Added PITCH2SRV_FILT, YAW2SRV_FILT added to smooth input to controllers. Lower values lead to more delay but smoother motion.
2) Estimate vehicle's altitude between telemetry updates when using ALT_SOURCE = GPS
3) Bug fix to vehicle position estimate (was using vehicle's heading instead of 3D velocity vector)
4) Added MAV_UPDATE_RATE parameter to allow more easily setting the rate the vehicle sends position data
5) Stop I-term build up when the tracker hits it's limits (this could lead to delays in the tracker recovering and following the vehicle once it comes back within the range of the tracker)
This should appear in the Mission Planner's Install Firmware screen's beta firmware link in about 2hours from the time of this posting.
You may or may not need to setup your PID values again so it's probably best to take a screen shot or something of your yaw and pitch PIDs, do the upgrade and then see if they need to be set again.
Hopefully people will find the tracker's motion is smoother than before but all feedback is welcome. If the testing goes well we will release this as the official version maybe next week.
Randy,
Thanks for pushing v0.8.0. I'll test it out this weekend.
i tried to get it to work still no luck so i posted my logs for someone to look at
tracker.rar
I'd like to hear back from people what gains are working for them. I get the impression that the default gains are just too high. A tracker that moves too slowly is far better than one that oscillates so maybe halving the default gains would be good.
One other thing that bothers me a bit with the current controllers is that we don't scale the output of the controllers depending upon the angular range of the tracker and/or the pwm range. I think this makes tuning the tracker more difficult than it should be.
Randy, after implementing the filter it took a while to figure out how this worked but I was able to make everything work with the following PIDs and filter. My PIDs stayed the same and I had to work with the _FILT with .1 increments to find what worked good.
PITCH2SRV_D,0.001
PITCH2SRV_FILT,1.9
PITCH2SRV_I,0.5
PITCH2SRV_IMAX,4000
PITCH2SRV_P,1.5
YAW2SRV_D,0.001
YAW2SRV_FILT,1.9
YAW2SRV_I,0.5
YAW2SRV_IMAX,4000
YAW2SRV_P,1.5
Tim,
Thanks! I'm actually very surprised how high you were able to set the P value. I'm a bit interested to see how well it performs so if you have a log, I'd kinda like to see it. feel free to email it directly to rmackay9 @ yahoo.com if you don't want to post it here.
I was hoping that people wouldn't need to modify the _FILT values but perhaps the defaults for these params are set too low. Can I ask how did the movement change when you increased it? What that filt does by the way is smooth out the input to the PIDs... so it basically averages the angle different between the tracker and the vehicle over the previous couple of seconds. A higher value makes it average less (i.e. less smooth but more responsive)... lower value is smoother but laggy-er.
Randy, when I first loaded the change with the filters after a while i was starting to think that I wouldn't be able to find a filter value that would work. the .1 default actually killed both pitch and yaw and I had to get a dramatically larger value to for yaw and pitch to start working. It started to respond normally around .9 or 1 and then found my way up to 1.9 to get a smooth accurate response. 0.1 with Yaw would wobble back and forth from 2 short points and then swing all the way around eventually. 0.1 with pitch had huge cycles that would go past the limits and lock up. I do think it did this because the delay was just too much. I will email the .bin log to you from my last test doing a test track of my fixed wing on the ground. If you look at the Auto Mode and DesPitch, Pitch, and DesYaw, Yaw they look pretty consistent as far as I can tell. I'm not sure how I was able to get P so high but I do remember in the beginning this was a challenge to get this tuned but I was able to tune up to a value then it would start to oscillate and the I was able to back it off to this value. I did this for I and then took the same approach we take for arduplane and halved it. I just gave a small amount of D which also seemed to help a bit. Not sure it this helps or makes it more confusing.
Randy,
My AT worked perfectly yesterday with the default filter PIDs. The movement was much smoother than previous versions. We tested both Copter v3.3.3 and APM plane. I'll post a video soon...
I've made v0.8 the official version now. Greg, I hope you don't mind, I posted your video in the ArduPilot facebook group.
https://www.facebook.com/groups/ArduPilot.org/
Great news, thanks very much for testing!