find a function to read the distance traveled by wheel

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

find a function to read the distance traveled by wheel

Post by Sophia » 08 Nov 2019, 09:19

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
Site Admin
Posts: 7396
Joined: 14 Dec 2012, 00:25

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

Post by coppelia » 08 Nov 2019, 16:16

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

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

Post by Sophia » 09 Nov 2019, 03:40

thanks a lot!

Post Reply