5.2 API Interface Description
5.2.1 Overview
Elephant robot allow users to control the robot from remote, one way is use
socket. We use tcp protocol to communicate between the client and the robot,
you can send the formated string through tcp to get or set some property/state of
the robot, the format for each function are introduced as bellow.
5.2.2 Socket String format rules
1 get current angles of robot
Socket string format: get_angles()
the return string is formated in key-value pair, the key is the funciton name,
the value is the value from robot, like this: get_angles:[0.174058, 0.520382,
-0.07874, 0.092855, 0.0, 0.030356]. If any error occurred, InvalidAngles()
(defined as [-1.0, -2.0, -3.0, -4.0, -1.0, -1.0]) will be returned.
2 set the angles of robot
Socket string format: set_angles(joint1_angle, joint2_angle, joint3_angle,
joint4_angle, joint5_angle, joint6_angle,speed)
Example: set_angles(10.0,11.0,12.2,12.3,.11.1,16.0,500)
the return string is formated in key-value pair, the key is the funciton name,
the value is the value from robot, like this: set_angles:[ok]. If any error
occurred, you will get set_angles:error_message.
3 set the angle of one joint
Socket string format: set_angle(joint,angle, ,speed)
example: set_angle(J1,50.5,500)
the return string is formated in key-value pair, the key is the funciton name,
the value is the value from robot, like this: set_angle:[ok]. If any error
occurred, you will get set_angle:error_message.
4 get current coordinates of robot
Socket string format: get_coords()
the return string is formated in key-value pair, the key is the funciton name,
the value is the value from robot, like this: get_coords:[0.174058, 0.520382,
-0.07874, 0.092855, 0.0, 0.030356]. If any error occurred, InvalidCoords()
(defined as [-1.0, -2.0, -3.0, -4.0, -1.0, -1.0]) will be returned.
126
Need help?
Do you have a question about the myCobot Pro 600 and is the answer not in the manual?
Questions and answers