Since the the BNO and the CMPS are both unobtanium right now. I am testing a new IMU. I am working with the Panda board and code. I have correct pitch and roll and I did have correct yaw and yaw rate. Yaw is not working right now but that is not the issue.
When I am testing the roll correction using a pole with the antenna 103" off the ground and I have RTK fix with the pole base located on my A-B line. When the pole is vertical it shows that I am on the line. When I tilt the pole the deviation to the line is approximately how far the antenna has moved. The angular roll as displayed in AOG is approximately correct (i have not verified with a separate inclinometer) . Looking in the roll easting graph it shows that it is correcting for roll but it is not enough.
What setting do I need to change to make this so that when the pole is tilted the location is still the same. I have the antenna height set to the 103" tall pole. I have the units set to feet inches. Are the locations of the antenna in the configuration dialogs in inches with this setting or are they still mm/CM?
Some more testing. I have heading/yaw working now. However the tractor in AOG does not change heading based on the IMU even when stopped. Is it supposed to? I think this is leading to my error that I am seeing in tilt. Since the tractor CL is not parallel to the AB line I am getting error in the tilt/roll correction.
Also I am not getting speed from the GPS. Is this a setting in u-center that I need to change? I am using the rover config from the ardusimple webpage.
I found in the NMEA.ino that the speed is calculated in AOG. So I will forgo looking to get it from the GPS.
Part of my issue was I needed another decimal place transmitted for the heading. This is now resolved in my IMU.ino file.
Still in AOG when I turn the IMU the heading changes briefly then it floats back to the same heading. Approximately 220 degrees. The IMU heading is correct as read in the panda string with an extra integer digit for a decimal digit.
I have tried to change the IMU GPS fusion from 99 to 40 and it did not seem to make any difference. The heading floats back to 220 ish degrees after I stop moving and rotating the IMU.
Right now I am walking with a test stick so I can’t get a large amount of speed. I don’t know if this is causing me issues or not.
Try using this modfied version for pole testing only.
Select VTG as the GPS type (It is modified to force GPS heading north)
(Make sure “Dual as IMU” is NOT selected)
Make sure your roll is working the correct way left / right (facing north)
Hold pole with roll at zero (and RTK fix if possable) and open a new field.
Make a new A/B line at 0deg, the tractor should face north at all times and if you wobble antenna east/west the tractor should not move.
If you want to test how stable your IMU heading is, select “Dual as IMU” (This is modified to turn on the IMU fusion)
Now if you wobble your pole east/west but still facing north the tractor should not twist, but if you twist your pole the tractor should twist with your pole and drift back to north
Ok, also just make sure your GPS is running at 10hz. Not sure if it was just your video but it looked like the screen was jumping and that happens when the GPS is slow.
Ran a new test at lunch break. See the video for the results. I think I need to do some trig in the heading calculation to correct magy by the roll angle. Let me know what you think.
CommonRail, thanks for the help the pole test version worked great. Also increasing to 10Hz made a big difference.
Nice, you might need to slow that IMU heading jumping around.
If you select “Dual as IMU” (it is modified to turn on heading fusion) see if the tractor sits pointing north nicely.
When you twist the pole it should twist the tractor the same as the pole, but drift back to north as it fuses with the GPS heading (Locked at 0deg).
If you were driving the GPS heading will be where your driving so the IMU should have pushed the tractor pretty close as the maths for GPS heading is delayed over the last few GPS fixs
If you can turn off the magnetometer that might help. The IMU heading doesn’t need to be related to north, all it needs to do is feel the changes in heading. AgOpen will correct the error so it’s correct but it must feel any change in heading without too much drift (a wee bit of drift is fine)
Should I average it over the last second. That would smooth out the deviation and not be extremely slow. since we are doing 10hz maybe a 0.5second average.
Maybe I could filter the time to average over based on yaw rate. If the yaw rate is low then average heading over a longer time. If it is high then shorten the average time.
So I put the system on the Lawnmower to just check stuff out. The IMU is super sensitive to vibrations. Might need to mount it on a foam mount with flexible wires or something. I can try to add some averaging in it to smooth it out also. Very jumpy.
But I am still having major problems with AOG. Heading is not being calculated from the GPS at all. It remains fixed on a single direction no matter what. When I was diving around it was stuck at about 60 degrees. Also no speed is being calculated. I was going about 5 mph so it was definitely fast enough for AOG to determine I was moving. I did a boundary around a field. It worked ok with the shaking IMU and the tractor pointing the same way the entire time it did not work well.
This is not IMU stuff. The heading is coming into AOG from the IMU. It was relatively stable.
What is causing this issue of no speed and no heading change in AOG?
You need to make sure you had “Fix” selected as GPS option (not Dual or VTG).
As for no speed what version AgOpen are you running? If it’s a older version make sure you have the GPS sending VTG so AgOpen can get the speed from the sentence.
I went back and tried it with “Fix” as it was on “VTG”. This fixed the heading issue. The speed is still zero at all times.
I am going to have to do some filtering and averaging on the roll to keep it from being obscene due to vibration. With my current vibration it is unusable.
I will be out of pocket for a few days. I will work on this more over the weekend and next week.
Right now I am attempting to use the Adafruit_AHRS_NXPFusion module. This should result in the best results out of the different filter modules. I am trying it now. I will report back some time tomorrow. If I can’t get this to work I will try out your recommendation. Thanks for the info.
I added in the Adafruit IMU Fusion Arduino module to the .ino for the teensy 4.1 panda. This improved the results of the pitch roll and heading on the bench.
It also improved the results on the pole test as can be seen in the video below. The roll appears to be a little laggy. I can turn up the calculation rate as I have it calculating at 10Hz right now. I will try to turn it up to 100Hz to see what the results look like.
I put the setup on the lawnmower following the pole test. The vibration is too much for the IMU. It causes major jumps in the IMU heading and pitch. I will try with some vibration isolation foam to try and mitigate the issue. Also while testing on the lawnmower the heading was not working at all from the GPS. It would always stay in the same general direction again. I was using FIX as the GPS option. Also still no speed indicated. This was with a fresh install of AOG 5.6.14 on another tablet.