@@ -30,13 +30,12 @@ def __call__( # type: ignore
3030 self ,
3131 ip : str ,
3232 control_mode : ControlMode ,
33- robot_cfg : hw .PandaConfig ,
33+ robot_cfg : hw .FR3Config ,
3434 collision_guard : str | PathLike | None = None ,
3535 gripper_cfg : hw .FHConfig | rcs .hand .tilburg_hand .THConfig | None = None ,
3636 camera_set : HardwareCameraSet | None = None ,
3737 max_relative_movement : float | tuple [float , float ] | None = None ,
3838 relative_to : RelativeTo = RelativeTo .LAST_STEP ,
39- urdf_path : str | PathLike | None = None ,
4039 ) -> gym .Env :
4140 """
4241 Creates a hardware environment for the Panda robot.
@@ -55,16 +54,19 @@ def __call__( # type: ignore
5554 translational movement in meters. If tuple, it restricts both translational (in meters) and rotational
5655 (in radians) movements. If None, no restriction is applied.
5756 relative_to (RelativeTo): Specifies whether the movement is relative to a configured origin or the last step.
58- urdf_path (str | PathLike | None): Path to the URDF file. If None the included one is used. A URDF file is needed for collision guarding.
5957
6058 Returns:
6159 gym.Env: The configured hardware environment for the Panda robot.
6260 """
63- if urdf_path is None :
64- urdf_path = rcs .scenes ["Panda_empty_world" ].urdf
65- ik = rcs .common .RL (str (urdf_path )) if urdf_path is not None else None
66- robot = hw .Panda (ip , ik )
67- robot .set_parameters (robot_cfg )
61+ ik = rcs .common .Pin (
62+ robot_cfg .kinematic_model_path ,
63+ robot_cfg .attachment_site ,
64+ urdf = robot_cfg .kinematic_model_path .endswith (".urdf" ),
65+ )
66+ # ik = rcs_robotics_library._core.rl.RoboticsLibraryIK(robot_cfg.kinematic_model_path)
67+
68+ robot = hw .FR3 (ip , ik )
69+ robot .set_config (robot_cfg )
6870
6971 env : gym .Env = RobotEnv (
7072 robot , ControlMode .JOINTS if collision_guard is not None else control_mode , home_on_reset = True
@@ -107,20 +109,24 @@ class RCSPandaMultiEnvCreator(RCSHardwareEnvCreator):
107109 def __call__ ( # type: ignore
108110 ips : list [str ],
109111 control_mode : ControlMode ,
110- robot_cfg : hw .PandaConfig ,
112+ robot_cfg : hw .FR3Config ,
111113 gripper_cfg : hw .FHConfig | None = None ,
112114 camera_set : HardwareCameraSet | None = None ,
113115 max_relative_movement : float | tuple [float , float ] | None = None ,
114116 relative_to : RelativeTo = RelativeTo .LAST_STEP ,
115- urdf_path : str | PathLike | None = None ,
116117 ) -> gym .Env :
117118
118- urdf_path = rcs .scenes ["panda_empty_world" ].urdf
119- ik = rcs .common .RL (str (urdf_path )) if urdf_path is not None else None
120- robots : dict [str , hw .Panda ] = {}
119+ ik = rcs .common .Pin (
120+ robot_cfg .kinematic_model_path ,
121+ robot_cfg .attachment_site ,
122+ urdf = robot_cfg .kinematic_model_path .endswith (".urdf" ),
123+ )
124+ # ik = rcs_robotics_library._core.rl.RoboticsLibraryIK(robot_cfg.kinematic_model_path)
125+
126+ robots : dict [str , hw .FR3 ] = {}
121127 for ip in ips :
122- robots [ip ] = hw .Panda (ip , ik )
123- robots [ip ].set_parameters (robot_cfg )
128+ robots [ip ] = hw .FR3 (ip , ik )
129+ robots [ip ].set_config (robot_cfg )
124130
125131 envs = {}
126132 for ip in ips :
0 commit comments