Skip to content

Commit a0f4260

Browse files
committed
fix(examples): import of hand example
1 parent f53303d commit a0f4260

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

python/examples/env_cartesian_control_tilburg.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import logging
22

3-
from rcs.control.fr3_desk import FCI, Desk, DummyResourceManager
4-
from rcs.control.utils import load_creds_fr3_desk
5-
from rcs.envs.base import ControlMode, RelativeTo, RobotInstance
6-
from rcs.envs.factories import fr3_hw_env, fr3_sim_env
3+
from rcs.envs.creators import RCSFR3EnvCreator, RCSSimEnvCreator
4+
from rcs._core.common import RobotPlatform
5+
from rcs.control.fr3_desk import FCI, ContextManager, Desk, load_creds_fr3_desk
6+
from rcs.envs.base import ControlMode, RelativeTo
77
from rcs.envs.utils import (
88
default_fr3_hw_robot_cfg,
99
default_fr3_sim_gripper_cfg,
@@ -16,7 +16,7 @@
1616
logger.setLevel(logging.INFO)
1717

1818
ROBOT_IP = "192.168.101.1"
19-
ROBOT_INSTANCE = RobotInstance.SIMULATION
19+
ROBOT_INSTANCE = RobotPlatform.SIMULATION
2020

2121

2222
"""
@@ -43,15 +43,15 @@
4343

4444

4545
def main():
46-
resource_manger: FCI | DummyResourceManager
47-
if ROBOT_INSTANCE == RobotInstance.HARDWARE:
46+
resource_manger: FCI | ContextManager
47+
if ROBOT_INSTANCE == RobotPlatform.HARDWARE:
4848
user, pw = load_creds_fr3_desk()
4949
resource_manger = FCI(Desk(ROBOT_IP, user, pw), unlock=False, lock_when_done=False)
5050
else:
51-
resource_manger = DummyResourceManager()
51+
resource_manger = ContextManager()
5252
with resource_manger:
53-
if ROBOT_INSTANCE == RobotInstance.HARDWARE:
54-
env_rel = fr3_hw_env(
53+
if ROBOT_INSTANCE == RobotPlatform.HARDWARE:
54+
env_rel = RCSFR3EnvCreator(
5555
ip=ROBOT_IP,
5656
control_mode=ControlMode.CARTESIAN_TQuat,
5757
robot_cfg=default_fr3_hw_robot_cfg(),
@@ -61,7 +61,7 @@ def main():
6161
relative_to=RelativeTo.LAST_STEP,
6262
)
6363
else:
64-
env_rel = fr3_sim_env(
64+
env_rel = RCSSimEnvCreator(
6565
control_mode=ControlMode.CARTESIAN_TQuat,
6666
robot_cfg=default_fr3_sim_robot_cfg(),
6767
collision_guard=False,

0 commit comments

Comments
 (0)