From 44d9161ca6037fda94e995b754beb6a875ef402c Mon Sep 17 00:00:00 2001 From: JosephBorodach Date: Thu, 25 Jun 2026 09:23:56 -0400 Subject: [PATCH] Add UR12e support --- README.md | 1 + meta.json.in | 5 + src/kinematics/ur12e.json | 250 ++++++++++++++++++++++++++++ src/viam/ur/module/ur_arm_model.cpp | 3 + 4 files changed, 259 insertions(+) create mode 100644 src/kinematics/ur12e.json diff --git a/README.md b/README.md index df570ff5..69e490b5 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ This repo is a [module](https://docs.viam.com/registry/#modular-resources) that - UR3e, as `viam:universal-robots:ur3e` - UR5e, as `viam:universal-robots:ur5e` - UR7e, as `viam:universal-robots:ur7e` +- UR12e, as `viam:universal-robots:ur12e` - UR20, as `viam:universal-robots:ur20` ## Configuration and Usage diff --git a/meta.json.in b/meta.json.in index 5a85c0a6..03c1c0b2 100644 --- a/meta.json.in +++ b/meta.json.in @@ -24,6 +24,11 @@ "api": "rdk:component:arm", "model": "viam:universal-robots:ur20", "markdown_link": "README.md#configuration-and-usage" + }, + { + "api": "rdk:component:arm", + "model": "viam:universal-robots:ur12e", + "markdown_link": "README.md#configuration-and-usage" } ], "entrypoint": "@CMAKE_INSTALL_BINDIR@/universal-robots" diff --git a/src/kinematics/ur12e.json b/src/kinematics/ur12e.json new file mode 100644 index 00000000..4b2ccb25 --- /dev/null +++ b/src/kinematics/ur12e.json @@ -0,0 +1,250 @@ +{ + "name": "UR12e", + "kinematic_param_type": "SVA", + "links": [ + { + "id": "base_link", + "parent": "world", + "translation": { + "x": 0, + "y": 0, + "z": 180.7 + }, + "geometry": { + "r": 75.0, + "l": 300.0, + "translation": { + "x": 0, + "y": 0, + "z": 150.0 + } + } + }, + { + "id": "shoulder_link", + "parent": "shoulder_pan_joint", + "translation": { + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "id": "upper_arm_link", + "parent": "shoulder_lift_joint", + "translation": { + "x": -612.7, + "y": 0, + "z": 0 + }, + "geometry": { + "r": 80.0, + "l": 735.0, + "translation": { + "x": -306.35, + "y": -130, + "z": 0 + }, + "orientation": { + "type": "ov_degrees", + "value": { + "x": -1, + "y": 0, + "z": 0, + "th": 0 + } + } + } + }, + { + "id": "forearm_link", + "parent": "elbow_joint", + "translation": { + "x": -571.55, + "y": 0, + "z": 0 + }, + "geometry": { + "r": 65.0, + "l": 670.0, + "translation": { + "x": -285.775, + "y": 0, + "z": 0 + }, + "orientation": { + "type": "ov_degrees", + "value": { + "x": -1, + "y": 0, + "z": 0, + "th": 0 + } + } + } + }, + { + "id": "wrist_1_link", + "parent": "wrist_1_joint", + "translation": { + "x": 0, + "y": -174.15, + "z": 0 + }, + "geometry": { + "r": 50.0, + "l": 260.0, + "translation": { + "x": 0, + "y": -87.075, + "z": 0 + }, + "orientation": { + "type": "ov_degrees", + "value": { + "x": 0, + "y": -1, + "z": 0, + "th": 0 + } + } + } + }, + { + "id": "wrist_2_link", + "parent": "wrist_2_joint", + "translation": { + "x": 0, + "y": 0, + "z": -119.85 + }, + "geometry": { + "r": 80.0, + "translation": { + "x": 0, + "y": 0, + "z": 0 + }, + "orientation": { + "type": "ov_degrees", + "value": { + "x": 0, + "y": 0, + "z": -1, + "th": 0 + } + } + } + }, + { + "id": "ee_link", + "parent": "wrist_3_joint", + "translation": { + "x": 0, + "y": -116.55, + "z": 0 + }, + "orientation": { + "type": "ov_degrees", + "value": { + "x": 0, + "y": -1, + "z": 0, + "th": 90 + } + }, + "geometry": { + "r": 50.0, + "l": 200.0, + "translation": { + "x": 0, + "y": -58.275, + "z": 0 + }, + "orientation": { + "type": "ov_degrees", + "value": { + "x": 0, + "y": -1, + "z": 0, + "th": 0 + } + } + } + } + ], + "joints": [ + { + "id": "shoulder_pan_joint", + "type": "revolute", + "parent": "base_link", + "axis": { + "x": 0, + "y": 0, + "z": 1 + }, + "max": 360, + "min": -360 + }, + { + "id": "shoulder_lift_joint", + "type": "revolute", + "parent": "shoulder_link", + "axis": { + "x": 0, + "y": -1, + "z": 0 + }, + "max": 360, + "min": -360 + }, + { + "id": "elbow_joint", + "type": "revolute", + "parent": "upper_arm_link", + "axis": { + "x": 0, + "y": -1, + "z": 0 + }, + "max": 180, + "min": -180 + }, + { + "id": "wrist_1_joint", + "type": "revolute", + "parent": "forearm_link", + "axis": { + "x": 0, + "y": -1, + "z": 0 + }, + "max": 360, + "min": -360 + }, + { + "id": "wrist_2_joint", + "type": "revolute", + "parent": "wrist_1_link", + "axis": { + "x": 0, + "y": 0, + "z": -1 + }, + "max": 360, + "min": -360 + }, + { + "id": "wrist_3_joint", + "type": "revolute", + "parent": "wrist_2_link", + "axis": { + "x": 0, + "y": -1, + "z": 0 + }, + "max": 360, + "min": -360 + } + ] +} diff --git a/src/viam/ur/module/ur_arm_model.cpp b/src/viam/ur/module/ur_arm_model.cpp index 86321189..6296db18 100644 --- a/src/viam/ur/module/ur_arm_model.cpp +++ b/src/viam/ur/module/ur_arm_model.cpp @@ -338,6 +338,9 @@ const std::vector& UrModelDescriptor::all() { t.push_back({"ur20", "ur20", {"base_link", "wrist_3_link", "shoulder_link", "forearm_link", "upper_arm_link", "wrist_1_link", "wrist_2_link"}}); + // URCL maps "ur12e" to RobotType::UR10 (per URCL helpers.h), so the + // urcl_category here is "ur10". + t.push_back({"ur12e", "ur10", {}}); return t; }(); return table;