Accelerometer question

X-Series and R-Series Actuators
Post Reply
istvanbor
Posts: 12
Joined: Thu Jul 09, 2020 4:11 am

Accelerometer question

Post by istvanbor » Tue Sep 08, 2020 8:04 am

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
User avatar
dave_rollinson
HEBI Official
Posts: 41
Joined: Tue Dec 31, 2019 11:58 am

Re: Accelerometer question

Post by dave_rollinson » Tue Sep 08, 2020 9:57 am

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
istvanbor
Posts: 12
Joined: Thu Jul 09, 2020 4:11 am

Re: Accelerometer question

Post by istvanbor » Wed Sep 09, 2020 9:47 am

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
User avatar
daniel_wright
HEBI Official
Posts: 5
Joined: Mon Mar 30, 2020 10:27 am
Location: Pittsburgh

Re: Accelerometer question

Post by daniel_wright » Wed Sep 09, 2020 1:46 pm

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
istvanbor
Posts: 12
Joined: Thu Jul 09, 2020 4:11 am

Re: Accelerometer question

Post by istvanbor » Thu Sep 10, 2020 3:15 am

Very nice, thank you very much!

Istvan
AudreyI
Posts: 5
Joined: Mon Dec 20, 2021 2:49 am

Re: Accelerometer question

Post by AudreyI » Mon Dec 20, 2021 3:47 am

thank you very much!


_________________
puma sneakers for men
Post Reply