Is there a full documentation of xArm7 CPLUS SDK? I would like to know the detailed explanation on all the functions. The github link does not cover all the details. Please provide the link. Thanks
For example, what do these methods means…
reset … this method is used all the time in the examples. Can I reset without the robot moving to zero position? I have a gripper installed and it will crash. If I don’t issue this command first then the robot would not respond to the move commands the follow.
There are also many other commands that need explaining. such as
set_state… what is sport state? … etc
The following link can view the document of C++ SDK
reset() will let the robot move to zero position, you can use the following methods:
The following is an introduction to states and modes, you can also refer to the user manual - 2.1 Robotic Arm Motion Mode and State Analysis
Thanks. For c++ application, do I need to issue the command every time before when start the robot? I found that if don’t “reset” in the beginning, the robot does not respond to the motion commands after. The robot moves only after the “reset” command was issued. However, this is dangerous for my application as the “reset” command also force the robot to zero position, which is the position that is prohibited in my setting. So my question is, in c++
- Is there a way to be make the robot move without issuing the “reset” command
- or is there a way to “reset” the robot but make it move or other positions instead of “zero position”
Please refer to this program:
#include “xarm/wrapper/xarm_api.h”
int main(int argc, char **argv) {
if (argc < 2) {
printf(“Please enter IP address\n”);
return 0;
}
std::string port(argv[1]);
XArmAPI *arm = new XArmAPI(port);
sleep_milliseconds(500);
if (arm->error_code != 0) arm->clean_error();
if (arm->warn_code != 0) arm->clean_warn();
arm->motion_enable(true);
arm->set_mode(0);
arm->set_state(0);
sleep_milliseconds(500);
printf("=========================================\n");
int ret;
fp32 poses[6][6] = {
{300, 0, 200, 180, 0, 0},
{300, 200, 200, 180, 0, 0},
{500, 200, 200, 180, 0, 0},
{500, -200, 200, 180, 0, 0},
{300, -200, 200, 180, 0, 0},
{300, 0, 200, 180, 0, 0},
};
for (int i = 0; i < 6; i++) {
ret = arm->set_position(poses[i], true);
printf("set_position, ret=%d\n", ret);
}
return 0;
}