What is the best way to get both linear acceleration and quaternion from BNO080?

Hi!

I’m searching a way to get linear accel and quat from BNO080 without losing “quality” from data.

When I get only linear accel, the data is “clean”. But when I request linear accel and quaternion, the data comes strange…with gaps…

I’m using an Arduino Nano and microSD.

Thanks!

the data comes strange…with gaps…

What does that mean? Post examples.

jremington:

the data comes strange…with gaps…

What does that mean? Post examples.

Thanks for the reply :slight_smile: !

The gaps seem to be due to the acquisition rate.

Even though I leave no delay() in the loop.

But that doesn’t happen when it’s just linear acceleration. I think that when requesting quaternion, the sensor cannot generate both very well.

  • X axis (raw). The “gap” is that in red circle:

  • X axis with a low-pass (blue line):

The red circle shows an abrupt change in the output value of some quantity. Sorry, but I have no idea what those data represent, or why you identify them as “X-axis”.

The sensor updates the quaternion regularly, every measurement cycle.

The “linear acceleration” is calculated from the current quaternion and is the measured acceleration, minus the predicted contribution from the acceleration due to gravity. The “linear acceleration” is a very error-prone and therefore almost useless quantity.

jremington:
The red circle shows an abrupt change in the output value of some quantity. Sorry, but I have no idea what those data represent, or why you identify them as “X-axis”.

The sensor updates the quaternion regularly, every measurement cycle.

The “linear acceleration” is calculated from the current quaternion and is the measured acceleration, minus the predicted contribution from the acceleration due to gravity. The “linear acceleration” is a very error-prone and therefore almost useless quantity.

Sorry. It was an example from a simple elbow flexion and extension movement.

So, can I calculate myself the linear acceleration using quaternion and raw acceleration? Is there a “simple” math (sorry, I’m physical therapist :? )?

I imagine that the calculation done by the sensor is correct, and don’t see how you would gain by doing it yourself, except in understanding.

How that calculation is done depends on how the quaternion is defined, and it might take close reading of the data sheet to discover that. Most people do not find quaternion math to be very intuitive, but there are plenty of tutorials on line that attempt to explain it.

My experience with the BNO sensors has not been very positive. The sensor calibration is poor and subject to abrupt changes, leading to apparent abrupt changes in orientation.

jremington:
I imagine that the calculation done by the sensor is correct, and don’t see how you would gain by doing it yourself, except in understanding.

How that calculation is done depends on how the quaternion is defined, and it might take close reading of the data sheet to discover that. Most people do not find quaternion math to be very intuitive, but there are plenty of tutorials on line that attempt to explain it.

My experience with the BNO sensors has not been very positive. The sensor calibration is poor and subject to abrupt changes, leading to apparent abrupt changes in orientation.

I’m already using quaternion math to rotate accel data (qvq*). I’ll give a try to raw accel and try to calculate linear acceleration.

“My experience with the BNO sensors has not been very positive. The sensor calibration is poor and subject to abrupt changes, leading to apparent abrupt changes in orientation.”

Did you try the BNO080? I had this issue with the BNO055 (because the sensor was always calibrating). With the BNO080 we can stop the calibration.

Thanks!

I’m already using quaternion math to rotate accel data (qvq*)

Great, you are on the right track and should have no problem calculating the “linear acceleration”. But, I really have little idea what this thread is about.

If you will take the time to provide the details of your project, and present concrete questions, people might be able to provide helpful suggestions.

jremington:

I’m already using quaternion math to rotate accel data (qvq*)

Great, you are on the right track and should have no problem calculating the “linear acceleration”. But, I really have little idea what this thread is about.

If you will take the time to provide the details of your project, and present concrete questions, people might be able to provide helpful suggestions.

I’m developing a method to assess human movement. I need quaternion and linear acceleration (there are movements without angular component).

But when I request quat and linear accel, BNO080 seems not to work well. When I request only linear accel, the data is fine!

I will test more…requesting quat, raw accel and trying to generate linear accel myself.

Are you sure there is a ‘gap’. From the first two images, there is a abrupt drop for 0.5 to close to 0.0 at 1500 (x-axis) To my way of thinking, the “gap” you have circled in the third image, just reflects the near vertical slop of the data. ITIWIF

