|
12 | 12 | import bosdyn.client.lease |
13 | 13 | import bosdyn.client.util |
14 | 14 | import cv2 |
15 | | -import numpy as np |
16 | 15 | from bosdyn.api import ( |
17 | 16 | geometry_pb2, |
18 | 17 | manipulation_api_pb2, |
19 | 18 | robot_state_pb2, |
20 | 19 | ) |
21 | 20 | from bosdyn.client.frame_helpers import ( |
22 | | - ODOM_FRAME_NAME, |
23 | 21 | VISION_FRAME_NAME, |
24 | 22 | get_vision_tform_body, |
25 | 23 | math_helpers, |
26 | 24 | ) |
27 | 25 | from bosdyn.client.robot_command import RobotCommandBuilder, block_until_arm_arrives |
28 | 26 |
|
29 | | -from spot_skills.arm_impedance_control_helpers import ( |
30 | | - apply_force_at_current_position, |
31 | | - get_root_T_ground_body, |
32 | | -) |
33 | 27 | from spot_skills.arm_utils import ( |
34 | 28 | arm_to_carry, |
35 | 29 | arm_to_drop, |
@@ -123,26 +117,26 @@ def object_place(spot, semantic_class="bag", position=None): |
123 | 117 | stow_arm(spot) |
124 | 118 | arm_to_drop(spot) |
125 | 119 |
|
126 | | - odom_T_task = get_root_T_ground_body( |
127 | | - robot_state=spot.get_state(), root_frame_name=ODOM_FRAME_NAME |
128 | | - ) |
129 | | - wr1_T_tool = math_helpers.SE3Pose( |
130 | | - 0.23589, 0, -0.03943, math_helpers.Quat.from_pitch(-np.pi / 2) |
131 | | - ) |
132 | | - force_dir_rt_task = math_helpers.Vec3(0, 0, -1) # adjust downward force here |
133 | | - robot_cmd = apply_force_at_current_position( |
134 | | - force_dir_rt_task_in=force_dir_rt_task, |
135 | | - force_magnitude=8, |
136 | | - robot_state=spot.get_state(), |
137 | | - root_frame_name=ODOM_FRAME_NAME, |
138 | | - root_T_task=odom_T_task, |
139 | | - wr1_T_tool_nom=wr1_T_tool, |
140 | | - ) |
| 120 | + # odom_T_task = get_root_T_ground_body( |
| 121 | + # robot_state=spot.get_state(), root_frame_name=ODOM_FRAME_NAME |
| 122 | + # ) |
| 123 | + # wr1_T_tool = math_helpers.SE3Pose( |
| 124 | + # 0.23589, 0, -0.03943, math_helpers.Quat.from_pitch(-np.pi / 2) |
| 125 | + # ) |
| 126 | + # force_dir_rt_task = math_helpers.Vec3(0, 0, -1) # adjust downward force here |
| 127 | + # robot_cmd = apply_force_at_current_position( |
| 128 | + # force_dir_rt_task_in=force_dir_rt_task, |
| 129 | + # force_magnitude=8, |
| 130 | + # robot_state=spot.get_state(), |
| 131 | + # root_frame_name=ODOM_FRAME_NAME, |
| 132 | + # root_T_task=odom_T_task, |
| 133 | + # wr1_T_tool_nom=wr1_T_tool, |
| 134 | + # ) |
141 | 135 |
|
142 | 136 | # Execute the impedance command |
143 | | - cmd_id = spot.command_client.robot_command(robot_cmd) |
144 | | - spot.robot.logger.info("Impedance command issued") |
145 | | - block_until_arm_arrives(spot.command_client, cmd_id, 10.0) |
| 137 | + # cmd_id = spot.command_client.robot_command(robot_cmd) |
| 138 | + # spot.robot.logger.info("Impedance command issued") |
| 139 | + # block_until_arm_arrives(spot.command_client, cmd_id, 10.0) |
146 | 140 | input("Did impedance work") |
147 | 141 |
|
148 | 142 | open_gripper(spot) |
|
0 commit comments