From 0a0834a6b56ef1150078b993d30f9141b257467d Mon Sep 17 00:00:00 2001 From: Bourumir Wyngs Date: Sun, 26 May 2024 12:40:43 +0200 Subject: [PATCH] One more passing test --- src/tests/data/kuka/kr10r1420_macro.xacro | 178 ++++++++++++++++++ .../data/kuka/opw_parameters_kr10r1420.yaml | 21 +++ src/tests/urdf_extractor.rs | 16 ++ 3 files changed, 215 insertions(+) create mode 100644 src/tests/data/kuka/kr10r1420_macro.xacro create mode 100644 src/tests/data/kuka/opw_parameters_kr10r1420.yaml diff --git a/src/tests/data/kuka/kr10r1420_macro.xacro b/src/tests/data/kuka/kr10r1420_macro.xacro new file mode 100644 index 0000000..e8dd683 --- /dev/null +++ b/src/tests/data/kuka/kr10r1420_macro.xacro @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tests/data/kuka/opw_parameters_kr10r1420.yaml b/src/tests/data/kuka/opw_parameters_kr10r1420.yaml new file mode 100644 index 0000000..2e8fdb3 --- /dev/null +++ b/src/tests/data/kuka/opw_parameters_kr10r1420.yaml @@ -0,0 +1,21 @@ +# +# Parameters for use with IK solvers which support OPW (Ortho-Parallel Wrist) +# kinematic configurations, as described in the paper "An Analytical Solution +# of the Inverse Kinematics Problem of Industrial Serial Manipulators with an +# Ortho-parallel Basis and a Spherical Wrist" by Mathias Brandstötter, Arthur +# Angerer, and Michael Hofbaur (Proceedings of the Austrian Robotics Workshop +# 2014, 22-23 May, 2014, Linz, Austria). +# +# The moveit_opw_kinematics_plugin package provides such a solver. +# +opw_kinematics_geometric_parameters: + a1: 0.150 + a2: -0.020 + b: 0.0 + c1: 0.450 + c2: 0.610 + c3: 0.660 + c4: 0.080 +opw_kinematics_joint_offsets: [0.0, deg(-90.0), 0.0, 0.0, 0.0, 0.0] +opw_kinematics_joint_sign_corrections: [-1, 1, 1, -1, 1, -1] + diff --git a/src/tests/urdf_extractor.rs b/src/tests/urdf_extractor.rs index e93442c..b9d5e26 100644 --- a/src/tests/urdf_extractor.rs +++ b/src/tests/urdf_extractor.rs @@ -147,4 +147,20 @@ fn test_extraction_kr150() { assert_eq!(urdf.c4, yaml.c4, "c4 parameter mismatch"); } +#[test] +fn test_extraction_kr10r1420() { + let yaml = Parameters::from_yaml_file("\ + src/tests/data/kuka/opw_parameters_kr10r1420.yaml") + .expect("Failed to read or parse URDF"); + let urdf = read_urdf("src/tests/data/kuka/kr10r1420_macro.xacro"); + + assert_eq!(urdf.a1, yaml.a1, "a1 parameter mismatch"); + assert_eq!(urdf.a2, yaml.a2, "a2 parameter mismatch"); + assert_eq!(urdf.b, yaml.b, "b parameter mismatch"); + assert_eq!(urdf.c1, yaml.c1, "c1 parameter mismatch"); + assert_eq!(urdf.c2, yaml.c2, "c2 parameter mismatch"); + assert_eq!(urdf.c3, yaml.c3, "c3 parameter mismatch"); + assert_eq!(urdf.c4, yaml.c4, "c4 parameter mismatch"); +} +