
Home› Troubleshooting
Discussion
Back to discussions page
EdT
Unconfirmed Posts: 4 Apprentice
Accelerometer function |
21 views
|
Answered | |
/ Most recent by matthewd92 |
1 comment |

I'm making this new thread because the older one went blocked and I cannot longer answer on it. This is what I asked:

Hi, guys!
I'm having some problems with my programming, hope some of you can help me.
So, the thing is I'm working on implementing the function get_tool_accelerometer_reading() but it says the return value is the acceleration respect the tool coordinates but I need the values to be respect the base coordinates in order to work with them. Is there anyway to change Tool coordinates into Base coordinates? I've been searching but I do not find anything.
ps: Is my approach right or am I terribly wrong on understing the return value of that function??
I'm having some problems with my programming, hope some of you can help me.
So, the thing is I'm working on implementing the function get_tool_accelerometer_reading() but it says the return value is the acceleration respect the tool coordinates but I need the values to be respect the base coordinates in order to work with them. Is there anyway to change Tool coordinates into Base coordinates? I've been searching but I do not find anything.
ps: Is my approach right or am I terribly wrong on understing the return value of that function??

And answering to @matthewd92 who asked for a description of the use case, here it goes:
Of course, we are designing and application in which the robot is set on a movil platform, this means that the robot inclination is going to change. So what we want to know is if we can use this accelerometer function to get the acceleration and once we have that, obtain the position the robot is in that moment. We are working with coordinates relative to the base system that's why we needed the measure of the accelerometer to be also in that reference system and reading the description of the function we were not sure if the return values were relative to the base system or the tool system.
Hope is more clear now.
Thank you guys!
(also I wanted to create a discussion instead of a question but the category selection didn't seem to be working for me).
Tagged:
To determine the orientation of the platform relative to gravity you will need to turn the accelerometer matrix into a rotation matrix and then use this to determine how the tool is currently oriented to gravity and then use the new gravity frame of reference and the tool frame of reference to determine the offsets to apply to the base. This is honestly way above the type of matrix manipulation that I normally perform. I did find a couple of things online doing a quick search and here are some links to the sites.
https://viriciti.com/blog/automatic-datahub-orientation/
https://stackoverflow.com/questions/8451710/compute-rotation-matrix-using-the-accelerometer
The real question is unless you are moving the robot enough out of the normal plane of gravity to cause faults is there a reason that you want to be computing the orientation of the base of the robot or are you trying to make the base regardless of orientation always be planar with a plane whose normal is in the direction of gravity?