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:
Parameter | Type | Description |
---|---|---|
0 | int | Success. |
1 | int | The controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong. |
-1 | int | The data transmission fails, indicating that a problem occurs during the communication. |
-2 | int | The data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout. |
-3 | int | The return value parse fails, indicating that the received data format is incorrect or incomplete. |
- 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:
Parameter | Type | Description |
---|---|---|
0 | int | Success. |
1 | int | The controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong. |
-1 | int | The data transmission fails, indicating that a problem occurs during the communication. |
-2 | int | The data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout. |
-3 | int | The return value parse fails, indicating that the received data format is incorrect or incomplete. |
- Usage demo
C
// Query the enabling state of self-collision safety detection
bool state;
ret = rm_get_self_collision_enable(robot_handle, &state);