66import os
77import tempfile
88import yaml
9- from dataclasses import dataclass , field
109
1110from curobo .geom .sdf .world import CollisionCheckerType
1211from curobo .geom .types import WorldConfig
1312from curobo .util_file import get_robot_configs_path , get_world_configs_path , join_path , load_yaml
1413
1514from isaaclab .utils .assets import ISAACLAB_NUCLEUS_DIR , retrieve_file_path
15+ from isaaclab .utils .configclass import configclass
1616
1717
18- @dataclass
18+ @configclass
1919class CuroboPlannerCfg :
2020 """Configuration for CuRobo motion planner.
2121
@@ -47,17 +47,17 @@ class CuroboPlannerCfg:
4747 """End-effector link name (auto-detected from robot config if None)."""
4848
4949 # Gripper configuration
50- gripper_joint_names : list [str ] = field ( default_factory = list )
50+ gripper_joint_names : list [str ] = []
5151 """Names of gripper joints."""
5252
53- gripper_open_positions : dict [str , float ] = field ( default_factory = dict )
53+ gripper_open_positions : dict [str , float ] = {}
5454 """Open gripper positions for cuRobo to update spheres"""
5555
56- gripper_closed_positions : dict [str , float ] = field ( default_factory = dict )
56+ gripper_closed_positions : dict [str , float ] = {}
5757 """Closed gripper positions for cuRobo to update spheres"""
5858
5959 # Hand link configuration (for contact planning)
60- hand_link_names : list [str ] = field ( default_factory = list )
60+ hand_link_names : list [str ] = []
6161 """Names of hand/finger links to disable during contact planning."""
6262
6363 # Attachment configuration
@@ -69,7 +69,7 @@ class CuroboPlannerCfg:
6969 """CuRobo world configuration file (without path)."""
7070
7171 # Static objects to not update in the world model
72- static_objects : list [str ] = field ( default_factory = list )
72+ static_objects : list [str ] = []
7373 """Names of static objects to not update in the world model."""
7474
7575 # Optional prim path configuration
@@ -92,7 +92,7 @@ class CuroboPlannerCfg:
9292 interpolation_dt : float = 0.05
9393 """Time step for interpolating waypoints."""
9494
95- collision_cache_size : dict [str , int ] = field ( default_factory = lambda : {"obb" : 150 , "mesh" : 150 })
95+ collision_cache_size : dict [str , int ] = {"obb" : 150 , "mesh" : 150 }
9696 """Cache sizes for different collision types."""
9797
9898 trajopt_tsteps : int = 32
@@ -155,7 +155,7 @@ class CuroboPlannerCfg:
155155 collision_spheres_file : str | None = None
156156 """Collision spheres configuration file (auto-detected if None)."""
157157
158- extra_collision_spheres : dict [str , int ] = field ( default_factory = lambda : {"attached_object" : 100 })
158+ extra_collision_spheres : dict [str , int ] = {"attached_object" : 100 }
159159 """Extra collision spheres for attached objects."""
160160
161161 position_threshold : float = 0.005
@@ -213,8 +213,8 @@ def _get_world_config_with_table_adjustment(self) -> WorldConfig:
213213 world_cfg = WorldConfig (cuboid = world_cfg_table .cuboid , mesh = world_cfg_mesh .mesh )
214214 return world_cfg
215215
216- @staticmethod
217- def _create_temp_robot_yaml (base_yaml : str , urdf_path : str ) -> str :
216+ @classmethod
217+ def _create_temp_robot_yaml (cls , base_yaml : str , urdf_path : str ) -> str :
218218 """Create a temporary robot configuration YAML with custom URDF path.
219219
220220 Args:
0 commit comments