C and C++:
Self-Collision Safety Detection ConfigurationselfCollision The RealMan robotic arm supports self-collision safety detection, which ensures that, when enabled, the various parts of the robotic arm do not collide with each other during processes such as trajectory planning and teaching. Through this interface, the enabling state of self-collision safety detection of robotic arm can be set and read.
Enable/Disable self-collision safety detection rm_set_self_collision_enable()
- Method prototype:
C
int rm_set_self_collision_enable(rm_robot_handle * handle,bool state)Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | Robotic arm handle. |
state | Input | true = enabled, false = disabled. |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
C
// Disable self-collision safety detection
ret = rm_set_self_collision_enable(robot_handle, false);Get the self-collision safety detection enabling state rm_get_self_collision_enable()
- Method prototype:
C
int rm_get_self_collision_enable(rm_robot_handle * handle,bool * state)Jump to rm_robot_handle for details of the structure.
- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | Robotic arm handle. |
state | Output | true = enabled, false = disabled. |
- Return value:
0 represents success. For other error codes, please refer to the API2 Error Codes.
- Usage demo
C
// Query the enabling state of self-collision safety detection
bool state;
ret = rm_get_self_collision_enable(robot_handle, &state);Manual Collision Removal Mode Deactivation Command rm_set_collision_remove_enable
- Method Prototype:
C
int rm_set_collision_remove_enable(rm_robot_handle *handle, bool set_enable);- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | Robotic arm control handle. |
set_enable | Input | true to manually deactivate collision removal, false to cancel deactivation (i.e., restore to default state). |
Jump to rm_robot_handle for details of the structure.
- Return value:
| Parameter | Description |
|---|---|
| 0 | Success. |
| 1 | The controller returns false, indicating incorrect parameter transmission or an error in the robotic arm state. |
| -1 | Data transmission failed due to issues during communication. |
| -2 | Data reception failed due to issues during communication or timeout of the controller (no response received). |
| -3 | Return value parsing failed, as the received data format is incorrect or incomplete. |
- Usage demo
C
//set_collision_remove_enable
bool set_enable = true;
int result = -1;
result = rm_set_collision_remove_enable(handle, set_enable);Get Manual Collision Removal Enable Status rm_get_collision_remove_enable
- Method Prototype:
C
int rm_get_collision_remove_enable(rm_robot_handle *handle, bool *enable_state);- Parameter description:
| Parameter | Type | Description |
|---|---|---|
handle | Input | Robotic arm control handle. |
enable_state | Output | true indicates collision removal is manually deactivated, false indicates normal operation (i.e., default state). |
Jump to rm_robot_handle for details of the structure.
- Return value:
| Parameter | Description |
|---|---|
| 0 | Success. |
| 1 | The controller returns false, indicating incorrect parameter transmission or an error in the robotic arm state. |
| -1 | Data transmission failed due to issues during communication. |
| -2 | Data reception failed due to issues during communication or timeout of the controller (no response received). |
| -3 | Return value parsing failed, as the received data format is incorrect or incomplete. |
- Usage demo
C
//rm_get_collision_remove_enable
bool enable_state;
int result = rm_get_collision_remove_enable(handle, &enable_state);
