top of page
8.1. Get current joint positions (degrees)
/**
* @brief Get current joint positions (degrees)
* @param [out] jPos Six joint positions in deg
* @return Error code
*/
int GetActualJointPosDegree(JointPos jPos);
8.2. Get joint feedback speed (deg/s)
/**
* @brief Get joint feedback speed (deg/s)
* @param [out] speed Six joint speeds
* @return Error code
*/
int GetActualJointSpeedsDegree(Object[] speed);
8.3. Get joint feedback acceleration
/**
* @brief Get joint feedback acceleration (deg/s^2)
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] acc Six joint accelerations
* @return Error code
*/
public int GetActualJointAccDegree(int flag, Object[] acc)
8.4. Get TCP command composite speed
/**
* @brief Get TCP command speed
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] tcp_speed Linear speed
* @param [out] ori_speed Orientation speed
* @return Error code
*/
public int GetTargetTCPCompositeSpeed(int flag, double tcp_speed, double ori_speed)
8.5. Get TCP feedback composite speed
/**
* @brief Get TCP feedback composite speed
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] tcp_speed Linear speed
* @param [out] ori_speed Orientation speed
* @return Error code
*/
public int GetActualTCPCompositeSpeed(int flag, double tcp_speed, double ori_speed)
8.6. Get TCP command speed
/**
* @brief Get TCP command speed
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] speed [x,y,z,rx,ry,rz] speed
* @return Error code
*/
public int GetTargetTCPSpeed(int flag, Object[] speed)
8.7. Get TCP feedback speed
/**
* @brief Get TCP feedback speed
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] speed [x,y,z,rx,ry,rz] speed
* @return Error code
*/
public int GetActualTCPSpeed(int flag, Object[] speed)
8.8. Get current tool pose
/**
* @brief Get current tool pose
* @param [out] desc_pos Tool pose
* @return Error code
*/
int GetActualTCPPose(DescPose desc_pos);
8.9. Get current tool coordinate system number
/**
* @brief Get current tool coordinate system number
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] id Tool coordinate system number
* @return Error code
*/
int GetActualTCPNum(int flag, int[] id)
8.10. Get current workpiece coordinate system number
/**
* @brief Get current workpiece coordinate system number
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] id Workpiece coordinate system number
* @return Error code
*/
public int GetActualWObjNum(int flag, int[] id)
8.11. Get current end flange pose
/**
* @brief Get current end flange pose
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] desc_pos Flange pose
* @return Error code
*/
public int GetActualToolFlangePose(int flag, DescPose desc_pos)
8.12. Get current joint torque
/**
* @brief Get current joint torque
* @param [in] flag 0-Blocking, 1-Non-blocking
* @param [out] torques Joint torques
* @return Error code
*/
int GetJointTorques(int flag, Object[] torques);
8.13. Get system time
/**
* @brief Get system time
* @return List[0]:int Error code; List[1]:double t_ms in ms
*/
List<Number> GetSystemClock();
8.14. Check if robot motion is completed
/**
* @brief Check if robot motion is completed
* @param [out] state 0-Not completed, 1-Completed
* @return Error code
*/
public int GetRobotMotionDone(int[] state)
8.15. Query robot motion queue buffer length
/**
* @brief Query robot motion queue buffer length
* @param [out] len Buffer length
* @return Error code
*/
public int GetMotionQueueLength(int[] len)
8.16. Get robot emergency stop state
/**
* @brief Get robot emergency stop state
* @param [out] state Emergency stop state, 0-Normal, 1-Emergency stop
* @return Error code
*/
public int GetRobotEmergencyStopState(int[] state)
8.17. Get SDK-robot communication state
/**
* @brief Get SDK-robot communication state
* @return state Communication state, 0-Normal, 1-Abnormal
*/
public int GetSDKComState()
8.18. Get safety stop signal
/**
* @brief Get safety stop signal
* @param [out] si0_state Safety stop signal SI0, 0-Invalid, 1-Valid
* @param [out] si1_state Safety stop signal SI1, 0-Invalid, 1-Valid
* @return Error code
*/
public int GetSafetyStopState(int[] si0_state, int[] si1_state)
8.19. Get robot joint driver temperature (°C)
/**
* @brief Get robot joint driver temperature (°C)
* @param [out] temperature Temperature
* @return Error code
*/
public int GetJointDriverTemperature(double[] temperature)
8.20. Get robot joint driver torque (Nm)
/**
* @brief Get robot joint driver torque (Nm)
* @param [out] torque Torque
* @return Error code
*/
public int GetJointDriverTorque(double[] torque)
8.21. Get robot real-time state structure
/**
* @brief Get robot real-time state structure
* @return Real-time state structure
*/
public ROBOT_STATE_PKG GetRobotRealTimeState()
8.22. Robot status inquiry code example
public static int TestGetStatus(Robot robot)
{
List<Number> angle=new ArrayList<>();
angle=robot.GetRobotInstallAngle();
System.out.println("yangle:"+angle.get(1)+",zangle:"+angle.get(2));
JointPos j_deg =new JointPos(){};
robot.GetActualJointPosDegree( j_deg);
Object[] jointSpeed =new Object[] { 0,0,0,0,0,0 };
robot.GetActualJointSpeedsDegree(jointSpeed);
Object[] jointAcc = new Object[]{0,0,0,0,0,0 };
robot.GetActualJointAccDegree(0, jointAcc);
double tcp_speed = 0.0;
double ori_speed = 0.0;
robot.GetTargetTCPCompositeSpeed(0, tcp_speed, ori_speed);
robot.GetActualTCPCompositeSpeed(0, tcp_speed, ori_speed);
Object[] targetSpeed =new Object[] { 0,0,0,0,0,0 };
robot.GetTargetTCPSpeed(0, targetSpeed);
Object[] actualSpeed =new Object[] {0,0,0,0,0,0 };
robot.GetActualTCPSpeed(0, actualSpeed);
DescPose tcp = new DescPose(){};
robot.GetActualTCPPose(tcp);
DescPose flange = new DescPose(){};
robot.GetActualToolFlangePose(0, flange);
int[] id = {};
robot.GetActualTCPNum(0, id);
robot.GetActualWObjNum(0, id);
List<Number> jtorque=new ArrayList<>();
jtorque=robot.GetJointTorques(0);
List<Number> t_ms = new ArrayList<>();
t_ms=robot.GetSystemClock();
List<Integer> config = new ArrayList<>();
config=robot.GetRobotCurJointsConfig();
int motionDone = 0;
robot.GetRobotMotionDone(motionDone);
int[] len ={0 };
robot.GetMotionQueueLength(len);
int[] emergState = {0};
robot.GetRobotEmergencyStopState(emergState);
int comstate = 0;
comstate=robot.GetSDKComState();
int[] si0_state=new int[]{0}, si1_state=new int[]{0};
robot.GetSafetyStopState(si0_state, si1_state);
double[] temp =new double[] { 0,0,0,0,0,0 };
robot.GetJointDriverTemperature(temp);
double[] torque = new double[]{ 0,0,0,0,0,0 };
robot.GetJointDriverTorque(torque);
ROBOT_STATE_PKG pkg=new ROBOT_STATE_PKG();
pkg=robot.GetRobotRealTimeState();
return 0;
}
8.23. Inverse kinematics calculation
/**
* @brief Inverse kinematics calculation
* @param [in] type 0-Absolute pose (base frame), 1-Incremental pose (base frame), 2-Incremental pose (tool frame)
* @param [in] desc_pos Cartesian pose
* @param [in] config Joint space configuration, [-1]-Solve with reference to current joint position, [0~7]-Solve with specific joint space configuration
* @param [out] joint_pos Joint position
* @return Error code
*/
int GetInverseKin(int type, DescPose desc_pos, int config, JointPos joint_pos);
bottom of page