Skip to content

Commit d22e5e5

Browse files
committed
fix(env): moved close of control thread to hw env
- removed vla script - fixed close control thread in hardware
1 parent 602afe5 commit d22e5e5

3 files changed

Lines changed: 6 additions & 214 deletions

File tree

python/rcsss/control/run_vla.py

Lines changed: 0 additions & 211 deletions
This file was deleted.

python/rcsss/envs/base.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
import gymnasium as gym
99
import numpy as np
10+
from python.rcsss._core.common import Robot
1011
from rcsss import common, sim
11-
from rcsss._core import hw
1212
from rcsss.camera.interface import BaseCameraSet
1313
from rcsss.envs.space_utils import (
1414
ActObsInfoWrapper,
@@ -160,7 +160,7 @@ class FR3Env(gym.Env):
160160
y
161161
"""
162162

163-
def __init__(self, robot: hw.FR3, control_mode: ControlMode):
163+
def __init__(self, robot: Robot, control_mode: ControlMode):
164164
self.robot = robot
165165
self._control_mode_overrides = [control_mode]
166166
self.action_space: gym.spaces.Dict
@@ -255,7 +255,6 @@ def reset(
255255
return self.get_obs(), {}
256256

257257
def close(self):
258-
self.robot.stop_control_thread()
259258
super().close()
260259

261260

python/rcsss/envs/hw.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ def reset(
2929
self, seed: int | None = None, options: dict[str, Any] | None = None
3030
) -> tuple[dict[str, Any], dict[str, Any]]:
3131
return super().reset(seed=seed, options=options)
32+
33+
def close(self):
34+
self.hw_robot.stop_control_thread()
35+
super().close()

0 commit comments

Comments
 (0)