diff --git a/.github/workflows/validate-description.yml b/.github/workflows/validate-description.yml
new file mode 100644
index 0000000..bc94150
--- /dev/null
+++ b/.github/workflows/validate-description.yml
@@ -0,0 +1,16 @@
+name: Validate description
+
+on:
+ pull_request:
+ push:
+ branches: [main]
+
+jobs:
+ tcp-frames:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+ - run: python3 scripts/validate_tcp_frames.py
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f5ccba..040c5b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+- Correct both gripper TCP frames by removing an unintended 180-degree X-axis
+ flip relative to the original Golf convention, consistently across Xacro,
+ URDF, MJCF, and USD.
- Use `base_link` as the robot root across Xacro, URDF, MJCF, and USD assets.
- Make `base_footprint` a direct fixed child while preserving MJCF and USD
physical placement, joint anchors, and controller targets.
diff --git a/README.md b/README.md
index 9130c02..445c584 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,13 @@ MJCF base variants:
| --- |
|  |
+## TCP frame
+
+Both gripper TCP links use the same transform in Xacro, URDF, MJCF, and USD:
+translation `(0.13996, 0, 0)` from the gripper base and rotation `(-pi/2, 0, 0)`
+in roll-pitch-yaw order. Run `python3 scripts/validate_tcp_frames.py` after changing
+any generated description.
+
## USD
The main USD entry point is `usd/galbot_one_golf.usda`. Related payloads,
diff --git a/mjcf/galbot_one_golf.xml b/mjcf/galbot_one_golf.xml
index 5b8eae3..4876d53 100644
--- a/mjcf/galbot_one_golf.xml
+++ b/mjcf/galbot_one_golf.xml
@@ -227,7 +227,7 @@
.*?)\n\s*\}}', text, re.S
+ )
+ if match is None:
+ raise ValueError(f"{path}: cannot find USD Xform {name}")
+ return match.group("body")
+
+
+def _validate_usd(path: Path) -> None:
+ text = path.read_text(encoding="utf-8")
+ for name in TCP_NAMES:
+ block = _usd_block(text, name, path=path)
+ orient = re.search(r"xformOp:orient\s*=\s*\(([^)]+)\)", block)
+ translate = re.search(r"xformOp:translate\s*=\s*\(([^)]+)\)", block)
+ if orient is None or translate is None:
+ raise ValueError(f"{path}:{name} lacks an authored orient or translate")
+ _assert_quat(
+ _values(
+ orient.group(1).replace(",", " "),
+ count=4,
+ label=f"{path}:{name} orient",
+ ),
+ label=f"{path}:{name} orient",
+ )
+ _assert_close(
+ _values(
+ translate.group(1).replace(",", " "),
+ count=3,
+ label=f"{path}:{name} translate",
+ ),
+ EXPECTED_POS,
+ label=f"{path}:{name} translate",
+ )
+
+
+def main() -> int:
+ try:
+ _validate_xacro(ROOT / "xacro/components/galbot_gripper.xacro")
+ for path in (
+ ROOT / "urdf/galbot_one_golf.urdf",
+ ROOT / "urdf/galbot_one_golf_fixed_base.urdf",
+ ):
+ _validate_urdf(path)
+ for path in (
+ ROOT / "mjcf/galbot_one_golf.xml",
+ ROOT / "mjcf/galbot_one_golf_fixed_base.xml",
+ ROOT / "mjcf/galbot_one_golf_planar_base.xml",
+ ):
+ _validate_mjcf(path)
+ _validate_usd(ROOT / "usd/payloads/base.usda")
+ except (ET.ParseError, OSError, ValueError) as error:
+ print(f"TCP frame validation failed: {error}", file=sys.stderr)
+ return 1
+ print("TCP frames agree across Xacro, URDF, MJCF, and USD.")
+ return 0
+
+
+if __name__ == "__main__":
+ raise SystemExit(main())
diff --git a/urdf/galbot_one_golf.urdf b/urdf/galbot_one_golf.urdf
index e013e5d..b808d58 100644
--- a/urdf/galbot_one_golf.urdf
+++ b/urdf/galbot_one_golf.urdf
@@ -1902,7 +1902,7 @@
-
+
@@ -2573,6 +2573,6 @@
-
+
diff --git a/urdf/galbot_one_golf_fixed_base.urdf b/urdf/galbot_one_golf_fixed_base.urdf
index 8e31429..5625fd1 100644
--- a/urdf/galbot_one_golf_fixed_base.urdf
+++ b/urdf/galbot_one_golf_fixed_base.urdf
@@ -1294,7 +1294,7 @@
-
+
@@ -1965,6 +1965,6 @@
-
+
diff --git a/usd/payloads/base.usda b/usd/payloads/base.usda
index 0803998..24746d5 100644
--- a/usd/payloads/base.usda
+++ b/usd/payloads/base.usda
@@ -873,7 +873,7 @@ def Xform "galbot_one_golf"
def Xform "left_gripper_tcp_link"
{
- quatd xformOp:orient = (0.7071067690849304, 0.7071067690849304, 0, 0)
+ quatd xformOp:orient = (0.7071067690849304, -0.7071067690849304, 0, 0)
double3 xformOp:scale = (1, 1, 1)
double3 xformOp:translate = (0.13996000587940216, 0, 0)
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
@@ -1906,7 +1906,7 @@ def Xform "galbot_one_golf"
def Xform "right_gripper_tcp_link"
{
- quatd xformOp:orient = (0.7071067690849304, 0.7071067690849304, 0, 0)
+ quatd xformOp:orient = (0.7071067690849304, -0.7071067690849304, 0, 0)
double3 xformOp:scale = (1, 1, 1)
double3 xformOp:translate = (0.13996000587940216, 0, 0)
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient", "xformOp:scale"]
diff --git a/xacro/components/galbot_gripper.xacro b/xacro/components/galbot_gripper.xacro
index 83b209d..9067e6a 100644
--- a/xacro/components/galbot_gripper.xacro
+++ b/xacro/components/galbot_gripper.xacro
@@ -382,7 +382,7 @@
-
+