How to get Linear Acceleration

Typically: "How do I... ", "How can I... " questions
psj8252
Posts: 5
Joined: 11 Jul 2018, 00:20

How to get Linear Acceleration

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.

coppelia
Posts: 7400
Joined: 14 Dec 2012, 00:25

Re: How to get Linear Acceleration

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

psj8252
Posts: 5
Joined: 11 Jul 2018, 00:20

Re: How to get Linear Acceleration

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?

Meoow
Posts: 2
Joined: 16 Jul 2018, 02:31

Re: How to get Linear Acceleration

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.