Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to control angular velocity of ArticulationBody

Discussion in 'Robotics' started by simonezandara, Jun 19, 2022.

  1. simonezandara


    Feb 20, 2021

    I am working on simulating a robotic arm. Very simple 3 DOF. I have some sort of pick and place solution where I am able to direct the robot EE to a target point in world frame.

    I am looking into simulating a gentle motion but somehow using the ArticulationBody I cannot really get to a state which makes sense. The arm is just too fast or not moving at all.

    If I slow down the movement through weaker stiffness then effect is that the arm is slower but it won't get to the target I am setting. ie. I give = 180
    but it stops at 175 (it works properly with higher stiffness).

    I tried various combination of Linear/Angular Damping and Friction as well.

    I have also tried setting
    but nothing seems to be affecting the speed in a decent way.

    I am aware of this page but honestly it's not very intuitive. I worked with robotics controllers before and it's common to be able to control the max velocity.

    This is how I am setting the targets

    Code (CSharp):
    1.                 var jointName = jointNamesFromROS[joint];
    2.                 var jointIndex = (int)jointPositionIndex[jointName];
    3.                 var joint1XDrive = jointArticulationBodies[jointIndex].xDrive;
    4.        = result[joint];
    5.                 jointArticulationBodies[jointIndex].xDrive = joint1XDrive;

    And here are some parameters I work with

  2. ActiveSim


    May 10, 2019
    I made the same experience. Staring with some reasonable values and changing them until the movement makes sense didn't lead to a good working solution.
    Writing your own controller and just AddTorque is one option, using another physics engine is another.