Replies: 2 comments
-
|
Hi @jmake, This is by design, but I agree it's confusing. Here's what's happening: Why the indices differThere are two independent joint orderings at play:
The The problem surfaces when you inspect the raw How to verify the mappingYou can inspect the index mapping that joints_subset = ik_solver.get_joints_subset()
print("Kinematics joint order:", joints_subset.joint_names)
print("Mapped DOF indices:", joints_subset.joint_indices)This will show you exactly which cspace index maps to which USD DOF index. Your feature requestAgree that a built-in validation check would help -- something that warns when the cspace YAML order doesn't match the USD articulation order. In the meantime, adding an assertion at setup time catches this early: ik_joint_names = ik_solver.get_joints_subset().joint_names
for i, name in enumerate(ik_joint_names):
dof_idx = robot.get_dof_index(name)
if dof_idx != i:
print(f"Warning: joint '{name}' is index {i} in cspace but DOF {dof_idx} in articulation")We'll bring this up with the team as a potential improvement. |
Beta Was this translation helpful? Give feedback.
-
|
An internal ticket (6133612) has been created to track this feature request. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking for an error related to my grips. For this, I printed the joints/DOF indices using
SingleArticulation.get_dof_index and SingleArticulation._articulation_view._metadata
Both of the print correctly
Further on, when printing the
actionreturned by .I get
This showed me that the indices did not match, since in my case, I was trying to assign a value of 0.07 to my grips.
According to
get_dof_index, the indices to be modified are 6 and 7; however,joint_positionsshows that the modification was applied to indices 0 and 6.After searching, I found that the above matches the order of
cspacein my.yamlfile (Automatically created by me).cspace:
Once it is rearranged, everything is correct.
cspace:
The reason for the error is clear—since
cspaceis defined within the YAML file—but it is counterintuitive to resolve.At the very least, there should be an additional way to verify that all indices are correct across all files.
Beta Was this translation helpful? Give feedback.
All reactions