C and C++:
End-Effector Ecosystem Protocol ConfigurationRmPlusConfig Reading of basic and real-time information of end-effector devices supported by the end-effector ecosystem protocol.
Set End-Effector Ecosystem Protocol Mode rm_set_rm_plus_mode()
- Method prototype
int rm_set_rm_plus_mode(rm_robot_handle *handle, int mode)Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | The robot arm handle. |
mode | Input | The end-effector ecosystem protocol mode. 0: Disable protocol, 9600: Enable protocol (baud rate 9600), 115200: Enable protocol (baud rate 115200), 256000: Enable protocol (baud rate 256000), 460800: Enable protocol (baud rate 460800). |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
int mode = 460800;
int ret = rm_set_rm_plus_mode(handle, mode);Query End-Effector Ecosystem Protocol Mode rm_get_rm_plus_mode()
- Method prototype
int rm_get_rm_plus_mode(rm_robot_handle *handle, int *mode)Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | The robot arm handle. |
mode | Output | The end-effector ecosystem protocol mode. 0: Disable protocol, 9600: Enable protocol (baud rate 9600), 115200: Enable protocol (baud rate 115200), 256000: Enable protocol (baud rate 256000), 460800: Enable protocol (baud rate 460800). |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
int mode = 0;
int ret = rm_get_rm_plus_mode(handle, &mode);Set Tactile Sensor Mode (Supported by End-Effector Ecosystem Protocol) rm_set_rm_plus_touch()
- Method prototype
int rm_set_rm_plus_touch(rm_robot_handle *handle, int mode)Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | The robot arm handle. |
mode | Input | The tactile sensor switch status. 0: Disable tactile sensor, 1: Enable tactile sensor (return processed data), 2: Enable tactile sensor (return raw data). |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
int mode = 1;
int ret = rm_set_rm_plus_touch(handle, mode);Get Tactile Sensor Mode (Supported by End-Effector Ecosystem Protocol) rm_get_rm_plus_touch()
- Method prototype
int rm_get_rm_plus_touch(rm_robot_handle *handle, int *mode)Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | The robot arm handle. |
mode | Output | The tactile sensor switch status. 0: Disable tactile sensor, 1: Enable tactile sensor (return processed data), 2: Enable tactile sensor (return raw data). |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
int mode = 0;
int ret = rm_get_rm_plus_touch(handle, &mode);Read End-Effector Basic Information (Supported by End-Effector Ecosystem Protocol) rm_get_rm_plus_base_info()
- Method prototype
int rm_get_rm_plus_base_info(rm_robot_handle *handle, rm_plus_base_info_t *info)Jump to rm_robot_handle and rm_plus_base_info_t for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | The robot arm handle. |
info | Output | The basic information of the end-effector device. |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
rm_robot_handle *handle = NULL;
handle = rm_create_robot_arm("192.168.1.18",8080);
rm_plus_base_info_t baseinfo;
int ret = rm_get_rm_plus_base_info(handle, &baseinfo);Read End-Effector Real-Time Information (Supported by End-Effector Ecosystem Protocol) rm_get_rm_plus_state_info()
- Method prototype
int rm_get_rm_plus_state_info(rm_robot_handle *handle, rm_plus_state_info_t *info)Jump to rm_robot_handle and rm_plus_state_info_t for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | The robot arm handle. |
info | Output | The real-time information of the end-effector device. |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
rm_robot_handle *handle = NULL;
handle = rm_create_robot_arm("192.168.1.18",8080);
rm_plus_state_info_t stateinfo;
int ret = rm_get_rm_plus_state_info(handle, &stateinfo);Set end-effector angle-following control rm_set_hand_follow_angle()
Sets the follow angle with a maximum control frequency of 50Hz.
Dexterous Hand: 6 active degrees of freedom (DoF) — DoF 1 (Thumb flexion), DoF 2 (Index finger), DoF 3 (Middle finger), DoF 4 (Ring finger), DoF 5 (Little finger), DoF 6 (Thumb rotation/opponency).
2-Finger Gripper: 1 active degree of freedom (DoF).
WARNING
To use this feature, please contact technical support to obtain and flash the customized firmware upgrade package for the end-effector tool (dexterous hand/gripper).
- Method prototype:
int rm_set_hand_follow_angle(rm_robot_handle *handle, const int *hand_angle, bool block);Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | Robotic arm handle. |
hand_angle | Input | Sets the angles for the degrees of freedom. When configuring individual finger movements for the dexterous hand, hand_angle represents an array of finger angles controlled according to the definitions specified by the hand manufacturer.For example, dexterous hand angle definitions (Unit: 0.01°): Thumb: 0 ~ 7400; Index Finger: 0 ~ 8500; Middle Finger: 0 ~ 8400; Ring Finger: 0 ~ 8500; Little Finger: 0 ~ 8400; Thumb Yaw/Rotation: 0 ~ 11000 |
block | Input | true: Indicates non-blocking mode, returns after sending successfully. false: Indicates blocking mode, returns after receiving the successful setting command. |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
// High-speed control of the dexterous hand, non-blocking mode
const int angle[6]= {0,100,200,300,400,500};
bool block = true;
ret = rm_set_hand_follow_angle(robot_handle,angle,block);Set end-effector position-following controlrm_set_hand_follow_pos()
Sets the follow position for the end-effector tool with a maximum control frequency of 50Hz.
Dexterous Hand: 6 active degrees of freedom (DoF) — DoF 1 (Thumb flexion), DoF 2 (Index finger), DoF 3 (Middle finger), DoF 4 (Ring finger), DoF 5 (Little finger), DoF 6 (Thumb rotation/opponency).
2-Finger Gripper: 1 active degree of freedom (DoF).
WARNING
To use this feature, please contact technical support to obtain and flash the customized firmware upgrade package for the end-effector tool (dexterous hand/gripper).
- Method prototype:
int rm_set_hand_follow_pos(rm_robot_handle *handle, const int *hand_pos, bool block);Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | Robotic arm handle. |
hand_pos | Input | Sets the positions for the degrees of freedom. When configuring the position for the 2-finger gripper, hand_pos represents an array of DoF positions controlled according to the definitions specified by the gripper manufacturer.For example, 2-finger gripper DoF definitions: Travel Range: 0 ~ 120mm; Actuator Stroke: 0 ~ 12000 |
block | Input | true: Indicates non-blocking mode, returns after sending successfully. false: Indicates blocking mode, returns after receiving the successful setting command. |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
// High-speed control of the dexterous hand, non-blocking mode
const int pos[6]= {0,100,200,300,400,500};
bool block = true;
ret = rm_set_hand_follow_pos(robot_handle,pos,block);
