Ive been working with a BlueROV2 drone for some time now and have been experimenting with short distance movements using the IMU readings to estimate the drones position. Most of my testing has been done using the BlueROV2 simulation which has data in all fields of SCALED_IMU2 messages. When i do field tests for the drone using SCALED_IMU2 i am currently receiving 0s for all the accelerations (x, y, z). Looking into the documention for the BlueROV2 R4 there is no acceleration measurements on SCALED_IMU2 as it only has a magnetometer.
I am wondering if there is documentation about using the RAW_IMU messages and converting them to m/s^2 measurements. Speciffically do i need apply an offset to the raw readings and conversion to proper units? The IMU reads in units of g so i can apply ~9.81m/s^2 to convert them.
Hi @Amhussey -
Welcome to the forums!
The Navigator has more than just a Magnetometer, the sensor data you’re looking for is under AHRS2 - see this post.
I’d be surprised if you’re able to infer position effectively at all with this approach - please share your results!
Thanks Tony!
I am using AHRS2 to read the orientation of the drone but for translating need a source of data which would be the IMU - most likely it wont work past anything really close to the drone. SCALED_IMU2 wont work so I turned to RAW_IMU which im trying to convert to useful info. Testing in the SITL the RAW data is rotated by roll 90 degrees which is expected as the module would be rotated inside the BlueROV2.
For the RAW_IMU data that is read from the current sensor what needs to be done to get measurements in m/s^2? Part of my testing to see how fast the error in position grows using only IMU measurements and finding ways to minimize this.
I haven’t looked at this in a while, and we don’t currently have decent documentation describing these values. Hopefully this comment (from a while ago) is helpful:
Thanks that did help. Ran some tests in SITL and found that the RAW_IMU readings are also in mG. measured the z acc to be ~ -10000 as expected. I’ll have to run the program on my Rov2 to be sure what units are being measured on the drone itself and the conversions are based on the config of the IMU. I cant find any documentation on if the default has been changed would it still be operation in the +/-2g scale range?
This is the IMU sensor in the Flight Navigator: ICM-20602
I’m not sure where you got that range from. I would presume if the sensor experiences accelerations outside that range then it would reflect them if it is able to.
Spent a long time working on the program. For anyone who’s curious:
The IMU is reading accelerations in mG.
Wrote a simple program to read acceleration and write it to a csv file over 10 minutes. Applied a rotation to the navigation frame to account for the projection of gravity onto the horizontal plane.
Tested the program applying constant roll and pitch to the drone by propping it up with a box this resulted in the acceleration having a slight offset from the roll causing any IMU readings to have greater error accumulation.
Accounted for the offset in the acceleration in y and now have data that could be used for short-term IMU navigation.
Were starting our live testing of the control system and will upload once we get some data on how long navigation is viable for. This could be used for a dual use GPS, IMU navigation for passing surface obstacles