Spaces:
Running
Running
Francesco Capuano
commited on
Commit
·
8e3c75f
1
Parent(s):
ed39f0d
fix: hardcoding little things then stopping
Browse files
lerobot/scripts/server/robot_client.py
CHANGED
@@ -102,13 +102,14 @@ class RobotClient:
|
|
102 |
server_address: Optional[str] = None,
|
103 |
policy_type: str = "act", # "pi0"
|
104 |
pretrained_name_or_path: str = "fracapuano/act_so100_test", # "lerobot/pi0"
|
105 |
-
policy_device: str = "
|
106 |
):
|
107 |
# Use environment variable if server_address is not provided
|
108 |
if server_address is None:
|
109 |
server_address = os.getenv("SERVER_ADDRESS", "localhost:50051")
|
110 |
logger.info(f"No server address provided, using default address: {server_address}")
|
111 |
|
|
|
112 |
self.policy_config = TinyPolicyConfig(policy_type, pretrained_name_or_path, policy_device)
|
113 |
self.channel = grpc.insecure_channel(server_address)
|
114 |
self.stub = async_inference_pb2_grpc.AsyncInferenceStub(self.channel)
|
@@ -135,7 +136,7 @@ class RobotClient:
|
|
135 |
self.last_action_received_time = 0
|
136 |
|
137 |
start_time = time.time()
|
138 |
-
self.robot = make_robot("so100"
|
139 |
self.robot.connect()
|
140 |
connect_time = time.time()
|
141 |
logger.info(f"Robot connection time: {connect_time - start_time:.4f}s")
|
|
|
102 |
server_address: Optional[str] = None,
|
103 |
policy_type: str = "act", # "pi0"
|
104 |
pretrained_name_or_path: str = "fracapuano/act_so100_test", # "lerobot/pi0"
|
105 |
+
policy_device: str = "cuda",
|
106 |
):
|
107 |
# Use environment variable if server_address is not provided
|
108 |
if server_address is None:
|
109 |
server_address = os.getenv("SERVER_ADDRESS", "localhost:50051")
|
110 |
logger.info(f"No server address provided, using default address: {server_address}")
|
111 |
|
112 |
+
server_address = "172.18.131.21:50051"
|
113 |
self.policy_config = TinyPolicyConfig(policy_type, pretrained_name_or_path, policy_device)
|
114 |
self.channel = grpc.insecure_channel(server_address)
|
115 |
self.stub = async_inference_pb2_grpc.AsyncInferenceStub(self.channel)
|
|
|
136 |
self.last_action_received_time = 0
|
137 |
|
138 |
start_time = time.time()
|
139 |
+
self.robot = make_robot("so100")
|
140 |
self.robot.connect()
|
141 |
connect_time = time.time()
|
142 |
logger.info(f"Robot connection time: {connect_time - start_time:.4f}s")
|