Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marcoojer opened this issue Feb 25, 2022 · 3 comments
Open

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

marcoojer opened this issue Feb 25, 2022 · 3 comments

Comments

@marcoojer
Copy link

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
Copy link

sarah-gibson commented Mar 2, 2022

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
Copy link
Contributor

[AIRO-1796]

@marcoojer
Copy link
Author

marcoojer commented Oct 17, 2022

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
<joint name="joint_base_finger_2" type="prismatic"> <origin rpy="0 0 0" xyz="0 0 0"/> <parent link="base_tool"/> <child link="base_finger_2"/> <axis xyz="1 0 0"/> <limit effort="140" lower="0" upper="0.025" velocity="0.04166666666666667"/> </joint>

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants