You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"Calling ManipulatorMoveTo service with request: x={request.target_pose.pose.position.x:.2f}, y={request.target_pose.pose.position.y:.2f}, z={request.target_pose.pose.position.z:.2f}"
returnf"Service call failed for point ({x:.2f}, {y:.2f}, {z:.2f})."
223
+
224
+
ifresponse.success:
225
+
self.connector.logger.info(
226
+
f"End effector successfully positioned at coordinates ({x:.2f}, {y:.2f}, {z:.2f})."
227
+
)
228
+
else:
229
+
self.connector.logger.error(
230
+
f"Failed to position end effector at coordinates ({x:.2f}, {y:.2f}, {z:.2f})."
231
+
)
232
+
return"Failed to position end effector at coordinates ({x:.2f}, {y:.2f}, {z:.2f})."
233
+
234
+
request=ManipulatorMoveTo.Request()
235
+
request.target_pose=pose_stamped1
236
+
237
+
request.initial_gripper_state=False# closed
238
+
request.final_gripper_state=True# open
239
+
240
+
future=client.call_async(request)
241
+
self.connector.node.get_logger().debug(
242
+
f"Calling ManipulatorMoveTo service with request: x={request.target_pose.pose.position.x:.2f}, y={request.target_pose.pose.position.y:.2f}, z={request.target_pose.pose.position.z:.2f}"
returnf"Service call failed for point ({x:.2f}, {y:.2f}, {z:.2f})."
249
+
250
+
ifresponse.success:
251
+
returnf"End effector successfully positioned at coordinates ({x:.2f}, {y:.2f}, {z:.2f}). Note: The status of object interaction (grab/drop) is not confirmed by this movement."
252
+
else:
253
+
returnf"Failed to position end effector at coordinates ({x:.2f}, {y:.2f}, {z:.2f})."
254
+
255
+
130
256
classGetObjectPositionsToolInput(BaseModel):
131
257
object_name: str=Field(
132
258
..., description="The name of the object to get the positions of"
returnf"Centroids of detected {object_name}s in {self.target_frame} frame: [{', '.join(map(self.format_pose, mani_frame_poses))}]. Sizes of the detected objects are unknown."
311
+
312
+
313
+
classResetArmToolInput(BaseModel):
314
+
pass
315
+
316
+
317
+
classResetArmTool(BaseROS2Tool):
318
+
name: str="reset_arm"
319
+
description: str="Reset the arm to the initial position. Use when the arm is stuck or when arm obstructs the objects."
f"Calling ManipulatorMoveTo service with request: x={request.target_pose.pose.position.x:.2f}, y={request.target_pose.pose.position.y:.2f}, z={request.target_pose.pose.position.z:.2f}"
0 commit comments