claude_j_greengrass:
Are you sure there is a ‘gap’. From the first two images, there is a abrupt drop for 0.5 to close to 0.0 at 1500 (x-axis) To my way of thinking, the “gap” you have circled in the third image, just reflects the near vertical slop of the data. ITIWIF

Hi, Claude! But the (real) movement didn’t has this abrupt vertical slop.

vitorsotero:
I’m developing a method to assess human movement. I need quaternion and linear acceleration (there are movements without angular component).

Interesting to me as I'm trying to measure tremors in the arm/hand. 7 DOFs and I had decided to switch from an vanilla IMU, and Adafruit LSM6DS33 to an Adafruit 9-DOF BNO085 (BNO080). The problem I am up against is separating the voluntary movement 0-2hz from the tremor 3-20hz. I was hoping to be able the track the movement of say the upper arm relative to the trunk and subtract leaving the tremor (3 axis).

ps. sorry about the ‘slop’. I meant slope (of the curve).

claude_j_greengrass:

vitorsotero:
I’m developing a method to assess human movement. I need quaternion and linear acceleration (there are movements without angular component).

Interesting to me as I'm trying to measure tremors in the arm/hand. 7 DOFs and I had decided to switch from an vanilla IMU, and Adafruit LSM6DS33 to an Adafruit 9-DOF BNO085 (BNO080). The problem I am up against is separating the voluntary movement 0-2hz from the tremor 3-20hz. I was hoping to be able the track the movement of say the upper arm relative to the trunk and subtract leaving the tremor (3 axis).

ps. sorry about the ‘slop’. I meant slope (of the curve).

  1. Is about Parkinson? If yes, is tremor no longer important at rest?

  2. Have you tried filtering? You can use bandpass or even low-pass (Cut Off = 3 Hz). In Matlab, I suggest Butterworth Filter, then filtfilt function.

vitorsotero:

  1. Is about Parkinson? If yes, is tremor no longer important at rest?

  2. Have you tried filtering? You can use bandpass or even low-pass (Cut Off = 3 Hz). In Matlab, I suggest Butterworth Filter, then filtfilt function.

Would I had access to Matlab or similar. Most of my (sensor/math) problems would go away or be solved with a reasonable amount of effort.

With Essential Tremors (ETs) it is well documented that tremors that occur in dynamic movement are more severe in intensity than positional (static) tremors. Positional tremors are much easier to measure which may be the causality of most tremor studies’ measurement of positional tremors. I have yet to find any positional tremors that interfere with Activities of Daily Living (ADLs).

This has lead me in the direction of trying to measure tremors produced by movement. In particular, with Commercial Off The Shelf (COTS) h/w and free/open source s/w.

With regards to Parkinson’s, my limited understanding of the condition is that rest hand tremors, present in about 85% of Parkinson’s, disappear with voluntary movement in most cases. It is not that I am disinterested in Parkinson’s but rather I have a full plate with my work on Essential Tremors.

claude_j_greengrass:

vitorsotero:

  1. Is about Parkinson? If yes, is tremor no longer important at rest?

  2. Have you tried filtering? You can use bandpass or even low-pass (Cut Off = 3 Hz). In Matlab, I suggest Butterworth Filter, then filtfilt function.

Would I had access to Matlab or similar. Most of my (sensor/math) problems would go away or be solved with a reasonable amount of effort.

With Essential Tremors (ETs) it is well documented that tremors that occur in dynamic movement are more severe in intensity than positional (static) tremors. Positional tremors are much easier to measure which may be the causality of most tremor studies’ measurement of positional tremors. I have yet to find any positional tremors that interfere with Activities of Daily Living (ADLs).

This has lead me in the direction of trying to measure tremors produced by movement. In particular, with Commercial Off The Shelf (COTS) h/w and free/open source s/w.

With regards to Parkinson’s, my limited understanding of the condition is that rest hand tremors, present in about 85% of Parkinson’s, disappear with voluntary movement in most cases. It is not that I am disinterested in Parkinson’s but rather I have a full plate with my work on Essential Tremors.

Ohh, I see.

About the “free/open source s/w” you can try Octave (is very very similar to Matlab).

Thanks for the pointer to Octave. I’ll give it a go.