@@ -38,7 +38,6 @@ def __call__( # type: ignore
3838 camera_set : HardwareCameraSet | None = None ,
3939 max_relative_movement : float | tuple [float , float ] | None = None ,
4040 relative_to : RelativeTo = RelativeTo .LAST_STEP ,
41- urdf_path : str | PathLike | None = None ,
4241 ) -> gym .Env :
4342 """
4443 Creates a hardware environment for the FR3 robot.
@@ -55,14 +54,16 @@ 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 FR3 robot.
6260 """
63- if urdf_path is None :
64- urdf_path = rcs .scenes ["fr3_empty_world" ].urdf
65- ik = rcs .common .RL (str (urdf_path )) if urdf_path is not None else None
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)
6667 robot = hw .FR3 (ip , ik )
6768 robot .set_config (robot_cfg )
6869
@@ -111,11 +112,15 @@ def __call__( # type: ignore
111112 camera_set : HardwareCameraSet | None = None ,
112113 max_relative_movement : float | tuple [float , float ] | None = None ,
113114 relative_to : RelativeTo = RelativeTo .LAST_STEP ,
114- urdf_path : str | PathLike | None = None ,
115115 ) -> gym .Env :
116116
117- urdf_path = rcs .scenes ["fr3_empty_world" ].urdf
118- ik = rcs .common .RL (str (urdf_path )) if urdf_path is not None else None
117+ ik = rcs .common .Pin (
118+ robot_cfg .kinematic_model_path ,
119+ robot_cfg .attachment_site ,
120+ urdf = robot_cfg .kinematic_model_path .endswith (".urdf" ),
121+ )
122+ # ik = rcs_robotics_library._core.rl.RoboticsLibraryIK(robot_cfg.kinematic_model_path)
123+
119124 robots : dict [str , hw .FR3 ] = {}
120125 for ip in ips :
121126 robots [ip ] = hw .FR3 (ip , ik )
0 commit comments