Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
232 stars 71 forks source link

How Can I read in Unity the maximun velocity of each joint? #189

Open marcoojer opened 2 years ago

marcoojer commented 2 years ago

Hi I want to read the maximum velocity of a joint specified in my urdf, in the unity loaded gameobject.

I'm trying with the value of articualtionBody.MaxAngularJoint and is giving me a value of 7 which is the default one, instead of the ones specified in the urdf.

Anyone one knows how to do it?

Thanks in advance!!

sarah-gibson commented 2 years ago

Hi @marcoojer!

To get the maximum velocity of your joints from the loaded GameObject, you should be able to use these APIs: ArticulationBody.maxAngularVelocity ArticulationBody.maxLinearVelocity These correspond to the APIs used by urdf-importer to set the max velocities.

Let us know if it works for you!

vidurvij-Unity commented 2 years ago

[AIRO-1796]

marcoojer commented 2 years ago

Thank you for the answer and sorry for delay in the response. However, I'm loading a urdf with some primatic joint which is like that `

`

but when I print the ArticulationBody.maxLinearVelocity of the joints it output a value of 100, which I suppose is the default value. Didn't it should be 0.04166?