Skip to content

Commit 9018557

Browse files
authored
Update ur10_control.py
1 parent 4f019d4 commit 9018557

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

ur10_control.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ def rotate_robot(robot, rx_offset, ry_offset, acceleration=0.5, velocity=0.5):
8383
# Rotate the robot around its fixed position by adjusting RX and RY angles
8484
rotate_robot(ur10_robot, rx_offset=0.1, ry_offset=0.1)
8585

86-
# Pause for safety
87-
time.sleep(2)
88-
8986
# Stop the robot
9087
stop_robot(ur10_robot)
9188

@@ -130,3 +127,23 @@ def rotate_robot(robot, rx_offset, ry_offset, acceleration=0.5, velocity=0.5):
130127

131128
# if GPIO.input(button_pin) == GPIO.LOW:
132129
# 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

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy