top of page
New in version C#SDK-v1.0.4.
/**
* @brief Load recognition initialization.
* @return Error code
*/
int LoadIdentifyDynFilterInit();
12.29. Load identification variable initialization
New in version C#SDK-v1.0.4.
/**
* @brief Initialization of load recognition variables.
* @return Error code
*/
int LoadIdentifyDynVarInit();
12.30. Load Identification Main Program
New in version C#SDK-v1.0.4.
/**
* @brief Load recognition main program.
* @param [in] joint_torque Joint torque.
* @param [in] joint_pos Joint position.
* @param [in] t Sampling period.
* @return Error code
*/
int LoadIdentifyMain(double[] joint_torque, double[] joint_pos, double t);
12.31. Get the load identification result
New in version C#SDK-v1.0.4.
/**
* @brief Get load recognition results
* @param [in] gain Gravity term coefficient double[6], centrifugal term coefficient double[6].
* @param [out] weight load weight
* @param [out] cog load center of mass
* @return error code
*/
int LoadIdentifyGetResult(double[] gain, ref double weight, ref DescTran cog);
12.32. Robot Load Identification Code Example
private void button74_Click(object sender, EventArgs e)
{
int rtn;
int retval = 0;
retval = robot.LoadIdentifyDynFilterInit();
Console.WriteLine("LoadIdentifyDynFilterInit retval is: " + retval);
retval = robot.LoadIdentifyDynVarInit();
Console.WriteLine("LoadIdentifyDynVarInit retval is: " + retval);
JointPos posJ = new JointPos(0,0,0,0,0,0);
DescPose posDec = new DescPose(0, 0, 0, 0, 0, 0);
double[] joint_toq = new double[6] { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f };
robot.GetActualJointPosDegree(0, ref posJ);
posJ.jPos[1] = posJ.jPos[1] + 10;
robot.GetJointTorques(0, joint_toq);
joint_toq[1] = joint_toq[1] + 2;
double[] tmpTorque = new double[6] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
for (int i = 0; i < 6; i++)
{
tmpTorque[i] = joint_toq[i];
}
retval = robot.LoadIdentifyMain(tmpTorque, posJ.jPos, 1);
Console.WriteLine("LoadIdentifyMain retval is: " + retval);
double[] gain = new double[12] { 0, 0.05, 0, 0, 0, 0, 0, 0.02, 0, 0, 0, 0 };
double weight = 0;
DescTran load_pos = new DescTran(0, 0, 0);
retval = robot.LoadIdentifyGetResult(gain, ref weight, ref load_pos);
Console.WriteLine("LoadIdentifyGetResult retval is: {0}; weight is {1} cog is {2} {3} {4}", retval, weight, load_pos.x, load_pos.y, load_pos.z);
}
12.33. Force sensor assisted drag
New in version C#SDK-V1.1.4: Web-3.8.3
/**
* @brief Force sensor assisted drag
* @param [in] status control status, 0-off; 1-on
* @param [in] asaptiveFlag Adaptive on flag, 0-off; 1-on
* @param [in] interfereDragFlag Interference area drag flag, 0-off; 1-on
* @param [in] ingularityConstraintsFlag singularity strategy, 0-avoidance; 1-crossing
* @param [in] forceCollisionFlag Robot collision detection flag during auxiliary drag; 0-off; 1-on
* @param [in] M inertia coefficient
* @param [in] B Damping coefficient
* @param [in] K stiffness coefficient
* @param [in] F Drag six-dimensional force threshold
* @param [in] Fmax Maximum drag force limit Nm
* @param [in] Vmax Maximum joint speed limit °/s
* @return Error code
*/
int EndForceDragControl(int status, int asaptiveFlag, int interfereDragFlag,int ingularityConstraintsFlag,int forceCollisionFlag, double[] M , double[] B, double[] K, double[] F, double Fmax, double Vmax);
12.34. Get the state of the force sensor drag switch
/**
* @brief Get force sensor drag switch state.
* @param [out] dragState force sensor assist drag control state, 0-off; 1-on
* @param [out] sixDimensionalDragState sixDimensionalForceAssistedDragState, 0-off; 1-on
* @return ErrorCode
*/
int GetForceAndTorqueDragState(ref int dragState, ref int sixDimensionalDragState);
12.35. The force sensor is automatically turned on after the error is cleared
/**
* @brief The force sensor is automatically turned on after an error is cleared.
* @param [in] status Control status, 0-off, 1-on.
* @return Error code
*/
int SetForceSensorDragAutoFlag(int status);
12.36. Force Sensor Assisted Drag Code Example
private void button61_Click(object sender, EventArgs e)
{
robot.SetForceSensorDragAutoFlag(1);
double[] M = { 15.0, 15.0, 15.0, 0.5, 0.5, 0.1 };
double[] B =