Torque Stabilization

Discussion in 'Simulation' started by Anton Sobinov, Aug 15, 2016.

  1. I am having problems with stabilization of the HAPTIX hand by supplying back the recorded torques.

    In the experiment, I am recording 3 torques (r1, r2, r3) from wrist to the hand and supplying their values to two hinge joints at the wrist (f: flextion-extension and p:pronation-supination) for approximately ten seconds. The combination of the recorded torques that can more or less keep the hand in the same position when the hand is fully flexed (e.g. r1 to f and r2 to p) is different from a neutral position (e.g. r1 to f and r3 to p). I think it might be because the abduction/adduction is locked, and interchangeable with pronation/supination when hand is flexed/extended. Is it possible to record only acting torques? Is there some way to create/record a torque that would always balance the hand?

    A minor question: If a hand is put in a specific position, it needs approximately 30 ms of simulation time to calculate the torques (they rise to their value from zero, slightly fluctuating). Is there a way to calculate the torques for the model in one step?
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    I am not sure I understand the model you are using (is this one of the hand models provided with HAPTIX or something else?). In general, if you apply the same torque from different initial positions, the model may go to different places, because it hits different constraints along the way.

    To compute a torque that would balance the hand, you need inverse dynamics. This function is available in MuJoCo Pro but not in HAPTIX. The idea is that you provide a vector of joint positions, velocities and accelerations, call mj_inverse(), and MuJoCo computes a vector of torques such that if you apply them at the given position and velocity, they will generate the given acceleration.

    Why does it take time for the simulation to settle: depending on the model, initial condition and torques you are applying, the system may move a bit before it reaches a steady state. Note that the constraints are soft, so it is not obvious how they will balance each other until you run the simulation. Another reason could be that you may have insufficient number of solver iterations per time step; in that case the solver will not converge to the correct answer in one time step, but since it warm-starts from the previous time step, it may converge to the correct answer over multiple time steps (assuming the system is not moving). But this is rare.
     
  3. Thank you for the answer.

    Yes, I am using one of the HAPTIX hand models. Could you tell me then which exactly torques is torque sensor recording? And how it might relate to the stabilization torque?

    Some additional information about the simulation: collisions are disabled, and I am trying to feed back into the joint torques the torque I record from torque sensors, and the combination of recorded torques that stabilizes the hand appears to depend on the initial position of the hand. I need to feed back different torque sensors.

    Settling the simulation: Strangely, I tried to recreate the plot that I had, where torques fluctuate for the first 30 ms, but they don't anymore. I will try to find how I did it again.
     
  4. Emo Todorov

    Emo Todorov Administrator Staff Member

    Torques depend on the hand configuration because of gravity, or because of soft equality constraints or joint limits inside the hand itself.

    As for what the sensors are measuring, look at the XML file. There is a sensor section that lists all sensors defined in the model. Each sensor definition contains a reference to the model component that it is measuring.