Skip to content

General Extended Joint Configuration expandControl

This interface is used for joint speed loop control, position loop control, and state acquisition of expansion joints.

State acquisition of expansion jointsrm_get_expand_state()

  • Method prototype:
C
int rm_get_expand_state(rm_robot_handle * handle,rm_expand_state_t * state)

Jump to rm_robot_handle and rm_expand_state_t for details of the structure

  • Parameter description:
ParameterTypeDescription
handleInputRobotic arm handle.
stateInputState structure of expansion joints.
  • Return value:
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • Usage demo
C
// Query the state of expansion joints
rm_expand_state_t state;
int result = rm_get_expand_state(robot_handle, &state);

Speed loop control of expansion jointsrm_set_expand_speed()

  • Method prototype:
C
int rm_set_expand_speed(rm_robot_handle * handle,int speed)

Jump to rm_robot_handle for details of the structure

  • Parameter description:
ParameterTypeDescription
handleInputRobotic arm handle.
speedInputSpeed percentage, -100 to 100:
speed<0: Lifting mechanism moves down;
speed>0: Lifting mechanism moves up;
speed=0: Lifting mechanism stops moving;
  • Return value:
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • Usage demo
C
int speed = 50;
ret = rm_set_expand_speed(robot_handle,speed);

Position loop control of expansion jointsrm_set_expand_pos()

  • Method prototype:
C
int rm_set_expand_pos(rm_robot_handle * handle,int speed,int pos,int block)

Jump to rm_robot_handle for details of the structure

  • Parameter description:
ParameterTypeDescription
handleInputRobotic arm handle.
speedInputSpeed percentage, 1 to 100.
posInputExpansion joint angle, in °.
blockInputBlocking settings:
multi-thread mode: 0: non-blocking mode, immediately return after sending commands; 1: blocking mode, return after the robotic arm reaches the target position or the planning fails.
Single-thread mode: 0: non-blocking mode; other values: blocking mode, and timeout period setting according to the movement time, in s.
  • Return value:
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
-4intThe current in-position equipment verification fails, indicating the current in-position equipment is not a dexterous hand.
-5intThe single-thread mode does not receive a return value after the timeout, indicating that the timeout period may be improper.
  • Usage demo
C
// By default, the current thread mode is multi-threading, with the system operating at 20% speed and blocking until it reaches the 200 mm position
int ret;
int target = 200;
int speed = 20;
int block = 1;
ret = rm_set_expand_pos(robot_handle,speed,target,block);