Skip to content

[Question] How to assign dof/joint indices? #37

Closed

Description

@shijiyuanaa

I'm trying to use LeggedMobileManipulator to combine a quadruped and a robot arm. I use 'convert_urdf.py' to convert a URDF to USD. However, the joint indices were not as [base_dof_nums, arm_dof_nums, tool_dof_nums(which is 0 in my case)] after the robot init. (The dof indices were initialized in line 212 of articulation_view.py.) So there may be some problems when I call robot.get_default_dof_state() or robot.apply_action(), etc.

My question is how to make sure the joint order is like [base, arm, tool] when importing the USD file? Thanks a lot!

Activity

  1. Mayankm96 commented on Mar 20, 2023

    @Mayankm96
    Contributor

    Hi, thanks for pointing this out!

    I tried the same for our ALMA (arm-on-ANYmal) robot last week and also faced the same issue. The parsing of joints in Isaac Sim is done in a breadth-first order instead of depth-first, which means the legs and arm joints are arranged differently to what the MobileManipulator class expects (base joints and arm joints in chunks).

    We can't change the way PhysX parses the joints. This convention is defined by USDPhysics. However, a possible solution can be that the users specify through the configuration object, which joints belong to different parts of a heterogeneous robot. This way the inner workings of the joints handled by the physics engine will remain hidden from the user and they only "see" joints in the order they specify. If they don't specify an order then the default ordering is used.

    The interface would then become:

    1. User sets and gets the joints at their pre-specified order
    2. The class converts them into simulation order

    Would this be something that makes sense?

  2. added
    bug
    on Mar 20, 2023
  3. shijiyuanaa commented on Mar 20, 2023

    @shijiyuanaa
    Author

    Hi, thanks for pointing this out!

    I tried the same for our ALMA (arm-on-ANYmal) robot last week and also faced the same issue. The parsing of joints in Isaac Sim is done in a breadth-first order instead of depth-first, which means the legs and arm joints are arranged differently to what the MobileManipulator class expects (base joints and arm joints in chunks).

    We can't change the way PhysX parses the joints. This convention is defined by USDPhysics. However, a possible solution can be that the users specify through the configuration object, which joints belong to different parts of a heterogeneous robot. This way the inner workings of the joints handled by the physics engine will remain hidden from the user and they only "see" joints in the order they specify. If they don't specify an order then the default ordering is used.

    The interface would then become:

    1. User sets and gets the joints at their pre-specified order
    2. The class converts them into simulation order

    Would this be something that makes sense?

    Thank you for your reply!
    I tried to change the parent link of the robot arm's first joint in my urdf and it works 😸 . But I hope there be more elegant way to change joint order. Thank you anyway!

  4. Mayankm96 commented on Mar 20, 2023

    @Mayankm96
    Contributor

    Interesting. Could you please elaborate more on what you mean by:

    I tried to change the parent link of the robot arm's first joint in my urdf and it works

  5. shijiyuanaa commented on Mar 20, 2023

    @shijiyuanaa
    Author

    Interesting. Could you please elaborate more on what you mean by:

    I tried to change the parent link of the robot arm's first joint in my urdf and it works

    In the original urdf file, I simply attach the arm to the trunk link of the quadruped, and I found that the joint order is not what I want. Then I attach the arm to imu_link, which is a child link of trunk(so that the arm's fixed joint and the thigh joints are in the same hierarchy , I guess ), then I got the correct joint order.

  6. Mayankm96 commented on Mar 21, 2023

    @Mayankm96
    Contributor

    Ah I see. That is quite a bit of a hack but good to know that is a possible solution (just not the ideal kind).

    I'll keep this issue open for now. Will make a fix for this that will require users to explicitly specify the joints for their heterogeneous robot parts (base, arm, gripper) to make it easier to work with.

  7. Murkey8895 commented on Apr 4, 2023

    @Murkey8895

    Interesting. Could you please elaborate more on what you mean by:

    I tried to change the parent link of the robot arm's first joint in my urdf and it works

    In the original urdf file, I simply attach the arm to the trunk link of the quadruped, and I found that the joint order is not what I want. Then I attach the arm to imu_link, which is a child link of trunk(so that the arm's fixed joint and the thigh joints are in the same hierarchy , I guess ), then I got the correct joint order.

    Hi, I'm also trying to combine a quadruped and a robot arm. Following your idea, I attach the arm's first fixed joint to imu_link, but still get a wrong order:
    ['joint1', 'joint2', 'joint3', 'joint4', 'FL_hip_joint', 'FR_hip_joint', 'RL_hip_joint', 'RR_hip_joint', 'joint5', 'FL_thigh_joint', 'FR_thigh_joint', 'RL_thigh_joint', 'RR_thigh_joint', 'joint6', 'FL_calf_joint', 'FR_calf_joint', 'RL_calf_joint', 'RR_calf_joint', 'jointGripper']
    where the joint[1-6] are the arm's joints. Is it convenient for you to show your urdf file to help me solve this problem? Thank you in advance!

  8. added a commit that references this issue on Aug 2, 2023
    4ba7a0f
  9. added a commit that references this issue on Jul 1, 2026
    ca3ec73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions