If you look at the way ArduSimple suggests using their daughter board configuration, it appears possible to just have a single connected rover GPS tagged as type 18 and still get yaw, so long as the moving base is providing RTCM3 to the rover. That is not in accordance with the developers’ suggested configuration, and I can’t recommend it as a viable long-term solution.
That detail might just allow me to try my nonstandard constelation with c94 .
I have tried a few combinations and the closest i get is using fixed base C94 and rover that obtains RTK fix. I feed RTCM from C94 rover to F9P second UART and it reaches float only, but with gps heading precision within one degree in u-center. On pixhawk i configure f9p as type 18 and C94 as 1 (auto) and both show up respectively. While RELPOSNED in u center shows correct heading and distance between antenas, i dont get usable heading in pixhawk. I get yaw 65535. The rates are set to 4hz which is kind of max for C94 using two constelations. I have ordered another f9 (to avoid frustration:) but i think this could work as well.
Anton, It sounds like you have done some good experimentation. It is hard to know if you are just missing some small setting or something or if there is a reason this won’t work because of the expectations of Ardurover. If I had time, I would be interested in trying this also, but it would take a good bit of wiring and modifying what I have working. It would be nice to make use of the old C94 modules I have. But, I may use the C94s on some other vehicles that do not need the precision of a mower.
I think you made the right (but expensive) choice to get another F9P.
Thanks Kenny i knew you would understand. After all i try to follow your discoveries with a year or two delay
I have Rover 4.1 and are trying to set up GPS Yaw using two Zed F9p boards. I followed the tutorial on the Ardupilot wiki as well as everyone’s recommendations on here however even with setting the GPS offsets, the direction of the vehicle is about 130 degrees off. I am connecting the two UART2 between the two GPS boards. Any idea on how to fix this?Yaw_params.param (14.7 KB)
What are the physical locations of your antennas with respect to the autopilot?
A picture might be helpful.
GPS 1 Antenna: 14 cm forward, 16 cm above, 2 cm to the left
GPS 2 Antenna: 56 cm behind, 16 cm above, 2 cm to the left
GPS 1 is in the front of the vehicle while GPS 2 is in the back of the vehicle. Also to note the autopilot is rotated 90 degrees to the right.
I’ve also reversed the offsets but it still points in the same direction
I see no smoking guns in the parameter file. Are you actually getting valid GPS yaw? If you look in the MAVLink Inspector, does the value for GPS2_RAW.yaw show a value between 0 and 36000? What is the GPS fix status for GPS2 (RTK fixed)?
The GPS2_RAW.yaw has a value of 65535 and the status for GPS 2 is rtk float
65535 is an error value. The fact that you have an RTK solution on GPS2 is a good thing - it means that your UART2 connections are correct. However, the solution is not good enough to provide yaw. Give it some more time to initialize (disarmed and stationary) and/or make sure there is a clear/unobstructed view of the sky.
Thanks! I will move it to a more clear location and wait for a longer time to see if it gets a better signal.
I recently bought an Ego 42" Zero Turn electric mower and the GPS and ArduPilot hardware to automate my lawn mowing like the rest of the trailblazers on this thread. Thanks to everyone here for their hard work. I had thought about bypassing my levers too, but I’d really like to be able to mow traditionally as well sometimes, for training, odd jobs, or whatever. This is one big advantage of Yuri and Kenny’s servo setup. Perhaps, I could use an override switch to take over the analog signals when under autopilot, but pass them through when not. I guess at minimum, I could use the same connector style and trade which one is plugged in manually. I’m curious what you used for DC/DC stepdown from your mower’s battery system to your flight control computer.
While you certainly can do it, I’d strongly recommend having some mechanical disconnects between the manual controls and your servos. Your servos won’t be happy long term being forced to move unpowered. As far as the dc/dc drop, check out BECs. Standard item in the R/C world with many options. Good luck!
Why not just control the motors directly? Leave the manual controls in place, but find some motor controllers capable of driving the motors and devise a way to selectively switch between the two modes of control.
Servos/actuators are necessary evils on hydraulic controls. They will only add induced error on something with electric motors on the wheels.
Yes, the override switch method is simple and easy to implement…that’s what I did. I used some optical relays and set them up to be connected to the rotary encoders from the steering levers when powered down (or logic level 0), and to be connected to the output of the flight controller with logic level 1. The mower’s computer takes in a voltage (most likely 0-5V) from the rotary encoders and controls the high-power wheel motor drivers based on this analog signal. I was using an autopilot that only output 3.3 volts, so I had to use a microcontroller to read the analog voltage and scale the output to be 0 to 5V. Another note, your mower will likely trigger a fault for values less than 1 volt, 1 volt to ~2.4volts is reverse (with lower voltages going faster in reverse), 2.4-2.6 volts is motors off, and above 2.6 volts is drive forward with higher voltages mapping to faster speeds. You should jack up the mower so the drive wheels aren’t touching the ground and put a voltmeter on the rotary encoder signals while you move the drive levers…then you can have a complete mapping of your drive voltages since your values might be different than mine.
I definitely recommend staying away from the servos…lots of added complexity that you don’t need to deal with since you have an electric mower!
Thanks for your input. While I think manual use will be relatively rare, I appreciate your feedback about manually moving the servos. That along with an unnecessary stage to add more potential lag and hysteresis, I will pursue either bypassing by providing the motor controller the appropriate input, or supply the motors power directly.
Great suggestion Yuri, but modern brushless DC motors have fairly complex controllers, and ones that work on 56 volts with the amount of current provided for moving this heavy mower could be done, but are expensive and heat producing. I’d rather not replicate this unless I have to. I think replacing the input to the existing onboard motor controllers or the input to their control computer as Kevin has done will likely be the easier path.
Thanks for the specific feedback. I will do some reverse engineering of the ego’s control this weekend or next and post my findings.
Using the 0-5V analog input is a perfect, low cost solution and probably easy to switch between autopilot and manual control with no fear of mixing the two.
My point was to avoid a mechanical linkage if possible.