Skip to content

fix(export): skip axis inference for fixed joints - #203

Open
Hwajila wants to merge 1 commit into
ros:masterfrom
Hwajila:fix/fixed-joint-axis-inference
Open

fix(export): skip axis inference for fixed joints#203
Hwajila wants to merge 1 commit into
ros:masterfrom
Hwajila:fix/fixed-joint-axis-inference

Conversation

@Hwajila

@Hwajila Hwajila commented Sep 3, 2026

Copy link
Copy Markdown

Problem

CheckRefGeometryExists treats a missing or stale axis on every joint as Automatically Generate. CreateJoint then invokes the automatic DOF estimator whenever the axis is automatic. For a fixed joint this work is unnecessary because fixed URDF joints have no axis. The estimator can temporarily fix/unfix components and suppress/unsuppress mates during export.

This matches the fixed-joint behavior reported in #135.

Fix

  • Define whether a joint type uses an axis.
  • Skip missing-axis validation for fixed joints.
  • Do not trigger automatic joint estimation from an automatic axis when the joint is fixed.
  • Preserve existing behavior for revolute, continuous, prismatic, and automatically detected joints.

Testing

Added five focused cases confirming that fixed joints do not use an axis while revolute, continuous, prismatic, and automatically detected joints do.

All five focused tests pass. The project also builds successfully in the x64 Test configuration (using the installed .NET 4.8 targeting pack as a local override; the project target is unchanged).

End-to-end validation on SolidWorks 2025 x64 showed no component fix/unfix or mate suppression operations during the patched export.

Addresses #135.

}
}

internal static bool JointUsesAxis(string jointType)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a separate function is needed. You can just put this logic directly into the places where it is called.

link.Joint.CoordinateSystemName = "Automatically Generate";
}
if (!CheckRefAxisExists(link.Joint.AxisName))
// Fixed URDF joints do not have an axis. Marking a missing fixed-joint axis

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the comment is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants