1111from rcs ._core .common import RobotPlatform
1212from rcs .envs .base import ArmWithGripper , ControlMode , RelativeTo
1313from rcs .sim .sim import Sim
14- from rcs .utils import SimpleFrameRate
1514
1615logger = logging .getLogger (__name__ )
1716
@@ -121,9 +120,6 @@ def _translate_keys(self, actions):
121120 return translated
122121
123122 def environment_step_loop (self ):
124- rate_limiter = SimpleFrameRate (
125- self .env_frequency if self .robot_platform == RobotPlatform .HARDWARE else None , "env loop"
126- )
127123
128124 # 0. Initial Reset to get current positions for untracked robots
129125 self ._last_obs , _ = self .env .reset ()
@@ -180,7 +176,6 @@ def environment_step_loop(self):
180176
181177 self ._last_obs , _ , _ , _ , _ = self .env .step (hold_actions )
182178 self .operator .set_camera (self ._last_obs )
183- rate_limiter ()
184179 continue
185180
186181 for controller in cmds .reset_origin_to_current :
@@ -202,11 +197,8 @@ def environment_step_loop(self):
202197 self ._last_obs , _ , _ , _ , _ = self .env .step (actions )
203198 self .operator .set_camera (self ._last_obs )
204199
205- rate_limiter ()
206-
207200 def sync_robot_to_operator (self , duration : float = 3.0 ):
208201 print (f"Command: Syncing robot to operator (duration: { duration } s)..." )
209- rate_limiter = SimpleFrameRate (self .env_frequency , "sync loop" )
210202 num_steps = int (duration * self .env_frequency )
211203
212204 # 1. Capture the initial state for interpolation
@@ -239,6 +231,5 @@ def sync_robot_to_operator(self, duration: float = 3.0):
239231
240232 self ._last_obs , _ , _ , _ , _ = self .env .step (interp_actions )
241233 self .operator .set_camera (self ._last_obs )
242- rate_limiter ()
243234
244235 print ("Sync Complete." )
0 commit comments