cuMotion: cspace_distance_weight shape does not match retract_config

Topic Description

Detailed Description

I’m currently trying to launch cumotion_planner_node within isaac_ros_cumotion with the parameters of xrdf and urdf file of a kuka manipulator. I exported the XRDF files from Isaac Sim. And I run this node by following this tutorial([isaac_ros_cumotion_moveit — isaac_ros_docs documentation])

When I execute step 7 in the picture above. I have come across the following issue. The terminal reports: cspace_distance_weight shape does not match retract_config.
I am not clear if it is because of the configuration of my xrdf file. And I have checked again and again. I have not found anything wrong.

Error Messages

The terminal reports:

admin@CNSH2SVD8RPK7W3-wsl:/workspaces/isaac_ros-dev$ ros2 run isaac_ros_cumotion cumotion_planner_node --ros-args -p robot:=/workspaces/isaac_ros-dev/src/kr6r700_moveit_config/config/kuka_kr6r700sixx.xrdf -p urdf_path:=/workspaces/isaac_ros-dev/src/kr6r700_moveit_config/config/kuka_kr6r700sixx_isaac.urdf
[INFO] [1736763149.045649540] [cumotion_action_server]: Loading grid position and dims from grid_center_m and grid_size_m parameters.
[ERROR] [curobo] cspace_distance_weight shape does not match retract_config
NoneType: None
Traceback (most recent call last):
  File "/opt/ros/humble/lib/isaac_ros_cumotion/cumotion_planner_node", line 33, in <module>
    sys.exit(load_entry_point('isaac-ros-cumotion==3.0.0', 'console_scripts', 'cumotion_planner_node')())
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 871, in main
    cumotion_action_server = CumotionActionServer()
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 261, in __init__
    self.load_motion_gen()
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 318, in load_motion_gen
    motion_gen_config = MotionGenConfig.load_from_robot_config(
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/wrap/reacher/motion_gen.py", line 602, in load_from_robot_config
    robot_cfg = RobotConfig.from_dict(robot_cfg, tensor_args)
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/types/robot.py", line 51, in from_dict
    CudaRobotGeneratorConfig(**data_dict_in["kinematics"], tensor_args=tensor_args)
  File "<string>", line 34, in __init__
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/cuda_robot_model/cuda_robot_generator.py", line 237, in __post_init__
    self.cspace = CSpaceConfig(**self.cspace, tensor_args=self.tensor_args)
  File "<string>", line 14, in __init__
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/cuda_robot_model/types.py", line 247, in __post_init__
    log_error("cspace_distance_weight shape does not match retract_config")
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/util/logger.py", line 103, in log_error
    raise ValueError(txt)
ValueError: cspace_distance_weight shape does not match retract_config
[ros2run]: Process exited with failure 1

xrdf file

format: "xrdf"

format_version: 1.0

modifiers:
   - set_base_frame: "base_link"

default_joint_positions: 
  joint_a1: 0.0
  joint_a2: 0.0
  joint_a3: -0.0
  joint_a4: 0.0
  joint_a5: -0.0
  joint_a6: -0.0

cspace: 
  joint_names: 
    - "joint_a1"
    - "Joint_a2"
    - "joint_a3"
    - "joint_a4"
    - "joint_a5"
    - "joint_a6"
  acceleration_limits: [18.87, 5.49, 11.4, 109.71, 86.94, 183.44]
  jerk_limits: [5166.67, 4692.70, 2263.70, 1357.77, 1114.88, 759.95]
  
  
tool_frames: ["tool0"]

collision: 
  geometry: "auto_generated_collision_sphere_group"
  buffer_distance:
    link_1: 0.005
    link_2: 0.005
    link_3: 0.005
    link_4: 0.005
    link_5: 0.005
    link_6: 0.005

self_collision: 
  geometry: "auto_generated_collision_sphere_group"
  buffer_distance:
    link_1: 0.005
    link_2: 0.005
    link_3: 0.005
    link_4: 0.005
    link_5: 0.005
    link_6: 0.005  
  ignore: 
    base_link: 
      - "base"
      - "link_1"
    link_1: 
      - "link_2"
    link_2: 
      - "link_3"
    link_3: 
      - "link_4"
    link_4: 
      - "link_5"
    link_5: 
      - "link_6"
    link_6: 
      - "flange"
    flange: 
      - "tool0"
    base: 
      - "link_1"

geometry: 
  auto_generated_collision_sphere_group: 
    spheres: 
      link_1: 
        - center: [0.0, 0.0, -0.077]
          radius: 0.14
        - center: [0.0, 0.0, 0.009]
          radius: 0.14
        - center: [0.0, 0.0, -0.034]
          radius: 0.14
        - center: [0.0, 0.016, 0.0]
          radius: 0.15
        - center: [0.0, -0.011, 0.0]
          radius: 0.15
      link_2: 
        - center: [0.098, 0.0, 0.0]
          radius: 0.1
        - center: [0.222, 0.0, 0.0]
          radius: 0.12
        - center: [0.288, 0.0, 0.0]
          radius: 0.12
        - center: [0.315, 0.0, 0.0]
          radius: 0.13
        - center: [0.127, 0.0, 0.0]
          radius: 0.1047
        - center: [0.157, 0.0, 0.0]
          radius: 0.1095
      link_4: 
        - center: [0.123, 0.005, -0.0]
          radius: 0.07
      link_5: 
        - center: [0.044, -0.0, -0.0]
          radius: 0.05

urdf file

<?xml version="1.0" ?>
<robot name="kuka_kr6r700sixx">
  <link name="base_link">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_supportmeshes/kr6_agilus/visual/base_link.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.5058823529411764 0.47058823529411764 0.38823529411764707 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/collision/base_link.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="link_1">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.05" iyz="0.0" izz="0.05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/visual/link_1.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.9647058823529412 0.47058823529411764 0.1568627450980392 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/collision/link_1.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="link_2">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.05" ixy="0.0" ixz="0.0" iyy="0.05" iyz="0.0" izz="0.05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6r700sixx/visual/link_2.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.9647058823529412 0.47058823529411764 0.1568627450980392 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6r700sixx/collision/link_2.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="link_3">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.05" ixy="0.0" ixz="0.0" iyy="0.05" iyz="0.0" izz="0.05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/visual/link_3.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.9647058823529412 0.47058823529411764 0.1568627450980392 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/collision/link_3.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="link_4">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.05" ixy="0.0" ixz="0.0" iyy="0.05" iyz="0.0" izz="0.05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6r700sixx/visual/link_4.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.9647058823529412 0.47058823529411764 0.1568627450980392 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6r700sixx/collision/link_4.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="link_5">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.05" ixy="0.0" ixz="0.0" iyy="0.05" iyz="0.0" izz="0.05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/visual/link_5.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.9647058823529412 0.47058823529411764 0.1568627450980392 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/collision/link_5.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="link_6">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.05" ixy="0.0" ixz="0.0" iyy="0.05" iyz="0.0" izz="0.05"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/visual/link_6.dae"/>
      </geometry>
      <material name="">
        <color rgba="0.5058823529411764 0.47058823529411764 0.38823529411764707 1.0"/>
      </material>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <mesh filename="file://C:/kuka_kr6_support/meshes/kr6_agilus/collision/link_6.stl"/>
      </geometry>
    </collision>
  </link>
  <link name="flange">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.000"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
  </link>
   <link name="tool0">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.0"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
  </link>
  <link name="base">
    <inertial>
      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="0.0"/>
      <inertia ixx="0.2" ixy="0.0" ixz="0.0" iyy="0.2" iyz="0.0" izz="0.2"/>
    </inertial>
  </link>
  <joint name="joint_a1" type="revolute">
    <origin rpy="0 0 0" xyz="0 0 0.4"/>
    <parent link="base_link"/>
    <child link="link_1"/>
    <axis xyz="0 0 -1"/>
    <limit effort="0" lower="-2.9670597283903604" upper="2.9670597283903604" velocity="6.283185307179586"/>
  </joint>
  <joint name="joint_a2" type="revolute">
    <origin rpy="0 0 0" xyz="0.025 0 0"/>
    <parent link="link_1"/>
    <child link="link_2"/>
    <axis xyz="0 1 0"/>
    <limit effort="0" lower="-3.3161255787892263" upper="0.7853981633974483" velocity="5.235987755982989"/>
    <initial_position value="-0.8215"/>
  </joint>
  <joint name="joint_a3" type="revolute">
    <origin rpy="0 0 0" xyz="0.315 0 0"/>
    <parent link="link_2"/>
    <child link="link_3"/>
    <axis xyz="0 1 0"/>
    <limit effort="0" lower="-2.0943951023931953" upper="2.722713633111154" velocity="6.283185307179586"/>
    <initial_position value="0.8215"/>
  </joint>
  <joint name="joint_a4" type="revolute">
    <origin rpy="0 0 0" xyz="0 0 0.035"/>
    <parent link="link_3"/>
    <child link="link_4"/>
    <axis xyz="-1 0 0"/>
    <limit effort="0" lower="-3.2288591161895095" upper="3.2288591161895095" velocity="6.649704450098396"/>
  </joint>
  <joint name="joint_a5" type="revolute">
    <origin rpy="0 0 0" xyz="0.365 0 0"/>
    <parent link="link_4"/>
    <child link="link_5"/>
    <axis xyz="0 1 0"/>
    <limit effort="0" lower="-2.0943951023931953" upper="2.0943951023931953" velocity="6.771877497737998"/>
    <initial_position value="0.8215"/>
  </joint>
  <joint name="joint_a6" type="revolute">
    <origin rpy="0 0 0" xyz="0.080 0 0"/>
    <parent link="link_5"/>
    <child link="link_6"/>
    <axis xyz="-1 0 0"/>
    <limit effort="0" lower="-6.1086523819801535" upper="6.1086523819801535" velocity="10.733774899765127"/>
  </joint>
  <joint name="joint_a6-flange" type="fixed">
    <parent link="link_6"/>
    <child link="flange"/>
    <origin rpy="0 1.5707963267948966 0" xyz="0 0 0"/>
  </joint>
  <joint name="base_link-base" type="fixed">
    <origin rpy="0 0 0" xyz="0 0 0"/>
    <parent link="base_link"/>
    <child link="base"/>
  </joint>
  <joint name="flange-tool0" type="fixed">
    <parent link="flange"/>
    <child link="tool0"/>
    <origin rpy="0 0 0" xyz="0 0 0"/>
  </joint>
</robot>

solved

Hi @minghao9847

We made minor updates this month. Was the issue solved itself, or did you make some changes?

Best,
Raffaello

I reconfigured and generated a new xrdf file. And it is then fixed.

1 Like