Error importing URDF for cuRobo when running isaac_ros_cumotion

Hello, I encountered the same error as this post while running isaac_ros_cumotion cumotion_planner_node:
https://forums.developer.nvidia.com/t/error-importing-urdf-for-curobo/301319

My .xrdf file:

format: "xrdf"

format_version: 1.0

default_joint_positions: 
  joint1: -0.0
  joint2: 0.0
  joint3: -0.0
  joint4: -0.0
  joint5: -0.0
  joint6: -0.0
  joint7: 0.0
  EG2_4C2_Joint1: 0.274
  EG2_4C2_Joint2: -0.0
  EG2_4C2_Joint3: -0.0
  EG2_4C2_Joint4: -0.2753
  EG2_4C2_Joint5: 0.0
  EG2_4C2_Joint6: 0.0

cspace: 
  joint_names: 
    - "joint1"
    - "joint2"
    - "joint3"
    - "joint4"
    - "joint5"
    - "joint6"
    - "joint7"
  acceleration_limits: [10, 10, 10, 10, 10, 10, 10]
  jerk_limits: [10000, 10000, 10000, 10000, 10000, 10000, 10000]

tool_frames: ["ee_link"]

collision: 
  geometry: "auto_generated_collision_sphere_group"
  buffer_distance:
    Link1: 0.01
    Link2: 0.01
    Link3: 0.01
    Link4: 0.01
    Link5: 0.01
    Link6: 0.01
    Link7: 0.01

self_collision: 
  geometry: "auto_generated_collision_sphere_group"
  buffer_distance:
    Link1: 0.00
    Link7: 0.00
  ignore: 
    base_link: 
      - "Link1"
    Link1: 
      - "Link2"
    Link2: 
      - "Link3"
    Link3: 
      - "Link4"
    Link4: 
      - "Link5"
    Link5: 
      - "Link6"
    Link6: 
      - "Link7"
    Link7: 
      - "ee_link"
    ee_link: 
      - "EG2_4C2_baselink"
    EG2_4C2_baselink: 
      - "EG2_4C2_Link1"
      - "EG2_4C2_Link2"
      - "EG2_4C2_Link3"
      - "EG2_4C2_Link4"
    EG2_4C2_Link1: 
      - "EG2_4C2_Link5"
      - "EG2_4C2_Link2"
      - "EG2_4C2_Link3"
      - "EG2_4C2_Link4"
    EG2_4C2_Link4: 
      - "EG2_4C2_Link6"
    EG2_4C2_Link2: 
      - "EG2_4C2_Link3"
      - "EG2_4C2_Link4"
    EG2_4C2_Link3: 
      - "EG2_4C2_Link4"

geometry: 
  auto_generated_collision_sphere_group: 
    spheres: 
      base_link: 
        - center: [0.0, 0.0, 0.112]
          radius: 0.03
        - center: [0.0, 0.0, 0.021]
          radius: 0.04
        - center: [0.0, 0.0, 0.084]
          radius: 0.033
        - center: [0.0, 0.0, 0.054]
          radius: 0.0363
      Link1: 
        - center: [-0.0, 0.0, -0.028]
          radius: 0.04
      Link2: 
        - center: [-0.0, 0.001, 0.111]
          radius: 0.04
      Link3: 
        - center: [0.0, 0.0, -0.029]
          radius: 0.04
      Link4: 
        - center: [-0.0, -0.0, 0.096]
          radius: 0.03
      Link5: 
        - center: [0.0, 0.0, -0.018]
          radius: 0.03
      Link6: 
        - center: [0.0, 0.0, 0.083]
          radius: 0.03
      Link7: 
        - center: [-0.0, -0.0, -0.011]
          radius: 0.02

Maybe you can test on your end, I’ve included the modified urdf?

1.urdf.txt (19.9 KB)

The error is as follows:

  File "/ROS2/IsaacSim-ros_workspaces/humble_ws/install/curobo_core/lib/python3.10/site-packages/curobo/cuda_robot_model/cuda_robot_generator.py", line 298, in initialize_tensors
    self._build_kinematics_with_lock_joints(
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/ROS2/IsaacSim-ros_workspaces/humble_ws/install/curobo_core/lib/python3.10/site-packages/curobo/cuda_robot_model/cuda_robot_generator.py", line 525, in _build_kinematics_with_lock_joints
    if "mimic" in joint_data[k]:
KeyError: 'EG2_4C2_Joint1'
[ros2run]: Process exited with failure 1

I will give you my solution to this. I created a much simpler URDF that only had the 7 Dof of the robot arm that I wanted to control and used that with CuRobo. Unfortunately that means the gripper collision mesh isn’t properly working.

Thank you, @bren1, for your support on the other thread. I forwarded your issue to the engineering. I will let you know when it will be fixed.

Best,
Raffaello

Thank you

Thank you