S
S
Santiago1052020-05-31 16:40:43
Python
Santiago105, 2020-05-31 16:40:43

What formula is needed for a coordinate that returns alpha?

O7yeiJYfuF0.jpg
I have an xbox kinect that constantly reads my position on the xyz plane, I also have a robot with a motor that should turn the motor depending on the position of my hand, respectively, it will be some kind of variable that will set the speed of the motor and how- then calculated, so I have a question, how can I calculate. In my loop, y gets over, depending on where the hand is now, y takes on constantly different values, depending on which the motor should turn by a certain degree. As I understand it, this question is related to direct / inverse kinematics, but I didn’t figure out what was what at all. The distance from the grip to the lowest position is approximately 20 cm, what formula should be used to calculate the degree of rotation of the motor depending on the position of the hand.

def draw_skeleton_data(pSkelton, index, positions, width = 4):
start = pSkelton.SkeletonPositions[positions[0]]
for position in itertools.islice(positions, 1, None):
next = pSkelton.SkeletonPositions[position.value]
curstart = skeleton_to_depth_image(start, dispInfo.current_w,
dispInfo.current_h)
curend = skeleton_to_depth_image(next, dispInfo.current_w,
dispInfo.current_h)

pygame.draw.line(screen, SKELETON_COLORS[index], curstart, curend,
width)
start = next
# start_list = str(start)
x=start.x
y=start.y
print(y)
z=start.z
w=start.w
if y > 0 and y < 0.1:
sent = sock.sendto( m0, server_address)
elif y < 0:
sent = sock.sendto( m1, server_address)
elif y > 0.1:
sent = sock.sendto( m2, server_address)
s1200

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question