- The current version supports Linux/windows/MacOS(beta), but the source code structure has changed.
- During use, people should stay away from the robot arm to avoid accidental injury or damage to other items by the robot arm.
- Protect the arm before use.
- Before you exercise, please make sure you don't encounter obstacles.
- Protect the arm before unlocking the motor.
-
- Strengthen the code, fix some hidden bugs, and eliminate security risks.
- Supports CMake compilation
- Fix document errors and variable name errors
-
- Change some API names
-
- Added parameter to support get raw data of the Six-axis Force Torque Sensor
- Added an interface to control xArm Gripper G2
- Optimize the interface for controlling BIO Gripper G2
- Extend the get_joint_states interface
-
- Added the Six-axis Force Torque Sensor collision detection related interfaces
- Added support for the new version of BIO Gripper control interface
-
- Fix the 503 interface protocol identification error issue
- Added sync parameters to some gpio interfaces to support immediate execution (requires firmware 2.4.101 or above)
- Added XArmAPIWrapper to C# calls to support simultaneous control of multiple robotic arms
- Added new interface to support obtaining some error information
-
| OLD API NAME | NEW API NAME | SDK VERSION |
|---|---|---|
| set_tgpio_modbus_timeout | set_rs485_timeout | 1.17.1 |
| get_tgpio_modbus_timeout | get_rs485_timeout | 1.17.1 |
| set_tgpio_modbus_baudrate | set_rs485_baudrate | 1.17.1 |
| get_tgpio_modbus_baudrate | get_rs485_baudrate | 1.17.1 |
| getset_tgpio_modbus_data | set_rs485_data | 1.17.1 |
| set_impedance | set_ft_sensor_admittance_parameters | 1.17.0 |
| set_impedance_mbk | set_ft_sensor_admittance_parameters | 1.17.0 |
| set_impedance_config | set_ft_sensor_admittance_parameters | 1.17.0 |
| set_force_control_pid | set_ft_sensor_force_parameters | 1.17.0 |
| config_force_control | set_ft_sensor_force_parameters | 1.17.0 |
| ft_sensor_set_zero | set_ft_sensor_zero | 1.17.0 |
| ft_sensor_iden_load | iden_ft_sensor_load_offset | 1.17.0 |
| ft_sensor_cali_load | set_ft_sensor_load_offset | 1.17.0 |
| ft_sensor_enable | set_ft_sensor_enable | 1.17.0 |
| ft_sensor_app_set | set_ft_sensor_mode | 1.17.0 |
| ft_sensor_app_get | get_ft_sensor_mode | 1.17.0 |
| get_linear_track_registers | get_linear_motor_registers | 1.17.0 |
| get_linear_track_pos | get_linear_motor_pos | 1.17.0 |
| get_linear_track_status | get_linear_motor_status | 1.17.0 |
| get_linear_track_error | get_linear_motor_error | 1.17.0 |
| get_linear_track_is_enabled | get_linear_motor_is_enabled | 1.17.0 |
| get_linear_track_on_zero | get_linear_motor_on_zero | 1.17.0 |
| get_linear_track_sci | get_linear_motor_sci | 1.17.0 |
| get_linear_track_sco | get_linear_motor_sco | 1.17.0 |
| clean_linear_track_error | clean_linear_motor_error | 1.17.0 |
| set_linear_track_enable | set_linear_motor_enable | 1.17.0 |
| set_linear_track_speed | set_linear_motor_speed | 1.17.0 |
| set_linear_track_back_origin | set_linear_motor_back_origin | 1.17.0 |
| set_linear_track_pos | set_linear_motor_pos | 1.17.0 |
| set_linear_track_stop | set_linear_motor_stop | 1.17.0 |
| shutdown_system | system_control | 1.13.6 |
| get_suction_cup | get_vacuum_gripper | 1.8.0 |
| set_suction_cup | set_vacuum_gripper | 1.8.0 |
- CMake 3.5 or newer
- A C++11 compiler
- Linux/macOS:
g++orclang++ - Windows: Visual Studio 2015/2017/2019/2022 with Desktop development for C++
The top-level CMakeLists.txt is written against CMake 3.5 features.
git clone https://github.com/xArm-Developer/xArm-CPLUS-SDK.git
cd xArm-CPLUS-SDKBy default, the current CMake build generates:
- libraries in
build/lib - executables in
build/bin
When building shared libraries, make sure the runtime loader can find build/lib.
Configure and build:
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -jBuild static library instead of shared library:
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
make -jDisable examples:
mkdir -p build
cd build
cmake .. -DXARM_BUILD_EXAMPLES=OFF
make -jRun an example with shared library output:
LD_LIBRARY_PATH=./build/lib ./build/bin/0002-get_property 192.168.1.221Install:
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j
sudo make installConfigure and build:
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -jRun an example with shared library output:
DYLD_LIBRARY_PATH=./build/lib ./build/bin/0002-get_property 192.168.1.221Configure with Visual Studio 2015:
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015" -A x64
cmake --build . --config ReleaseConfigure with Visual Studio 2017:
mkdir build
cd build
cmake .. -G "Visual Studio 15 2017" -A x64
cmake --build . --config ReleaseConfigure with Visual Studio 2019:
mkdir build
cd build
cmake .. -G "Visual Studio 16 2019" -A x64
cmake --build . --config ReleaseIf you use Visual Studio 2022:
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64
cmake --build . --config ReleaseRun an example:
.\build\bin\Release\0002-get_property.exe 192.168.1.221Build the optional C# wrapper:
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64 -DXARM_BUILD_CSHARP_WRAPPER=ON
cmake --build . --config ReleaseThe repository still keeps the original Makefile for Linux-style builds.
Build library:
make xarmBuild all examples:
make testBuild one example:
make test-0002-get_propertyBuild everything:
make clean
makeRun an example with shared library output:
LD_LIBRARY_PATH=./build/lib ./build/bin/0002-get_property 192.168.1.221Install:
sudo make installUninstall:
sudo make uninstall