API instructions
Application Programming Interface (API), also known as application Programming interface functions, is a predefined function. When using the following function interface, please import our API library by entering the following code at the beginning, otherwise it will not run successfully
# Examples
from exoskeleton_api import exoskeleton
obj = exoskeleton(port="COM7")
# Get left arm data
l_data = obj.get_data(0)
# Get right arm data
r_data = obj.get_data(1)
print(l_data)
print(r_data)
# Set left arm 1 joint zero
set_zero(0, 1)
# Set the zero point of the right arm 2 joints
set_zero(1, 2)
get_data(arm)
- Function: Get left and right arm data
- Parameter:
- 'arm' : 0 left arm, 1 right arm
- Return value: Angle parameters and hand controller floating point list: [J1, J2, J3, J4, J5, J6, J7, button 1, button 2, joystick x, joystick y]
set_zero(arm, arm_id)
- Function: Set zero
- Parameter:
- 'arm' : 0 left arm, 1 right arm
- 'arm_id' : specifies the id of the joint. The value ranges from int 1 to 7
- Returned value: None
Note : MyController S570 is extremely compatible with all Elephant Robot products, as well as all general purpose 6-7 axis robot arms. Therefore, for different robot arms, there are different API functions, please choose according to the actual model of the robot arm.
1.mycobot280series
2.mycobot320series
3.MyAGVseries
4.Mercuryseries
5.MyArm M750
6.MechArmseries
https://docs.elephantrobotics.com/docs/mecharm-m5-cn/7-ApplicationBasePython/7.2_API_270.html
7.MyBuddy
https://docs.elephantrobotics.com/docs/mybuddy-cn/7-ApplicationBasePython/7.2_API_mybuddy.html