Skip to content

Conversation

Copy link

Copilot AI commented Jan 23, 2026

Prismatic joints were generating 12-element motion subspace vectors instead of the required 6-element spatial vectors due to concatenating zeros(3) three times.

Changes

  • std_joint.py: Changed prismatic joint motion_subspace from zeros(3) to zeros(1) to match revolute joint pattern
  • parametric_joint.py: Applied same fix to parametric joints
  • Tests: Added motion_subspace dimension validation for all joint types (prismatic, revolute, fixed)

Technical Details

Before:

elif self.type in ["prismatic"]:
    axis = self.axis
    zero = self.math.zeros(3)  # Creates [0, 0, 0]
    return self.math.vertcat(axis[0], axis[1], axis[2], zero, zero, zero)  # 12 elements

After:

elif self.type in ["prismatic"]:
    axis = self.axis
    z = self.math.zeros(1)  # Creates [0]
    return self.math.vertcat(axis[0], axis[1], axis[2], z, z, z)  # 6 elements

Prismatic joints now correctly return spatial vectors with axis values in positions 0-2 and zeros in positions 3-5, inverse of revolute joints.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Question] Using Prismatic Joint</issue_title>
<issue_description>Hi Dev,

Trying to use the library with robot that has prismatic joint. Is there any reason why the dimension for the motion_subspace seems to be different.

if self.type == "fixed":
            return self.math.zeros(6, 1)
        elif self.type in ["revolute", "continuous"]:
            axis = self.axis
            z = self.math.zeros(1)
            return self.math.vertcat(z, z, z, axis[0], axis[1], axis[2])
        elif self.type in ["prismatic"]:
            axis = self.axis
            zero = self.math.zeros(
                3,
            )
            return self.math.vertcat(axis[0], axis[1], axis[2], zero, zero, zero)

and is there a good way to translate from a normal axis definition to the one use in adam. </issue_description>

<agent_instructions>Please fix the motion subspace dimension for the prismatic joint
</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@Giulero Hi @podshara ! Thanks for opening the issue. This is clearly a bug! The prismatic joint subspace should be as well 6D vector. Opening a PR to fix this!

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


📚 Documentation preview 📚: https://adam-docs--151.org.readthedocs.build/en/151/

Copilot AI and others added 4 commits January 23, 2026 16:25
Co-authored-by: Giulero <29798643+Giulero@users.noreply.github.com>
Co-authored-by: Giulero <29798643+Giulero@users.noreply.github.com>
Co-authored-by: Giulero <29798643+Giulero@users.noreply.github.com>
Co-authored-by: Giulero <29798643+Giulero@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix motion subspace dimension for prismatic joint Fix prismatic joint motion_subspace returning 12 elements instead of 6 Jan 23, 2026
Copilot AI requested a review from Giulero January 23, 2026 16:32
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.

[Question] Using Prismatic Joint

2 participants