Getting the size of the wheels

Typically: "How do I... ", "How can I... " questions
Post Reply
rico
Posts: 6
Joined: 07 Jun 2013, 19:50

Getting the size of the wheels

Post by rico » 03 Sep 2013, 01:21

Hello,

How can I get the size of the wheels of a robot in the library?

Thank you very much in advance.

Rico

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

Re: Getting the size of the wheels

Post by Eric » 03 Sep 2013, 01:23

Hi!

To retrieve the diameter of one wheel of the Dr20 robot for example, use something like:

Code: Select all

wheelHandle=simGetObjectHandle('dr20_rightWheel_')
res,zMin=simGetObjectFloatParameter(wheelHandle,17)
res,zMax=simGetObjectFloatParameter(wheelHandle,20)
diameter=zMax-zMin

Post Reply