@@ -83,9 +83,6 @@ def rotate_robot(robot, rx_offset, ry_offset, acceleration=0.5, velocity=0.5):
83
83
# Rotate the robot around its fixed position by adjusting RX and RY angles
84
84
rotate_robot (ur10_robot , rx_offset = 0.1 , ry_offset = 0.1 )
85
85
86
- # Pause for safety
87
- time .sleep (2 )
88
-
89
86
# Stop the robot
90
87
stop_robot (ur10_robot )
91
88
@@ -130,3 +127,23 @@ def rotate_robot(robot, rx_offset, ry_offset, acceleration=0.5, velocity=0.5):
130
127
131
128
# if GPIO.input(button_pin) == GPIO.LOW:
132
129
# print("do something")
130
+
131
+
132
+
133
+ # extra:
134
+ # # Get the current pose of the robot
135
+ # current_pose = robot.get_pose()
136
+
137
+ # # Extract rotation vector and position from the pose
138
+ # pattern = r"[-+]?\d*\.\d+|\d+"
139
+ # numbers = [float(num) for num in re.findall(pattern, str(current_pose))]
140
+ # rotation_vector = tuple(numbers[:3])
141
+ # position = tuple(numbers[3:6])
142
+ # print("Rotation vector:", rotation_vector)
143
+ # print("Position:", position)
144
+
145
+ # # Convert mm to meters for position
146
+ # px, py, pz = [num * 1000 for num in position]
147
+ # # Assign rotational components
148
+ # rx, ry, rz =rotation_vector
149
+ # print((px, py, pz, rx, ry, rz))
0 commit comments