## find a function to read the distance traveled by wheel

Typically: "How do I... ", "How can I... " questions
Sophia
Posts: 12
Joined: 31 Oct 2019, 06:33

### find a function to read the distance traveled by wheel

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.

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

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

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

Sophia
Posts: 12
Joined: 31 Oct 2019, 06:33

thanks a lot!