kg398 / lego_project

Driver code for controlling UR5 arm and peripherals for 4th year project
1 stars 1 forks source link

Issue reading Data from the UR5 #1

Open zarifaziz opened 5 years ago

zarifaziz commented 5 years ago

Hey man, Only opening an issue because I wanted to reach out with a question about the UR5. First of all - your UR5 code is amazing and was very helpful :D !

I'm having trouble reading data from the UR5. When I do the following: msg = s.recv(1024) and print the resulting msg I get the following: b'\x00\x00\x007\x14\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x03\tURControl\x05\x01\x00\x00\x00\x01\x00\x00\x00\x0020-09-2018, 07:45:32\x00\x00\x00\x18\x14\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x01' I can't figure out how to make sense of this data to get the tool position/ joint position of the UR5. Your get_ur_position() function and the way that it decodes the msg doesn't really work for me. Please help. Thanks. I'm using Python3 but that shouldn't make a difference.

zarifaziz commented 5 years ago

I basically wan't to read data from the ur5 and receive information about the joint angles and the tool position. I am connecting to the robot with the following code:

HOST = "192.168.0.10" PORT = 30002 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

s.connect((HOST, PORT))