Page 1 of 1

Accelerometer question

Posted: Tue Sep 08, 2020 8:04 am
by istvanbor
Hello!

I am trying to measure velocity as little as 0.23 m/s with the IMU, but it seems to me that the X8-9 is not very consistent in measuring accelerations this little. Is it worth trying to make it right, or it's useless to expect valid data from it?

Currently I am getting the accelerometer feedback and I multiply it with the elapsed time, but it gives me values between -0.5 to +0.5. I can provide exact data if needed but it seems that the error is bigger than my max velocity

Many thanks

Istvan

Re: Accelerometer question

Posted: Tue Sep 08, 2020 9:57 am
by dave_rollinson
If you don't get sensible estimates even for 1 timestep, the problem is possibly that you're leaving in the gravitational component of acceleration in the raw accelerometer reading. But even if you account for that I would expect the results to be pretty poor for anything more than a few timesteps.

There are a number of articles explaining how to do this in various levels of detail. But the overall idea is to get the orientation of the actuator (which is returned in our APIs as a quaternion in feedback), convert to a rotation matrix, then subtract out the 1g gravitational acceleration along the Z-axis in the world frame. What's left is (in theory) your linear acceleration, assuming the orientation is estimated perfectly (which in practice it isn't).

The best way of testing to see if things work well enough for your case would be to use the HEBI Mobile IO app for iOS or Android. Both iOS/Android process the IMU on board to attempt to subtract out gravitational acceleration. The MobileIO app can return either the raw linear+gravitional acceleration or the estimated linear acceleration depending on the app settings. If you set it to just linear accleration you should be able to integrate the feedback directly to see how accurate it is for your application.

Odds are that Apple/Google do a better job of estimating orientation from the IMUs than we do, so that velocity estimate is probably about as good as it gets for MEMS IMUs.

Hope that helps,
-Dave

Re: Accelerometer question

Posted: Wed Sep 09, 2020 9:47 am
by istvanbor
Thank you for the reply!

A bit offtopic question, can I get the orientation feedback data with the Python API? I didn't see it mentioned in the docs, as I saw it in the C++ docs

Istvan

Re: Accelerometer question

Posted: Wed Sep 09, 2020 1:46 pm
by daniel_wright
Hi Istvan,

The Python API has orientation feedback available. Relevant documentation is here: https://docs.hebi.us/docs/python/2.2.1/ ... rientation

Sorry that this wasn't immediately clear. Each Python API version has its API reference documentation under the following link on our website: https://docs.hebi.us/docs/python/

I hope this helps.

- Daniel

Re: Accelerometer question

Posted: Thu Sep 10, 2020 3:15 am
by istvanbor
Very nice, thank you very much!

Istvan

Re: Accelerometer question

Posted: Mon Dec 20, 2021 3:47 am
by AudreyI
thank you very much!


_________________
puma sneakers for men