Skip to content

Conversation

@harsh-pal-robotics
Copy link
Contributor

Public API Changes

None

Description

On some of the urdf joints the default axis is not X, this changes exposes the information adding an axis field to the URDF Joint.
by default if the value is not available or parseable, use X as fallback.

Copy link
Collaborator

@EzraBrooks EzraBrooks left a comment

Choose a reason for hiding this comment

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

Great enhancement! one comment about possibly validating the schema

const axis = xml.getElementsByTagName(UrdfAttrs.Axis);
if (axis.length > 0) {
const xyzValue = axis[0].getAttribute(UrdfAttrs.Xyz)?.split(' ');
if (xyzValue && xyzValue.length === 3) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The axis element itself is optional, however according to the URDF spec the xyz attribute is mandatory if axis exists.

I think we should fail hard (throw) if xyzValue is null or malformed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, make sense!

Copy link
Collaborator

@EzraBrooks EzraBrooks left a comment

Choose a reason for hiding this comment

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

Sorry to hijack your PR 😉. You did most of the work, I just wanted to get it in!

@EzraBrooks EzraBrooks enabled auto-merge (squash) November 10, 2025 19:29
@EzraBrooks EzraBrooks merged commit b7b7ba1 into RobotWebTools:develop Nov 10, 2025
12 checks passed
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