Mostly good news here, and thank you to everyone that has come before me, including the developers and forum contributors Yuri and ktrussel in particular.
Last summer - RTK YAW-heading and Position - Fix Status - I got GPS YAW to cooperate, but had some other issues (Rover 1 had a gearbox failure (that I “fixed” but has returned) while Rover 2 experienced battery failure I couldn’t address in time)
I replaced the batteries on R2, and upgraded to Rover 4.2 last month.
One important take away while fighting to get YAW to work again - I think the key step I kept dodging was to reboot the flight controller once in a while. I reconfigured all sorts of things, including adding distance between the GPS antennas, and was continually frustrated trying to get YAW to cooperate again - and then I rebooted, and ah-hah.
While I have an ArduSimple board with a Lite piggybacked on top, I’ve begun following Yuri’s advice to just let it auto configure, which includes the RTCM packets going through the FC.
I measured and set the GPS offsets to the best of my ability. It’s configured to use only the MB GPS - I haven’t yet, as suggested in last year’s thread, configured a script to stop when the MB drops out of Fixed. Generally, it’s staying in RTK Fixed unless the fixed base goes off-line.
This works just fine, even with the Lite board piggy backed on top - the UART1>UART2 connection is just ignored (I believe the alternate auto configuration is to use two big ArduSimple boards and UART2 on both for direct communication)
The “big board” is my MB, the Lite is the Rover.
I can send RTCM corrections via MavLink from MissionPlanner and things work just fine - though with a 57,600kbps link, things are a little slower than I’d like due to congestion, and sometimes Missions fail to transfer (again, I assume congestion).
After proving that worked, I stopped sending the RTCM via MavLink, and instead I have the USB port of the ArduSimple board connected to my companion computer, a Raspberry Pi 3.
The Pi has two wifi connections (internal, and an external) and I’ve blanketed the property with wifi relays here and there. The dual adapters are intended to provide overlap in coverage (I do need to figure out how to have two wpa_supplicant files, one per adapter with non-overlapping AP lists)
From the RTKLIB package, I use “str2str” to acquire the RTCM stream from my fixed base and pipe it to the USB (/dev/ttyACM0).
This unburdens the 57.6k link.
The Pi also runs Mavproxy (telem to USB-Serial) so I can use a UDPCL connection.
(As I look into adding mavlink-router into the mix to accommodate changing IPs as the Rover wanders the property, I’m wondering if I should use Mavlink-Router on the Rover rather than MavProxy. There seems to be some overlap, with Mavproxy/mavgateway being a less featured implementation)
(The Pi has a Pi Camera with a long ribbon cable - the same RFI that forced me to abandon the compass for GPS YAW causes problems with the Camera feed)
I tuned the throttle, steering, and so forth per the documentation, and I’m thus far happy with the results.
Even though I built a skid-steer zero-turn rover, my turning radius is set to 0.9 and Pivot turns are disabled - while the rover can spin 360s just fine, the trailer it tows doesn’t appreciate that.
With RTK, you can see I locked down my WP radius and overshoot to what I think are about the lowest values it’ll take.
I have a Maxbotix I2C Sonar, and a SmartFly TF-Luna LIDAR via I2C.
I had both setup as range finders and got figures back.
I couldn’t get object avoidance to work until I learned this tid-bit.
You have to set PRX_TYPE=4 to use your range finders as proximity sensors.
Unfortunately, after enabling object avoidance and setting PRX_TYPE, the Rover started wandering about like a drunk sailor and refused to run the mission that worked moments ago.
MissionPlanner, under the Control-F menu, has Proximity UI (second column, near the bottom) that shows you what obstacles are being detected, and mine was reporting an obstacle right in front (0.3m) almost all of the time.
I wasn’t able to finish debugging the combination of range finders to find one that was going to work.
Instead, I enabled Fences. I believe KTRUSSEL talks about setting circular fence exclusion zones around trees - bravo!
Since the Rover is now the most precise GPS available when it has RTK FIX against my fixed base
(Fixed Base is a Raspberry Pi and another ArduSimple board installed on the chimney. On multiple occasions I logged several days of raw data, then fed it to the Canadian CSRS-PPP - Precise Point Positioning - to resolve the precise location of my GPS antenna, which was then set using UCenter) I manually piloted the rover around the property and set waypoints at every known obstacle (tree, fence)
I then downloaded the plan, and proceeded to add fences and copy/paste the waypoint locations into the circular or polygon fences.
(Is there a better way to do this? Editing the saved files in notepad isn’t much faster, though perhaps a spreadsheet would make this easier)
With the fences in place, I could run a mission and it would go around the obstacle, even without the rangefinder/proximity sensors - it’s just not able to adapt to changing environments.
Still, substantial progress.
I did learn, I believe, that the OA_MARGIN_MAX when used with a Fence is from the Fence boundary.
I have mine set at 0.3 or roughly 1’.
That means for a small diameter tree, I can set a circle fence with a 0-radius, or for a larger tree I use a larger radius - but there’s already a 0.3m margin built in.
I thought I had learned whether the FENCE_MARGIN matters in this case, but now I don’t remember.
This does present a slight problem if, like I did, you drive the rover around to mark your fence positions - I can’t send the rover around the “find my fences” mission because it would now be within 0.3m of the fence.
Has someone already found the easy solution to shifting my “driven route to become my fence” outward by a certain distance?
For now, I live with the extra margin, but ultimately I’d like the polygon fences to be ~0.3m from where they are. For the trees or clothesline posts, not a big deal, but for following a physical fence line or the creek, I eventually want to get closer.
So, the Mission…
I started with the SimpleGrid. I then manually added a lot more paths, as you can see.
Overall, it works. That is about 150 way points, and covers almost 1 mile to cut that section.
I believe I started with a 3m width on the routes, and maybe I needed to go wider - again, I’m artificially inflating my turning radius to allow for a trailer, but you can see it likes to turn and then correct back in before proceeding.
ktrussel had some external programs to build some of these mowing routes that I need to revisit.
What I’d like to do is create a SimpleGrid in MP with an appropriate spacing (if I used 3m before, maybe it’s 4m or even 5 - whatever allows it to make a smooth wide U-shaped turn every time) and then create it again, but this time offset the starting point by X meters (fractional).
What I really want/need is to run overlapping circles or squares - instead of an up/over/down/over/up/over/down/over, I want to run a up/over/down/back box, then when it goes “up” the second time, it starts offset by 0.3m or so. I could offset the vertical edges but overlap the horizontal, or offset both, but ultimately making “large” circular routes that overlap each other in a consistent manner.
That’s what I attempted to hand draw.
For completeness, I might run a “vertical” overlap and then run a similar route but with a “horizontal” overlap to cover any strays.
Still, aside from the tedious attempts to manually make the plan, I’m able to consistently run my mission and get overlap even with only a 14" wide path.
Recapping the build list.
2x55AH 12V deep cycle batteries
Master on/off, safety kill switch
RoboClaw 2x30 motor controller (Mistake! Works fine driving around, but when towing it will overheat and goes into failsafe - I need to move up to the 2x45 or 2x60)
ArduSimple and Lite boards
Raspberry Pi 3, Pi Camera, RT5370 USB Wifi, USB to Serial (to TELEM)
24V to 5V regulated supply for RPi
Missing in the video is the 2x20w solar panel roof, and a PWM controller - calculations say it would take a week to recharge this way.
Simple pin hitch. New 14" wide reel mower converted with a tongue - handle retained for now for ballast.