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.
Here is a video showing the issues I am having.
This seam to be the normal to me.
AOG doesn’t read directly the heading from IMU. It fuse it somehow and just use the IMU to stabilize the heading calculated from the GPS.
I don’t know the mechanics but that is what I understand from @BrianTee_Admin 's videos.
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
Modified AgOpen for pole test
I will give it a try tomorrow. Thanks for the info.
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.
Yep, it is running at 1hz. I will put the 10hz rover config on it today.
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
What IMU have you got?
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)
I am using the Sparkfun 9dof sensor stick. It uses the LSM9DS1 sensor. These are in stock at Digikey, Mouser and Sparkfun.
I am sending both yaw rate and heading to AOG. Yaw rate is coming from the gyro. Heading is coming from the magnetometer.
I should just turn off sending Heading? or I should have it be a low value in the IMU Fusion?
Yaw rate is not used by AgOpen so don’t need that.
Heading is needed just needs to be as smooth and as stable as you can get it. But it can’t be delayed it must also be as fast as possible.
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.
Have you seen this, maybe some hints for the lsm9ds1 there.
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.