Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Functionality of ArticulationBody.GetDriveForces

Discussion in 'Physics' started by MH_Robotics, Mar 20, 2024.

  1. MH_Robotics

    MH_Robotics

    Joined:
    Jan 11, 2023
    Posts:
    2
    Hello fellow Unity developers,

    I have a question regarding the functionality of "ArticulationBody.GetDriveForces". I have a robot inside Unity 3D, imported via the URDF importer package. Now I want to check the forces and torques applied on the robot, when it collides with something. For now, I have already tested "ArticulationBody.GetDriveForces" and printed out the 7 values for the DoF for the 7 axes. What I dont get here, is that the documentation presents "ArticulationBody.GetDriveForces" as a list with forces in N and torques in Nm. But where are these values stored? How is it possible to see the neccessary 6 values (FxFyFz, MxMyMz) for every of those 7 axes/ArticulationBodies?

    It would be amazing if someone could elaborate the full functionality of both: "ArticulationBody.GetDriveForces" and "ArticulationBody.GetJointForces"

    Best Greets
     
    Last edited: Mar 20, 2024
  2. yant

    yant

    Unity Technologies

    Joined:
    Jul 24, 2013
    Posts:
    597
  3. MH_Robotics

    MH_Robotics

    Joined:
    Jan 11, 2023
    Posts:
    2
    Thank you very much! I just saw, that the documentation of the methods was updated. It makes sence now. One point that I think would be amazing, is to display real time forces and torque (FxFyFz, MxMyMz) for every element of an articulation body and ridgid bodies.