From 379a642625efebcf3b080bf2325ed398d16bc9e6 Mon Sep 17 00:00:00 2001 From: kovacsge11 Date: Mon, 10 Nov 2025 19:07:39 +0100 Subject: [PATCH 1/7] initial go at extending with ext axes --- .../kss/message_builder.h | 19 ++++- .../kss/src/message_builder.cc | 75 +++++++++++++++++-- 2 files changed, 87 insertions(+), 7 deletions(-) mode change 100755 => 100644 kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h mode change 100755 => 100644 kuka_external_control_sdk/kss/src/message_builder.cc diff --git a/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h b/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h old mode 100755 new mode 100644 index 905e772..8d1e2ba --- a/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h +++ b/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h @@ -63,6 +63,7 @@ class MotionState : public BaseMotionState { const std::string kAttributeSuffix = "\"/>"; const std::string kJointPositionsPrefix = ""; + const std::string kJointPositionsPrefix = " joint_position_attribute_prefixes_; const std::string kDoubleAttributeFormat = @@ -123,6 +134,8 @@ class ControlSignal : public BaseControlSignal { const std::string kAttributeSuffix = "/>"; const std::string kStopNodePrefix = ""; const std::string kStopNodeSuffix = ""; + const std::string kExtJointPositionsPrefix = " ext_joint_position_attribute_prefixes_; const std::string kGpioPrefix = "= len) { @@ -82,6 +90,33 @@ void MotionState::CreateFromXML(const char *incoming_xml) { next_value_idx += endptr - &incoming_xml[next_value_idx]; next_value_idx += kAttributeSuffix.length(); + + // External axes + // this -1 is to account for that there is no " before the fist attribute + next_value_idx += kExtJointPositionsPrefix.length() - 1; + + for (int i = 0; i < kFixSixAxes; ++i) { + std::size_t dbl_length = 0; + next_value_idx += std::floor(std::log10( + i + 1.0)); // length of extra digits, e.g. for more than 10 dofs + next_value_idx += 6; // length of prefix + 1, e.g. " E1=\"" + + if (next_value_idx < len) { + if(i < (dof_-num_of_non_ext_axes_)) { + measured_positions_[i] = + std::stod(&incoming_xml[next_value_idx], &dbl_length) / 1000.0; + } else { + std::stod(&incoming_xml[next_value_idx], &dbl_length); + } + } else { + throw std::invalid_argument( + "Received XML is not valid for the given degree of freedom"); + } + next_value_idx += dbl_length; // length of the parsed double + } + next_value_idx += kAttributeSuffix.length(); + + // GPIO if (!gpioAttributePrefix.empty()) { next_value_idx += kGpioPrefix.length() - 1; } @@ -130,14 +165,19 @@ ControlSignal::CreateXMLString(int last_ipoc, bool stop_control) { std::memset(xml_string_, 0, sizeof(xml_string_)); AppendToXMLString(kMessagePrefix); + // Non-external axes AppendToXMLString(kJointPositionsPrefix); - for (int i = 0; i < dof_; ++i) { + for (int i = 0; i < kFixSixAxes; ++i) { char double_buffer[kPrecision + 3 + 1 + 1 + 1]; // Precision + Digits + Comma + Null + Minus sign AppendToXMLString(joint_position_attribute_prefixes_[i]); + // Index of Ax in all joint position values + short a_index = (dof_ - num_of_non_ext_axes_) + i; + // Only update values for configured axes + double a_value = (i < num_of_non_ext_axes_) ? (joint_position_values_[a_index] - initial_positions_[a_index]) : initial_positions_[a_index]; int ret = std::snprintf( double_buffer, sizeof(double_buffer), kDoubleAttributeFormat.data(), - (joint_position_values_[i] - initial_positions_[i]) * (180 / M_PI)); + a_value * (180 / M_PI)); if (ret <= 0) { return std::nullopt; } @@ -145,11 +185,34 @@ ControlSignal::CreateXMLString(int last_ipoc, bool stop_control) { AppendToXMLString(double_buffer); AppendToXMLString("\""); } - AppendToXMLString(kAttributeSuffix); + + // Stop AppendToXMLString(kStopNodePrefix); AppendToXMLString(stop_control ? "1" : "0"); AppendToXMLString(kStopNodeSuffix); + + // External axes + AppendToXMLString(kExtJointPositionsPrefix); + for (int i = 0; i < kFixSixAxes; ++i) { + char double_buffer[kPrecision + 3 + 1 + 1 + + 1]; // Precision + Digits + Comma + Null + Minus sign + AppendToXMLString(ext_joint_position_attribute_prefixes_[i]); + // Only update values for configured axes + double e_value = i < (dof_ - num_of_non_ext_axes_) ? (joint_position_values_[i] - initial_positions_[i]) : initial_positions_[i]; + int ret = std::snprintf( + double_buffer, sizeof(double_buffer), kDoubleAttributeFormat.data(), + e_value * 1000.0); + if (ret <= 0) { + return std::nullopt; + } + + AppendToXMLString(double_buffer); + AppendToXMLString("\""); + } + AppendToXMLString(kAttributeSuffix); + + // GPIO if (!gpioAttributePrefix.empty()) { AppendToXMLString(kGpioPrefix); } From 166a4dfeb79ddd026ab87bb318131b33e7b4dc7a Mon Sep 17 00:00:00 2001 From: kovacsge11 Date: Wed, 12 Nov 2025 17:06:25 +0100 Subject: [PATCH 2/7] update context+ethernet xml, rm factor from msg builder --- .../Context/rsi_joint_pos.rsix | 122 ++++++++++++++++-- .../Ethernet configuration/rsi_ethernet.xml | 14 +- .../kss/message_builder.h | 2 +- .../kss/src/message_builder.cc | 4 +- 4 files changed, 127 insertions(+), 15 deletions(-) mode change 100755 => 100644 kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Ethernet configuration/rsi_ethernet.xml diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix index 0a9ac54..584c29e 100644 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix @@ -1,10 +1,18 @@  - + + + + + + + + + @@ -53,7 +61,7 @@ - + @@ -61,6 +69,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2479,6 +2533,14 @@ + + + + + + + + @@ -2486,19 +2548,19 @@ - + - + - - - - - - + + + + + + @@ -2515,7 +2577,7 @@ - + @@ -2523,6 +2585,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Ethernet configuration/rsi_ethernet.xml b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Ethernet configuration/rsi_ethernet.xml old mode 100755 new mode 100644 index 1419696..cb57451 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Ethernet configuration/rsi_ethernet.xml +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Ethernet configuration/rsi_ethernet.xml @@ -10,7 +10,13 @@ - + + + + + + + @@ -21,6 +27,12 @@ + + + + + + diff --git a/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h b/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h index 8d1e2ba..c9b0d3f 100644 --- a/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h +++ b/kuka_external_control_sdk/kss/include/kuka/external-control-sdk/kss/message_builder.h @@ -63,7 +63,7 @@ class MotionState : public BaseMotionState { const std::string kAttributeSuffix = "\"/>"; const std::string kJointPositionsPrefix = " Date: Thu, 13 Nov 2025 11:51:09 +0100 Subject: [PATCH 3/7] separate e1 prismatic example, rsi_joint_pos - aligned context, but without any actual ext axes configure --- .../Program/RSI/rsi_ext_axis_example.src | 74 + .../Context/rsi_ext_axis_example.rsix | 2629 +++++++++++++++++ .../Context/rsi_joint_pos.rsix | 71 +- 3 files changed, 2711 insertions(+), 63 deletions(-) create mode 100644 kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src create mode 100644 kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_ext_axis_example.rsix diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src new file mode 100644 index 0000000..e2c91ab --- /dev/null +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src @@ -0,0 +1,74 @@ +&ACCESS RVP +DEF rsi_ext_axis_example() + ; ============================================= + ; Copyright 2025 KUKA Hungaria Kft. + ; + ; Licensed under the Apache License, Version 2.0 (the "License"); + ; you may not use this file except in compliance with the License. + ; You may obtain a copy of the License at + ; + ; http://www.apache.org/licenses/LICENSE-2.0 + ; + ; Unless required by applicable law or agreed to in writing, software + ; distributed under the License is distributed on an "AS IS" BASIS, + ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ; See the License for the specific language governing permissions and + ; limitations under the License. + ; ============================================= + + ; ============================================= + ; + ; ROS INDUSTRIAL: KUKA RSI HW INTERFACE + ; Realtime UDP data exchange with + ; kuka_rsi_driver using GPIO + ; + ; ============================================= + + ; Declaration of KRL variables + DECL INT ret ; Return value for RSI commands + + ;FOLD INI + ;FOLD BASISTECH INI + BAS (#INITMOV,0 ) + ;ENDFOLD (BASISTECH INI) + ;FOLD USER INI + ;Make your modifications here + ;ENDFOLD (USER INI) + ;ENDFOLD (INI) + + ; Move to start position + PTP $AXIS_ACT_MEAS + + ; Create RSI Context + ret = RSI_LOAD("rsi_ext_axis_example") + IF (ret <> RSIOK) THEN + HALT + ENDIF + + ; Set AxisCorr parameters to allow full range of motion + ROS_SetAxisCorrLimits("rsi_ext_axis_example") + + ; Activate RSI Context + ret = RSI_ACTIVATE("rsi_ext_axis_example") + IF (ret <> RSIOK) THEN + HALT + ENDIF + + ; Start RSI execution + ret = RSI_PROCESS_ON(#ABSOLUTE) + IF (ret <> RSIOK) THEN + HALT + ENDIF + + ; Sensor guided movement + RSI_MOVECORR() + + ; Turn off RSI + ret = RSI_PROCESS_OFF() + IF (ret <> RSIOK) THEN + HALT + ENDIF + + PTP $AXIS_ACT_MEAS + +END diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_ext_axis_example.rsix b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_ext_axis_example.rsix new file mode 100644 index 0000000..584c29e --- /dev/null +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_ext_axis_example.rsix @@ -0,0 +1,2629 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tooltip_COMMENT + + + + + + Tooltip_FunctionBlockInput + + + + + + Tooltip_FunctionBlockInOrder + + + + + Tooltip_FunctionBlockOutput + + + + + + Tooltip_FunctionBlockOutOrder + + + + + + + Tooltip_ANIN + + + Tooltip_ANIN_Out1 + + + + + Tooltip_ANIN_Index + + + + + Tooltip_DIGIN + + + + + + + Remarks_DIGIN_Index + Tooltip_DIGIN_Index + + + + Tooltip_DIGIN_DataType + + Bit + Byte + UByte + Int16 + UInt16 + Int32 + UInt32 + Float + + + + + + Tooltip_ANOUT + + + Tooltip_ANOUT_Out1 + + + + + Tooltip_ANOUT_Index + + + + + Tooltip_DIGOUT + + + + + + + Remarks_DIGOUT_Index + Tooltip_DIGOUT_Index + + + + Tooltip_DIGOUT_DataType + + Bit + Byte + UByte + Int16 + UInt16 + Int32 + UInt32 + Float + + + + + + + Tooltip_ETHERNET + Summary_ETHERNET + + + + + + + + + + Tooltip_ETHERNET_ConfigFile + + + Tooltip_ETHERNET_Timeout + + + Tooltip_ETHERNET_Flag + + + + Remarks_ETHERNET_Precision + Tooltip_ETHERNET_Precision + + + + + + Tooltip_INPUT + + + Tooltip_INPUT_Port + + + + + Tooltip_INPUT_Index + + + Tooltip_INPUT_DataType + + Bit + Byte + UByte + Int16 + UInt16 + Int32 + UInt32 + Float + + + + + + Tooltip_MAP2ANOUT + + + Tooltip_MAP2ANOUT_In1 + + + + + Tooltip_MAP2ANOUT_Index + + + + + Tooltip_MAP2DIGOUT + + + + + + + Remarks_MAP2DIGOUT_Index + Tooltip_MAP2DIGOUT_Index + + + + Tooltip_MAP2DIGOUT_DataType + + Bit + Byte + Int16 + + + + + + Tooltip_MAP2SEN_PINT + + + Tooltip_MAP2SEN_PINT_In1 + + + + + + Remark_SenPint_SenPrea_Index + Tooltip_MAP2SEN_PINT_Index + + + + + + Tooltip_MAP2SEN_PREA + + + Tooltip_MAP2SEN_PREA_In1 + + + + + + Remark_SenPint_SenPrea_Index + Tooltip_MAP2SEN_PREA_Index + + + + + + Tooltip_MONITOR + + + + + + + Tooltip_OUTPUT + + + Tooltip_OUTPUT_Port + + + + + Tooltip_OUTPUT_Index + + + Tooltip_OUTPUT_DataType + + Bit + Byte + UByte + Int16 + UInt16 + Int32 + UInt32 + Float + + + + + + Tooltip_RESETDIGOUT + + + + + + Tooltip_RESETDIGOUT_Index + + + + + Tooltip_SEN_PINT + + + Tooltip_SEN_PINT_Out1 + + + + + + Remark_SenPint_SenPrea_Index + Tooltip_SEN_PINT_Index + + + + + + Tooltip_SEN_PREA + + + Tooltip_SEN_PREA_Out1 + + + + + + Remark_SenPint_SenPrea_Index + Tooltip_SEN_PREA_Index + + + + + + Tooltip_SETDIGOUT + + + + + + Tooltip_SETDIGOUT_Index + + + + + + Remarks_Message + Summary_Message + + + + Summary_Message_Set + + + + Remarks_Message_Parameter + Summary_Message_Parameter1 + + + + + Remarks_Message_Parameter + Summary_Message_Parameter2 + + + + + Remarks_Message_Parameter + Summary_Message_Parameter3 + + + + + + + Remarks_Message_Type + Summary_Message_Type + + + Info + State + + + + + Example_Message_Text + Remarks_Message_Text + Summary_Message_Text + + + + + + + + + Tooltip_AND + Summary_AND + + + + + + + + + Tooltip_AND_Out1 + + + + + Tooltip_BAND + + + + + + + + + + Tooltip_BAND_DefVal + + + + + Tooltip_BCOMPL + + + + + + + + + Tooltip_BOR + + + + + + + + + + Tooltip_BOR_DefVal + + + + + Tooltip_NOT + + + + + + + + + Tooltip_OR + + + + + + + + + + + Tooltip_SIGNALSWITCH + + + Tooltip_SIGNALSWITCH_Ctrl + + + + + + + + + + + + Remarks_XOR + Tooltip_XOR + + + + + + + + + + + + + Remarks_RS + Tooltip_RS + + + + Tooltip_RS_Set + + + Tooltip_RS_Reset + + + + + + Remarks_RS_Out1 + Tooltip_RS_Out1 + rs_remarks.png + + + + + + + Remarks_SR + Tooltip_SR + + + + Tooltip_SR_Set + + + Tooltip_SR_Reset + + + + + + Remarks_SR_Out1 + Tooltip_SR_Out1 + sr_remarks.png + + + + + + Tooltip_SIGNALSELECTOR + + + Tooltip_SIGNALSELECTOR_Ctrl + + + + + + + + + + Tooltip_SIGNALSELECTOR_Default + + + + + + + Tooltip_ABS + + + Tooltip_ABS_In1 + + + + + Tooltip_ABS_Out1 + + + + + Tooltip_ACOS + + + Tooltip_ACOS_In1 + + + + + Tooltip_ACOS_Out1 + + + + + Tooltip_ASIN + + + Tooltip_ASIN_In1 + + + + + Tooltip_ASIN_Out1 + + + + + Tooltip_ATAN + + + + + + Tooltip_ATAN_Out1 + + + + + Tooltip_ATAN2 + + + + + + + Tooltip_ATAN2_Out1 + + + + + Tooltip_CEIL + + + + + + + + + Tooltip_COS + + + Tooltip_COS_In1 + + + + + Tooltip_COS_Out1 + + + + + Tooltip_Division + + + Tooltip_Division_Dividend + + + Tooltip_Division_Divisor + + + + + Tooltip_Division_Quotient + + + + + Tooltip_EQUAL + + + + + + + + + + Tooltip_EQUAL_CompVal + + + Tooltip_EQUAL_Tolerance + + + + + Tooltip_EXP + + + Tooltip_EXP_In1 + + + + + Tooltip_EXP_Out1 + + + + + Tooltip_FLOOR + + + + + + + + + Tooltip_GREATER + + + + + + + Tooltip_GREATER_Out1 + + + + + Tooltip_GREATER_CompVal + + + + Remarks_GREATER_Hysteresis + Tooltip_GREATER_Hysteresis + + + + + + Tooltip_LESS + + + + + + + + + + Tooltip_LESS_CompVal + + + + Remarks_LESS_Hysteresis + Tooltip_LESS_Hysteresis + + + + + + Tooltip_LIMIT + + + + + + + + + Tooltip_LIMIT_LowerLimit + + + Tooltip_LIMIT_UpperLimit + + + + + Tooltip_LOG + + + + + + Tooltip_LOG_Out1 + + + + + Tooltip_MINMAX + + + + + + + + Tooltip_MINMAX_Min + + + Tooltip_MINMAX_Max + + + + + Tooltip_MULTI + + + + + + + Tooltip_MULTI_Out1 + + + + + Tooltip_NORM + + + + + + + + + Remarks_NORM_Out1 + Tooltip_NORM_Out1 + + + + + + Tooltip_POW + + + Tooltip_POW_In1 + + + + + Tooltip_POW_Out1 + + + + + Tooltip_POW_Exp + + + + + Tooltip_ROUND + + + + + + Tooltip_ROUND_Out1 + + + + + Tooltip_ROUND_nDig + + + + + Tooltip_SIN + + + Tooltip_SIN_In1 + + + + + Tooltip_SIN_Out1 + + + + + Tooltip_SUB + + + Tooltip_SUB_Minu + + + Tooltip_SUB_Sub1 + + + + + Tooltip_SUB_Diff + + + + + Tooltip_SUB_Value + + + + + Tooltip_SUM + + + + + + + Tooltip_SUM_Sum + + + + + Tooltip_SUM_Value + + + + + Tooltip_TAN + + + Tooltip_TAN_In1 + + + + + Tooltip_TAN_Out1 + + + + + + Remarks_TRAFO_ROBFRAME + Tooltip_TRAFO_ROBFRAME + + + + Tooltip_TRAFO_ROBFRAME_In1 + + + Tooltip_TRAFO_ROBFRAME_In2 + + + Tooltip_TRAFO_ROBFRAME_In3 + + + + + Tooltip_TRAFO_ROBFRAME_Out1 + + + Tooltip_TRAFO_ROBFRAME_Out2 + + + Tooltip_TRAFO_ROBFRAME_Out3 + + + + + Tooltip_TRAFO_ROBFRAME_Type + + RotTrans + OnlyRot + EulerAngles + + + + Tooltip_TRAFO_ROBFRAME_Source + + World + Base + RobRoot + Tool + TTS + + + + Tooltip_TRAFO_ROBFRAME_Target + + World + Base + RobRoot + Tool + TTS + + + + + + Tooltip_TRAFO_USERFRAME + + + + + + + + + + + + + Tooltip_TRAFO_USERFRAME_Type + + RotTrans + OnlyRot + EulerAngles + + + + Tooltip_TRAFO_USERFRAME_FraX + + + Tooltip_TRAFO_USERFRAME_FraY + + + Tooltip_TRAFO_USERFRAME_FraZ + + + Tooltip_TRAFO_USERFRAME_FraA + + + Tooltip_TRAFO_USERFRAME_FraB + + + Tooltip_TRAFO_USERFRAME_FraC + + + + + Tooltip_SUMUP + + + + + + + + + + + + Remarks_AXISCORR + Tooltip_AXISCORR + + + + Tooltip_AXISCORR_CorrA1 + + + Tooltip_AXISCORR_CorrA2 + + + Tooltip_AXISCORR_CorrA3 + + + Tooltip_AXISCORR_CorrA4 + + + Tooltip_AXISCORR_CorrA5 + + + Tooltip_AXISCORR_CorrA6 + + + + + + Remarks_AXISCORR_Stat + Tooltip_AXISCORR_Stat + + + + Tooltip_AXISCORR_A1 + + + Tooltip_AXISCORR_A2 + + + Tooltip_AXISCORR_A3 + + + Tooltip_AXISCORR_A4 + + + Tooltip_AXISCORR_A5 + + + Tooltip_AXISCORR_A6 + + + + + Tooltip_AXISCORR_LowerLimA1 + + + Tooltip_AXISCORR_LowerLimA2 + + + Tooltip_AXISCORR_LowerLimA3 + + + Tooltip_AXISCORR_LowerLimA4 + + + Tooltip_AXISCORR_LowerLimA5 + + + Tooltip_AXISCORR_LowerLimA6 + + + Tooltip_AXISCORR_UpperLimA1 + + + Tooltip_AXISCORR_UpperLimA2 + + + Tooltip_AXISCORR_UpperLimA3 + + + Tooltip_AXISCORR_UpperLimA4 + + + Tooltip_AXISCORR_UpperLimA5 + + + Tooltip_AXISCORR_UpperLimA6 + + + + + + Remarks_AXISCORREXT + Tooltip_AXISCORREXT + + + + Tooltip_AXISCORREXT_CorrE1 + + + Tooltip_AXISCORREXT_CorrE2 + + + Tooltip_AXISCORREXT_CorrE3 + + + Tooltip_AXISCORREXT_CorrE4 + + + Tooltip_AXISCORREXT_CorrE5 + + + Tooltip_AXISCORREXT_CorrE6 + + + + + + Remarks_AXISCORREXT_Stat + Tooltip_AXISCORREXT_Stat + + + + Tooltip_AXISCORREXT_E1 + + + Tooltip_AXISCORREXT_E2 + + + Tooltip_AXISCORREXT_E3 + + + Tooltip_AXISCORREXT_E4 + + + Tooltip_AXISCORREXT_E5 + + + Tooltip_AXISCORREXT_E6 + + + + + Tooltip_AXISCORREXT_LowerLimE1 + + + Tooltip_AXISCORREXT_LowerLimE2 + + + Tooltip_AXISCORREXT_LowerLimE3 + + + Tooltip_AXISCORREXT_LowerLimE4 + + + Tooltip_AXISCORREXT_LowerLimE5 + + + Tooltip_AXISCORREXT_LowerLimE6 + + + Tooltip_AXISCORREXT_UpperLimE1 + + + Tooltip_AXISCORREXT_UpperLimE2 + + + Tooltip_AXISCORREXT_UpperLimE3 + + + Tooltip_AXISCORREXT_UpperLimE4 + + + Tooltip_AXISCORREXT_UpperLimE5 + + + Tooltip_AXISCORREXT_UpperLimE6 + + + + + Tooltip_AXISCORRMON + + + Tooltip_AXISCORRMON_A1 + + + Tooltip_AXISCORRMON_A2 + + + Tooltip_AXISCORRMON_A3 + + + Tooltip_AXISCORRMON_A4 + + + Tooltip_AXISCORRMON_A5 + + + Tooltip_AXISCORRMON_A6 + + + Tooltip_AXISCORRMON_E1 + + + Tooltip_AXISCORRMON_E2 + + + Tooltip_AXISCORRMON_E3 + + + Tooltip_AXISCORRMON_E4 + + + Tooltip_AXISCORRMON_E5 + + + Tooltip_AXISCORRMON_E6 + + + + + Tooltip_AXISCORRMON_MaxA1 + + + Tooltip_AXISCORRMON_MaxA2 + + + Tooltip_AXISCORRMON_MaxA3 + + + Tooltip_AXISCORRMON_MaxA4 + + + Tooltip_AXISCORRMON_MaxA5 + + + Tooltip_AXISCORRMON_MaxA6 + + + Tooltip_AXISCORRMON_MaxE1 + + + Tooltip_AXISCORRMON_MaxE2 + + + Tooltip_AXISCORRMON_MaxE3 + + + Tooltip_AXISCORRMON_MaxE4 + + + Tooltip_AXISCORRMON_MaxE5 + + + Tooltip_AXISCORRMON_MaxE6 + + + + + Tooltip_MAP2OV_PRO + + + + Remarks_MAP2OV_PRO_In1 + Tooltip_MAP2OV_PRO_In1 + + + + + + + Remarks_POSCORR + Tooltip_POSCORR + + + + Tooltip_POSCORR_CorrX + + + Tooltip_POSCORR_CorrY + + + Tooltip_POSCORR_CorrZ + + + Tooltip_POSCORR_CorrA + + + Tooltip_POSCORR_CorrB + + + Tooltip_POSCORR_CorrC + + + + + + Remarks_POSCORR_Stat + Tooltip_POSCORR_Stat + + + + Tooltip_POSCORR_X + + + Tooltip_POSCORR_Y + + + Tooltip_POSCORR_Z + + + Tooltip_POSCORR_A + + + Tooltip_POSCORR_B + + + Tooltip_POSCORR_C + + + + + Tooltip_POSCORR_LowerLimX + + + Tooltip_POSCORR_LowerLimY + + + Tooltip_POSCORR_LowerLimZ + + + Tooltip_POSCORR_UpperLimX + + + Tooltip_POSCORR_UpperLimY + + + Tooltip_POSCORR_UpperLimZ + + + Tooltip_POSCORR_MaxRotAngle + + + Tooltip_POSCORR_LastCorrStat + + + Tooltip_POSCORR_LastCorrX + + + Tooltip_POSCORR_LastCorrY + + + Tooltip_POSCORR_LastCorrZ + + + Tooltip_POSCORR_LastCorrA + + + Tooltip_POSCORR_LastCorrB + + + Tooltip_POSCORR_LastCorrC + + + Tooltip_POSCORR_RefCorrSys + + World + Base + RobRoot + Tool + TTS + + + + + + Tooltip_POSCORRMON + + + Tooltip_POSCORRMON_X + + + Tooltip_POSCORRMON_Y + + + Tooltip_POSCORRMON_Z + + + Tooltip_POSCORRMON_A + + + Tooltip_POSCORRMON_B + + + Tooltip_POSCORRMON_C + + + + + + Remark_ParamNoChangeDuringRuntime + Tooltip_POSCORRMON_MaxTrans + + + + + Remark_ParamNoChangeDuringRuntime + Tooltip_POSCORRMON_MaxRotAngle + + + + + + + Remarks_STOP + Tooltip_STOP + + + + + + + Tooltip_STOP_Mode + + InfoMessage + PathNormal + Velocity + PathFast + ExitMoveCorr + + + + + Remarks_STOP_Channel + Tooltip_STOP_Channel + + + + + + + Remarks_STOPROBOT + Tooltip_STOPROBOT + + + + + + + + Remarks_STOPROBOT_Mode + Tooltip_STOPROBOT_Mode + + + Brake + BrakeF + BrakeFF + + + + + + + Remarks_EXITMOVECORR + Tooltip_EXITMOVECORR + + + + + + + + + Tooltip_AXISACT + + + Tooltip_AXISACT_A1 + + + Tooltip_AXISACT_A2 + + + Tooltip_AXISACT_A3 + + + Tooltip_AXISACT_A4 + + + Tooltip_AXISACT_A5 + + + Tooltip_AXISACT_A6 + + + + + + Remarks_AXISACT_Type + Tooltip_POSACT_AXISACT_Type + axisact_remarks.png + + + Measured + IPO + IPO_FLT + CF + + + + + + Tooltip_AXISACTEXT + + + Tooltip_AXISACTEXT_E1 + + + Tooltip_AXISACTEXT_E2 + + + Tooltip_AXISACTEXT_E3 + + + Tooltip_AXISACTEXT_E4 + + + Tooltip_AXISACTEXT_E5 + + + Tooltip_AXISACTEXT_E6 + + + + + + Remarks_AXISACT_Type + Tooltip_POSACT_AXISACT_Type + axisact_remarks.png + + + Measured + IPO + IPO_FLT + CF + + + + + + Tooltip_GEARTORQUE + + + Tooltip_GEARTORQUE_A1 + + + Tooltip_GEARTORQUE_A2 + + + Tooltip_GEARTORQUE_A3 + + + Tooltip_GEARTORQUE_A4 + + + Tooltip_GEARTORQUE_A5 + + + Tooltip_GEARTORQUE_A6 + + + + + Tooltip_GEARTORQUE_TorqueSource + + Measured + Setpoint + + + + Tooltip_GEARTORQUE_LocationOnJoint + + Gear + Drive + + + + + + Tooltip_GEARTORQUEEXT + + + Tooltip_GEARTORQUEEXT_E1 + + + Tooltip_GEARTORQUEEXT_E2 + + + Tooltip_GEARTORQUEEXT_E3 + + + Tooltip_GEARTORQUEEXT_E4 + + + Tooltip_GEARTORQUEEXT_E5 + + + Tooltip_GEARTORQUEEXT_E6 + + + + + Tooltip_GEARTORQUE_TorqueSource + + Measured + Setpoint + + + + Tooltip_GEARTORQUE_LocationOnJoint + + Gear + Drive + + + + + + Tooltip_MOTORCURRENT + + + Tooltip_MOTORCURRENT_A1 + + + Tooltip_MOTORCURRENT_A2 + + + Tooltip_MOTORCURRENT_A3 + + + Tooltip_MOTORCURRENT_A4 + + + Tooltip_MOTORCURRENT_A5 + + + Tooltip_MOTORCURRENT_A6 + + + + + Tooltip_MOTORCURRENTEXT + + + Tooltip_MOTORCURRENTEXT_E1 + + + Tooltip_MOTORCURRENTEXT_E2 + + + Tooltip_MOTORCURRENTEXT_E3 + + + Tooltip_MOTORCURRENTEXT_E4 + + + Tooltip_MOTORCURRENTEXT_E5 + + + Tooltip_MOTORCURRENTEXT_E6 + + + + + Tooltip_OV_PRO + + + Tooltip_OV_PRO_Out1 + + + + + Tooltip_POSACT + + + Tooltip_POSACT_X + + + Tooltip_POSACT_Y + + + Tooltip_POSACT_Z + + + Tooltip_POSACT_A + + + Tooltip_POSACT_B + + + Tooltip_POSACT_C + + + Tooltip_POSACT_S + + + Tooltip_POSACT_T + + + + + + Remarks_POSACT_Type + Tooltip_POSACT_AXISACT_Type + posact_remarks.png + + + Measured + IPO + IPO_FLT + CF + + + + + + Tooltip_STATUS + + + Tooltip_STATUS_Stat + + + + + + Remarks_STATUS_Type + Tooltip_STATUS_Type + + + IPO_State + ProState_S + ProState_R + Pro_Mode_S + Pro_Mode_R + Mode_Op + IPO_Mode + IPO_Mode_C + Sensor + + + + + + + + Tooltip_D + + + + + + + + + Tooltip_D_KD + + + + + Tooltip_DELAY + + + + + + Tooltip_DELAY_Out1 + + + + + Tooltip_DELAY_DelayTime + + + + + Tooltip_GENCTRL + + + + + + + + + Tooltip_GENCTRL_Reset + + + Tooltip_GENCTRL_B0 + + + Tooltip_GENCTRL_A1 + + + Tooltip_GENCTRL_B1 + + + Tooltip_GENCTRL_A2 + + + Tooltip_GENCTRL_B2 + + + Tooltip_GENCTRL_A3 + + + Tooltip_GENCTRL_B3 + + + Tooltip_GENCTRL_A4 + + + Tooltip_GENCTRL_B4 + + + Tooltip_GENCTRL_A5 + + + Tooltip_GENCTRL_B5 + + + Tooltip_GENCTRL_A6 + + + Tooltip_GENCTRL_B6 + + + Tooltip_GENCTRL_A7 + + + Tooltip_GENCTRL_B7 + + + Tooltip_GENCTRL_A8 + + + Tooltip_GENCTRL_B8 + + + + + Tooltip_I + + + Tooltip_I_In1 + + + + + Tooltip_I_Out1 + + + + + Tooltip_I_Reset + + + Tooltip_I_TI + + + Tooltip_I_Type + + Always + OnCorrActive + + + + Tooltip_I_LowerLimit + + + Tooltip_I_UpperLimit + + + + + Tooltip_IIRFILTER + + + Tooltip_IIRFILTER_In1 + + + + + Tooltip_IIRFILTER_Out1 + + + + + Tooltip_IIRFILTER_Reset + + + Tooltip_IIRFILTER_Type + + Lowpass + Highpass + + + + Tooltip_IIRFILTER_Name + + Bessel + Butterworth + Tschebyscheff_0_5db + Tschebyscheff_1db + Tschebyscheff_2db + Tschebyscheff_3db + + + + Tooltip_IIRFILTER_Order + + O2 + O4 + O6 + O8 + O10 + + + + + Remarks_IIRFILTER_Cutoff + Tooltip_IIRFILTER_Cuttoff + + + + + + Tooltip_P + + + + + + + + + Tooltip_P_KR + + + + + Tooltip_PD + + + + + + + + + Tooltip_PD_KR + + + Tooltip_PD_TV + + + + + Tooltip_PID + + + + + + + + + Tooltip_PID_Reset + + + Tooltip_PID_KR + + + + Remarks_PID_TN + Tooltip_PID_TN + + + + Tooltip_PID_TV + + + + Remarks_PID_LimLow + Tooltip_PID_LimLow + + + + + Remarks_PID_LimUpp + Tooltip_PID_LimUpp + + + + + + Tooltip_PT1 + + + + + + + + + Tooltip_PT1_KR + + + Tooltip_PT1_T1 + + + + + Tooltip_PT2 + + + + + + + + + Tooltip_PT2_KR + + + Tooltip_PT2_T1 + + + Tooltip_PT2_T2 + + + + + + Remarks_SOURCE + Tooltip_SOURCE_2 + Tooltip_SOURCE + Source.png + + + + + + + + Remarks_SOURCE_Type + Tooltip_SOURCE_Type + + + Const + Sin + Cos + Square + Sawtooth + + + + Tooltip_SOURCE_Offset + + + + Remarks_SOURCE_Amplitude + Tooltip_SOURCE_Amplitude + + + + + Remarks_SOURCE_Period + Tooltip_SOURCE_Period + + + + + + Tooltip_TIMER + + + Tooltip_TIMER_Ctrl + + + Tooltip_TIMER_InReset + + + + + Tooltip_TIMER_Out1 + + + + + Tooltip_TIMER_Reset + + + Tooltip_TIMER_Time + + + + + Tooltip_Constant + + + + + + Tooltip_Constant_Value + + + + + + Remarks_SINE + Summary_SINE + Sine.png + + + + + Remarks_PeriodicSignalBase_Active + Summary_PeriodicSignalBase_Active + + + + + Remarks_PeriodicSignalBase_Reset + Summary_PeriodicSignalBase_Reset + + + + + Remarks_PeriodicSignalBase_InAmp + Summary_PeriodicSignalBase_Amp + + + + + Remarks_PeriodicSignalBase_InFreq + Summary_PeriodicSignalBase_Freq + + + + + + Summary_SINE_Signal + + + + + Summary_PeriodicSignalBase_Amp + + + + Remarks_PeriodicSignalBase_ParamFreq + Summary_PeriodicSignalBase_Freq + + + + + Remarks_PeriodicSignalBase_Phase + Summary_PeriodicSignalBase_Phase + + + + Summary_PeriodicSignalBase_Offset + + + + + + Remarks_COSINE + Summary_COSINE + Cosine.png + + + + + Remarks_PeriodicSignalBase_Active + Summary_PeriodicSignalBase_Active + + + + + Remarks_PeriodicSignalBase_Reset + Summary_PeriodicSignalBase_Reset + + + + + Remarks_PeriodicSignalBase_InAmp + Summary_PeriodicSignalBase_Amp + + + + + Remarks_PeriodicSignalBase_InFreq + Summary_PeriodicSignalBase_Freq + + + + + + Summary_COSINE_Signal + + + + + Summary_PeriodicSignalBase_Amp + + + + Remarks_PeriodicSignalBase_ParamFreq + Summary_PeriodicSignalBase_Freq + + + + + Remarks_PeriodicSignalBase_Phase + Summary_PeriodicSignalBase_Phase + + + + Summary_PeriodicSignalBase_Offset + + + + + + Remarks_SAWTOOTH + Summary_SAWTOOTH + Sawtooth.png + + + + + Remarks_PeriodicSignalBase_Active + Summary_PeriodicSignalBase_Active + + + + + Remarks_PeriodicSignalBase_Reset + Summary_PeriodicSignalBase_Reset + + + + + Remarks_PeriodicSignalBase_InAmp + Summary_PeriodicSignalBase_Amp + + + + + Remarks_PeriodicSignalBase_InFreq + Summary_PeriodicSignalBase_Freq + + + + + + Summary_SAWTOOTH_Signal + + + + + Summary_PeriodicSignalBase_Amp + + + + Remarks_PeriodicSignalBase_ParamFreq + Summary_PeriodicSignalBase_Freq + + + + + Remarks_PeriodicSignalBase_Phase + Summary_PeriodicSignalBase_Phase + + + + Summary_PeriodicSignalBase_Offset + + + + + + Remarks_TRIANGLE + Summary_TRIANGLE + Triangle.png + + + + + Remarks_PeriodicSignalBase_Active + Summary_PeriodicSignalBase_Active + + + + + Remarks_PeriodicSignalBase_Reset + Summary_PeriodicSignalBase_Reset + + + + + Remarks_PeriodicSignalBase_InAmp + Summary_PeriodicSignalBase_Amp + + + + + Remarks_PeriodicSignalBase_InFreq + Summary_PeriodicSignalBase_Freq + + + + + + Summary_TRIANGLE_Signal + + + + + Summary_PeriodicSignalBase_Amp + + + + Remarks_PeriodicSignalBase_ParamFreq + Summary_PeriodicSignalBase_Freq + + + + + Remarks_PeriodicSignalBase_Phase + Summary_PeriodicSignalBase_Phase + + + + Summary_PeriodicSignalBase_Offset + + + + + + Remarks_RECTANGLE + Summary_RECTANGLE + Rectangle.png + + + + + Remarks_PeriodicSignalBase_Active + Summary_PeriodicSignalBase_Active + + + + + Remarks_PeriodicSignalBase_Reset + Summary_PeriodicSignalBase_Reset + + + + + Remarks_PeriodicSignalBase_InAmp + Summary_PeriodicSignalBase_Amp + + + + + Remarks_PeriodicSignalBase_InFreq + Summary_PeriodicSignalBase_Freq + + + + + + Summary_RECTANGLE_Signal + + + + + Summary_PeriodicSignalBase_Amp + + + + Remarks_PeriodicSignalBase_ParamFreq + Summary_PeriodicSignalBase_Freq + + + + + Remarks_PeriodicSignalBase_Phase + Summary_PeriodicSignalBase_Phase + + + + Summary_PeriodicSignalBase_Offset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix index 584c29e..723532f 100644 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix @@ -6,7 +6,7 @@ - + @@ -70,9 +70,6 @@ - - - @@ -88,33 +85,11 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -2534,12 +2509,12 @@ - - - - - - + + + + + + @@ -2589,41 +2564,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file From 5beeb86437ce2b7cebdab25530a3e2971452175f Mon Sep 17 00:00:00 2001 From: kovacsge11 Date: Thu, 20 Nov 2025 09:17:47 +0100 Subject: [PATCH 4/7] Pass 0 as value for non-configured ext axes instead of initial value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Áron Svastits <49677296+Svastits@users.noreply.github.com> --- kuka_external_control_sdk/kss/src/message_builder.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kuka_external_control_sdk/kss/src/message_builder.cc b/kuka_external_control_sdk/kss/src/message_builder.cc index a15943e..6178a65 100644 --- a/kuka_external_control_sdk/kss/src/message_builder.cc +++ b/kuka_external_control_sdk/kss/src/message_builder.cc @@ -199,7 +199,8 @@ ControlSignal::CreateXMLString(int last_ipoc, bool stop_control) { 1]; // Precision + Digits + Comma + Null + Minus sign AppendToXMLString(ext_joint_position_attribute_prefixes_[i]); // Only update values for configured axes - double e_value = i < (dof_ - num_of_non_ext_axes_) ? (joint_position_values_[i] - initial_positions_[i]) : initial_positions_[i]; + double e_value = i < (dof_ - num_of_non_ext_axes_) ? (joint_position_values_[i] - initial_positions_[i]) : 0.0; + int ret = std::snprintf( double_buffer, sizeof(double_buffer), kDoubleAttributeFormat.data(), e_value); From 0c6f456d3817a0197dcf0f563c90e8b8fd27f56f Mon Sep 17 00:00:00 2001 From: kovacsge11 Date: Thu, 20 Nov 2025 17:35:55 +0100 Subject: [PATCH 5/7] resolve PR comments - rm unnec checks, add warning comment, set non-configured fill to 0 --- kuka_external_control_sdk/kss/src/message_builder.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kuka_external_control_sdk/kss/src/message_builder.cc b/kuka_external_control_sdk/kss/src/message_builder.cc index 6178a65..b74cf24 100644 --- a/kuka_external_control_sdk/kss/src/message_builder.cc +++ b/kuka_external_control_sdk/kss/src/message_builder.cc @@ -52,8 +52,6 @@ void MotionState::CreateFromXML(const char *incoming_xml) { // Non-external axes for (int i = 0; i < kFixSixAxes; ++i) { std::size_t dbl_length = 0; - next_value_idx += std::floor(std::log10( - i + 1.0)); // length of extra digits, e.g. for more than 10 dofs next_value_idx += 6; // length of prefix + 1, e.g. " A1=\"" if (next_value_idx < len) { @@ -97,8 +95,6 @@ void MotionState::CreateFromXML(const char *incoming_xml) { for (int i = 0; i < kFixSixAxes; ++i) { std::size_t dbl_length = 0; - next_value_idx += std::floor(std::log10( - i + 1.0)); // length of extra digits, e.g. for more than 10 dofs next_value_idx += 6; // length of prefix + 1, e.g. " E1=\"" if (next_value_idx < len) { @@ -171,10 +167,12 @@ ControlSignal::CreateXMLString(int last_ipoc, bool stop_control) { char double_buffer[kPrecision + 3 + 1 + 1 + 1]; // Precision + Digits + Comma + Null + Minus sign AppendToXMLString(joint_position_attribute_prefixes_[i]); - // Index of Ax in all joint position values + // Index of Ax in all joint position values, + // WARNING - this whole parsing only works if all configured external axes + // are before the non-external axes in the link chain short a_index = (dof_ - num_of_non_ext_axes_) + i; // Only update values for configured axes - double a_value = (i < num_of_non_ext_axes_) ? (joint_position_values_[a_index] - initial_positions_[a_index]) : initial_positions_[a_index]; + double a_value = (i < num_of_non_ext_axes_) ? (joint_position_values_[a_index] - initial_positions_[a_index]) : 0.0; int ret = std::snprintf( double_buffer, sizeof(double_buffer), kDoubleAttributeFormat.data(), a_value * (180 / M_PI)); From e6ec94b0166cf6f47eb8103a1b728a1a5d221032 Mon Sep 17 00:00:00 2001 From: kovacsge11 Date: Mon, 24 Nov 2025 09:44:07 +0100 Subject: [PATCH 6/7] move ctx name as variable to dat file -->only one program is needed to load any context --- .../Program/RSI/rsi_ext_axis_example.src | 74 ------------------- .../Program/RSI/rsi_gpio_example.src | 74 ------------------- .../iiqka_os2/Program/RSI/rsi_joint_pos.dat | 5 ++ .../iiqka_os2/Program/RSI/rsi_joint_pos.src | 6 +- 4 files changed, 8 insertions(+), 151 deletions(-) delete mode 100644 kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src delete mode 100644 kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_gpio_example.src create mode 100644 kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.dat diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src deleted file mode 100644 index e2c91ab..0000000 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_ext_axis_example.src +++ /dev/null @@ -1,74 +0,0 @@ -&ACCESS RVP -DEF rsi_ext_axis_example() - ; ============================================= - ; Copyright 2025 KUKA Hungaria Kft. - ; - ; Licensed under the Apache License, Version 2.0 (the "License"); - ; you may not use this file except in compliance with the License. - ; You may obtain a copy of the License at - ; - ; http://www.apache.org/licenses/LICENSE-2.0 - ; - ; Unless required by applicable law or agreed to in writing, software - ; distributed under the License is distributed on an "AS IS" BASIS, - ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ; See the License for the specific language governing permissions and - ; limitations under the License. - ; ============================================= - - ; ============================================= - ; - ; ROS INDUSTRIAL: KUKA RSI HW INTERFACE - ; Realtime UDP data exchange with - ; kuka_rsi_driver using GPIO - ; - ; ============================================= - - ; Declaration of KRL variables - DECL INT ret ; Return value for RSI commands - - ;FOLD INI - ;FOLD BASISTECH INI - BAS (#INITMOV,0 ) - ;ENDFOLD (BASISTECH INI) - ;FOLD USER INI - ;Make your modifications here - ;ENDFOLD (USER INI) - ;ENDFOLD (INI) - - ; Move to start position - PTP $AXIS_ACT_MEAS - - ; Create RSI Context - ret = RSI_LOAD("rsi_ext_axis_example") - IF (ret <> RSIOK) THEN - HALT - ENDIF - - ; Set AxisCorr parameters to allow full range of motion - ROS_SetAxisCorrLimits("rsi_ext_axis_example") - - ; Activate RSI Context - ret = RSI_ACTIVATE("rsi_ext_axis_example") - IF (ret <> RSIOK) THEN - HALT - ENDIF - - ; Start RSI execution - ret = RSI_PROCESS_ON(#ABSOLUTE) - IF (ret <> RSIOK) THEN - HALT - ENDIF - - ; Sensor guided movement - RSI_MOVECORR() - - ; Turn off RSI - ret = RSI_PROCESS_OFF() - IF (ret <> RSIOK) THEN - HALT - ENDIF - - PTP $AXIS_ACT_MEAS - -END diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_gpio_example.src b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_gpio_example.src deleted file mode 100644 index 1f33770..0000000 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_gpio_example.src +++ /dev/null @@ -1,74 +0,0 @@ -&ACCESS RVP -DEF rsi_gpio_example() - ; ============================================= - ; Copyright 2025 KUKA Hungaria Kft. - ; - ; Licensed under the Apache License, Version 2.0 (the "License"); - ; you may not use this file except in compliance with the License. - ; You may obtain a copy of the License at - ; - ; http://www.apache.org/licenses/LICENSE-2.0 - ; - ; Unless required by applicable law or agreed to in writing, software - ; distributed under the License is distributed on an "AS IS" BASIS, - ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ; See the License for the specific language governing permissions and - ; limitations under the License. - ; ============================================= - - ; ============================================= - ; - ; ROS INDUSTRIAL: KUKA RSI HW INTERFACE - ; Realtime UDP data exchange with - ; kuka_rsi_driver using GPIO - ; - ; ============================================= - - ; Declaration of KRL variables - DECL INT ret ; Return value for RSI commands - - ;FOLD INI - ;FOLD BASISTECH INI - BAS (#INITMOV,0 ) - ;ENDFOLD (BASISTECH INI) - ;FOLD USER INI - ;Make your modifications here - ;ENDFOLD (USER INI) - ;ENDFOLD (INI) - - ; Move to start position - PTP $AXIS_ACT_MEAS - - ; Create RSI Context - ret = RSI_LOAD("rsi_gpio_joint_pos") - IF (ret <> RSIOK) THEN - HALT - ENDIF - - ; Set AxisCorr parameters to allow full range of motion - ROS_SetAxisCorrLimits("rsi_gpio_joint_pos") - - ; Activate RSI Context - ret = RSI_ACTIVATE("rsi_gpio_joint_pos") - IF (ret <> RSIOK) THEN - HALT - ENDIF - - ; Start RSI execution - ret = RSI_PROCESS_ON(#ABSOLUTE) - IF (ret <> RSIOK) THEN - HALT - ENDIF - - ; Sensor guided movement - RSI_MOVECORR() - - ; Turn off RSI - ret = RSI_PROCESS_OFF() - IF (ret <> RSIOK) THEN - HALT - ENDIF - - PTP $AXIS_ACT_MEAS - -END diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.dat b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.dat new file mode 100644 index 0000000..393fde4 --- /dev/null +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.dat @@ -0,0 +1,5 @@ +&ACCESS R +DEFDAT rsi_joint_pos PUBLIC + CONST CHAR CONTEXT_NAME[64] + CONTEXT_NAME[] = "rsi_joint_pos" +ENDDAT diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.src b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.src index 383fa48..773b86d 100644 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.src +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/Program/RSI/rsi_joint_pos.src @@ -42,16 +42,16 @@ DEF rsi_joint_pos() PTP $AXIS_ACT_MEAS ; Create RSI Context - ret = RSI_LOAD("rsi_joint_pos") + ret = RSI_LOAD(CONTEXT_NAME) IF (ret <> RSIOK) THEN HALT ENDIF ; Set AxisCorr parameters to allow full range of motion - ROS_SetAxisCorrLimits("rsi_joint_pos") + ROS_SetAxisCorrLimits(CONTEXT_NAME) ; Activate RSI Context - ret = RSI_ACTIVATE("rsi_joint_pos") + ret = RSI_ACTIVATE(CONTEXT_NAME) IF (ret <> RSIOK) THEN HALT ENDIF From 50153e4db8ac0fccf6d6cc50812546635779e7b2 Mon Sep 17 00:00:00 2001 From: kovacsge11 Date: Wed, 26 Nov 2025 10:58:14 +0100 Subject: [PATCH 7/7] reset e1 limits in rsi_joint_pos --- .../Context/rsi_joint_pos.rsix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix index 723532f..efe38e6 100644 --- a/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix +++ b/kuka_external_control_sdk/krc_setup/iiqka_os2/RobotSensorInterface/Context/rsi_joint_pos.rsix @@ -61,7 +61,7 @@ - + @@ -71,13 +71,13 @@ - + - + @@ -2560,15 +2560,9 @@ - - - - - - - + \ No newline at end of file