@@ -104,7 +104,7 @@ def __call__( # type: ignore
104104
105105class RCSFR3MultiEnvCreator (RCSHardwareEnvCreator ):
106106 def __call__ ( # type: ignore
107- ips : list [ str ],
107+ name2ip : dict [ str , str ],
108108 control_mode : ControlMode ,
109109 robot_cfg : hw .FR3Config ,
110110 gripper_cfg : hw .FHConfig | None = None ,
@@ -121,21 +121,21 @@ def __call__( # type: ignore
121121 # ik = rcs_robotics_library._core.rl.RoboticsLibraryIK(robot_cfg.kinematic_model_path)
122122
123123 robots : dict [str , hw .Franka ] = {}
124- for ip in ips :
125- robots [ip ] = hw .Franka (ip , ik )
126- robots [ip ].set_config (robot_cfg )
124+ for key , ip in name2ip . items () :
125+ robots [key ] = hw .Franka (ip , ik )
126+ robots [key ].set_config (robot_cfg )
127127
128128 envs = {}
129- for ip in ips :
130- env : gym .Env = RobotEnv (robots [ip ], control_mode )
129+ for key , ip in name2ip . items () :
130+ env : gym .Env = RobotEnv (robots [key ], control_mode )
131131 env = FR3HW (env )
132132 if gripper_cfg is not None :
133133 gripper = hw .FrankaHand (ip , gripper_cfg )
134134 env = GripperWrapper (env , gripper , binary = True )
135135
136136 if max_relative_movement is not None :
137137 env = RelativeActionSpace (env , max_mov = max_relative_movement , relative_to = relative_to )
138- envs [ip ] = env
138+ envs [key ] = env
139139
140140 env = MultiRobotWrapper (envs )
141141 if camera_set is not None :
0 commit comments