Page 1 of 1

How to get Linear Acceleration

Posted: 31 Jul 2018, 03:18
by psj8252
I am trying to get linear velocity in v-rep, by sensor not program or API.

So, I used Acceleometer and gyro sensor.

I should calculate linear acceleration first but I don't know how to get linear acceleration from sensor data.

Re: How to get Linear Acceleration

Posted: 31 Jul 2018, 07:02
by coppelia
Hello,

in the child script attached to the accelerometer, simply use the variable accel in line 20. e.g.:

Code: Select all

print(accel)
Cheers

Re: How to get Linear Acceleration

Posted: 31 Jul 2018, 21:17
by psj8252
Thank you for answer.

but I successed to get accelerometer output by python API.

What I want is calculate linear velocity using v = v0 + at.
However, I found that accelerameter output is different to linear acceleration for above formula.

For example, z-value is -9.8 when it is static.
if I use the fomula, z-velocity will be decreased infinitly.

Do you have any idea?

Re: How to get Linear Acceleration

Posted: 26 Sep 2018, 15:37
by Meoow
Hello,
I am trying to get accelerometer and gyrosensor data using python API and I don't understand what was said in the child child script. Could you please tell me how to get the data correctly and what should I do in the vrep and in the python client?
Thank you, looking forward to hearing from you.