What is the order and the + direction of an imported urdf robot

I imported a robot arm from urdf.
I used the robot.set_joint_velocities function to control its motion, use the robot.get_joint_efforts function to read the torque. Am I right?
if yes, what is the order of the joint? In urdf file, the joint1-6 are defined in order. But in isaac sim, the order become 3,2,1,4,5,6 when I use robot.set_joint_velocities. Meanwhile, the rotation direction of joint1-3 are opposite with the defined axis, but the joint4-6 are not. It makes me confused.

1 Like

I would like to add something since I also face the similiar issues. Not only the joint are not sorted correctly, but also the links. I think from the developer perspective, it’s not important how the order is because it doesn’t change anything. However which link is the root can be really important.

A lot of this reordering is done internally by PhysX for performance reasons.
Would a utility function to provide a reordering be useful? We can look into adding something so you can remap from 3,2,1,4,5,6 to the original order.

A few other questions:

  • Did you use merge fixed joints when importing the URDF?
  • Can you share a link to the URDF?

I have got this issue. Because I made the baselink of the 6-dof arm free (not fixed), so the arm’s third link was treated as baselink by the urdf importer. and thus the 1-3 joints becomes opposite. thanks for your reply.

Was there any solution to this. As the first 3 are reversed. When I use RmpFlow, the joint moves wrong, as it uses the urdf definition. Also when I publish the joint states to ros2 via the ros-bridge the pose is different between isaac sim and ros2. I need to keep the URDF in this config and it matches the real robot.

I’ve attached a screen shot. The rviz is showing the joint angles published by the ros2-bridge and I also turned on the ‘rmpflow.visualize_collision_spheres()’, which is the green spheres. As you can see there don’t align with the joint positions of the robot. which is created with “robot = world.scene.add(Robot(prim_path=”/World/humanoid", name=“humanoid_base”))"

Is there a simple fix to solve this e.g. to reverse the joint angle direct in isaac sim?

  • Did you use merge fixed joints when importing the URDF? - Yes
  • Can you share a link to the URDF? - I can share the usd + urdf, but would prefer not upload to this forum.

After doing some more testing I found some more info. Which maybe points to a bug.

The teminal print output is the des and joint position. Which are the same, so the desired joint angle is applied correct. But when you compare the joint angle in the terminal to the angle displayed in the there are reversed.

This is the code that I use to print the joint angles.

def print_joints_position(name, position):
    for i in range(0, 11):
        position_temp = f"{position[i]:.2g}"
        if abs(float(position_temp)) < 1e-3:
            position_temp = 0
        print(f"{name[i]}: {position_temp}")

robot = world.scene.add(Robot(prim_path="/World/humanoid", name="humanoid_base"))
print_joints_position(robot.dof_names, robot.get_joint_positions())