December 16, 2018, 06:18:17 AM
Robotforum | Industrial Robots Community

 iiwa 14 FRI Joint specific torque control


Author Topic:  iiwa 14 FRI Joint specific torque control  (Read 653 times)

0 Members and 1 Guest are viewing this topic.

February 06, 2018, 07:52:31 AM
Read 653 times
Offline

ahnjmo1993


Hello, I'm trying to "torque control" iiwa 14 with FRI (Fast Robot Interface). I have 2 questions.

Q1) What is EXACT relationship between (joint_FRI, torque_FRI) and (joint_command, and torque_command) in following "LBRTorqueSineOverlayClient.cpp" code??

    My FRI and Sunrise codes are as follows :

<FRI : "LBRTorqueSineOverlayClient.cpp">
    robotCommand().setJointPosition(joint_FRI)
    robotCommand().setTorque(torque_FRI);

    memcpy(joint_command, robotState().getCommandedJointPosition(), LBRState::NUMBER_OF_JOINTS * sizeof(double));
    memcpy(torque_command, robotState().getCommandedTorque(), LBRState::NUMBER_OF_JOINTS * sizeof(double));

<Sunrise: "LBRTorqueSineOverlay.java">
     JointImpedanceControlMode ctrMode = new JointImpedanceControlMode(0, 0, 0, 0, 0, 0, 0);
      ctrMode.setStiffnessForAllJoints(0.0);
      ctrMode.setDampingForAllJoints(0.0);
      PositionHold posHold = new PositionHold(ctrMode, -1, TimeUnit.SECONDS);
      _lbr.move(posHold.addMotionOverlay(torqueOverlay));

Q2) I expect "torque_command" obtained from "robotState().getCommandedTorque()" is different from actual "Motor Torque input known as torque_motor". As long as I know, because of flexible joints, torque_motor (motor torque input) and torque_joint (torque affecting actual link of robot) are also different. Therefore, I also want to know relationship between "torque_motor" and "torque_command".


Linkback: https://www.robot-forum.com/robotforum/index.php?topic=25763.0

Today at 06:18:17 AM
Reply #1

Advertisement

Guest

October 17, 2018, 04:06:51 PM
Reply #1
Offline

g.dechambrier


Hi,

I seem to have  a different version of the example LBRTorqueSineOverlayClient.cpp. What version do you have ?


void LBRTorqueSineOverlayClient::command()
{
    // In command(), the joint values have to be sent. Which is done by calling
    // the base method.
    LBRClient::command();
   
    // Check for correct ClientCommandMode.
    if (robotState().getClientCommandMode() == TORQUE)
    {
       // calculate  offset
        double offset = _torqueAmpl * sin(_phi);
       
       _phi += _stepWidth;
       if (_phi >= 2 * M_PI) _phi -= 2 * M_PI;     

       for (int i=0; i<LBRState::NUMBER_OF_JOINTS; i++)
       {
          if (_jointMask & (1<<i))
          {
              _torques = offset;
          }
       }
       // Set superposed joint torques.
       robotCommand().setTorque(_torques);
    }
}

October 18, 2018, 07:48:22 AM
Reply #2
Offline

DrG


Hello ahnjmo1993,
Refer to the Manual of FRI, there the control laws should be sketched.

In the feedforward command stream, the FRI Side commanded torque is spliced in.
                tau_ctrl= k( q_FRI - q_MSR) + tau_FRI + D(q,q_Dot) + G(q)

Quote
Q2) I expect "torque_command" obtained from "robotState().getCommandedTorque()" is different from actual "Motor Torque input known as torque_motor". As long as I know, because of flexible joints, torque_motor (motor torque input) and torque_joint (torque affecting actual link of robot) are also different. Therefore, I also want to know relationship between "torque_motor" and "torque_command".

Welcome to Torque-Control of a flexible joint.

In theory, one might expect that the three readouts "tau_cmd" "tau_msr" and "tau_extmsr" would magically exactly sum up...
... but in fact this is not the case, since for the Interpretation of tau_msr, one needs an observer model, which obviously uses it's own Dynamics - in most of the cases not matching the expectations.

In the readout Datastream, you will find data:
       tau_msr  <= Measurement of the Torque Sensor
       tau_cmd <= the command, which was sent to the torque Controller (without friction observer, which is part of the inner control loop)
       tau_ext  <= an observer based model, to identify "external Forces" - contact forces

To Interpret the measured torque, one can solve a differential equation:
       tau_msr =ModelledDynamicsRobot(q_msr, q_dot_msr, q_ddot_msr) + ModelledFriction (q_msr,q_dot_msr) + tau_ext
 
And right here, one sees the obvious issues:
     In this differential equation,
  • NO Control law is visible - since this is the resulting physics AFTER the control-torque was applied from the feed-forward branch.
  • There are some time effects due (-> Observers) neccessary to model the Dynamics of the Robot AND to model the friction

Hope that helped a bit...
DrG

 







Share via facebook Share via linkedin Share via pinterest Share via reddit Share via twitter