Page 1 of 1

find a function to read the distance traveled by wheel

Posted: 08 Nov 2019, 09:19
by Sophia
i want to find a function that can read the the distance traveled by the wheel,just like the actual encoding disk.The disk can count so i can read it then calculate the distance traveled by wheel.And now i try to find a function in Vrep to get the distance traveled by the wheel.

Re: find a function to read the distance traveled by wheel

Posted: 08 Nov 2019, 16:16
by coppelia
Hello,

for instance, in each simulation step, read the angular position. Subtract the previous angular position. This gives you the rotation that was performed within one simulation step. If you need the total angular movement, simply cumulate all the rotations between individual simulation steps.

Cheers

Re: find a function to read the distance traveled by wheel

Posted: 09 Nov 2019, 03:40
by Sophia
thanks a lot!