66
77import pyrealsense2 as rs
88import rcsss
9+ import rcsss .control .fr3_desk
910import typer
1011from PIL import Image
1112from rcsss .camera .realsense import RealSenseCameraSet
@@ -113,7 +114,7 @@ def home(
113114):
114115 """Moves the FR3 to home position"""
115116 cfg = read_config_yaml (path )
116- rcsss .desk .home (ip , cfg .hw .username , cfg .hw .password , shut )
117+ rcsss .control . fr3_desk .home (ip , cfg .hw .username , cfg .hw .password , shut )
117118
118119
119120@fr3_app .command ()
@@ -123,7 +124,7 @@ def lock(
123124):
124125 """Locks the robot."""
125126 cfg = read_config_yaml (path )
126- rcsss .desk .lock (ip , cfg .hw .username , cfg .hw .password )
127+ rcsss .control . fr3_desk .lock (ip , cfg .hw .username , cfg .hw .password )
127128
128129
129130@fr3_app .command ()
@@ -133,8 +134,8 @@ def unlock(
133134):
134135 """Prepares the robot by unlocking the joints and putting the robot into the FCI mode."""
135136 cfg = read_config_yaml (path )
136- rcsss .desk .unlock (ip , cfg .hw .username , cfg .hw .password )
137- with rcsss .desk .Desk (ip , cfg .hw .username , cfg .hw .password ) as d :
137+ rcsss .control . fr3_desk .unlock (ip , cfg .hw .username , cfg .hw .password )
138+ with rcsss .control . fr3_desk .Desk (ip , cfg .hw .username , cfg .hw .password ) as d :
138139 d .activate_fci ()
139140
140141
@@ -148,12 +149,14 @@ def fci(
148149 """Puts the robot into FCI mode, optionally unlocks the robot. Waits for ctrl+c to exit."""
149150 cfg = read_config_yaml (path )
150151 try :
151- with rcsss .desk .FCI (rcsss .desk .Desk (ip , cfg .hw .username , cfg .hw .password ), unlock = unlock ):
152+ with rcsss .control .fr3_desk .FCI (
153+ rcsss .control .fr3_desk .Desk (ip , cfg .hw .username , cfg .hw .password ), unlock = unlock
154+ ):
152155 while True :
153156 sleep (1 )
154157 except KeyboardInterrupt :
155158 if shutdown :
156- rcsss .desk .shutdown (ip , cfg .hw .username , cfg .hw .password )
159+ rcsss .control . fr3_desk .shutdown (ip , cfg .hw .username , cfg .hw .password )
157160
158161
159162@fr3_app .command ()
@@ -164,7 +167,7 @@ def guiding_mode(
164167):
165168 """Enables or disables guiding mode."""
166169 cfg = read_config_yaml (path )
167- rcsss .desk .guiding_mode (ip , cfg .hw .username , cfg .hw .password , disable )
170+ rcsss .control . fr3_desk .guiding_mode (ip , cfg .hw .username , cfg .hw .password , disable )
168171
169172
170173@fr3_app .command ()
@@ -174,7 +177,7 @@ def shutdown(
174177):
175178 """Shuts the robot down"""
176179 cfg = read_config_yaml (path )
177- rcsss .desk .shutdown (ip , cfg .hw .username , cfg .hw .password )
180+ rcsss .control . fr3_desk .shutdown (ip , cfg .hw .username , cfg .hw .password )
178181
179182
180183@fr3_app .command ()
@@ -194,7 +197,9 @@ def record(
194197 with ExitStack () as stack :
195198 for r_ip in name2ip .values ():
196199 stack .enter_context (
197- rcsss .desk .Desk .fci (r_ip , username = cfg .hw .username , password = cfg .hw .password , unlock = True )
200+ rcsss .control .fr3_desk .Desk .fci (
201+ r_ip , username = cfg .hw .username , password = cfg .hw .password , unlock = True
202+ )
198203 )
199204
200205 p = PoseList .load (name2ip , lpaths , cfg .hw .urdf_model_path )
@@ -203,7 +208,9 @@ def record(
203208 else :
204209 with ExitStack () as stack :
205210 gms = [
206- rcsss .desk .Desk .guiding_mode (r_ip , username = cfg .hw .username , password = cfg .hw .password , unlock = True )
211+ rcsss .control .fr3_desk .Desk .guiding_mode (
212+ r_ip , username = cfg .hw .username , password = cfg .hw .password , unlock = True
213+ )
207214 for r_ip in name2ip .values ()
208215 ]
209216 for gm in gms :
0 commit comments