Skip to content

xArm-Developer/xArm-CPLUS-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xArm-C++-SDK

Overview

  • The current version supports Linux/windows/MacOS(beta), but the source code structure has changed.

Caution

  • 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.

Update Summary

  • 1.17.0

    • Change some API names
  • 1.16.0

    • 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
  • 1.15.0

    • Added the Six-axis Force Torque Sensor collision detection related interfaces
    • Added support for the new version of BIO Gripper control interface
  • 1.14.2

    • 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
  • 1.13.0

    • Compatible with the standard Modbus TCP protocol, providing part of the standard Modbus TCP protocol interface
  • 1.12.2

    • Support partial Task feedback (requires firmware version greater than or equal to v2.1.0)
  • 1.11.6

    • Correct the ambiguity that the set_position_aa interface is true when both relative and is_tool_coord are true. After the correction, when is_tool_coord is true, relative is invalid (previously is_tool_coord was invalid when relative was true)
  • 1.11.5

    • Optimization pause time is too long (wait=true)
    • Add common motion api (Enabled after firmware version 1.11.100)
    • The Cartesian motion-related interface adds the motion_type parameter to determine the planning method (Enabled after firmware version 1.11.100)

API Change List

OLD API NAME NEW API NAME
set_impedance set_ft_sensor_admittance_parameters
set_impedance_mbk set_ft_sensor_admittance_parameters
set_impedance_config set_ft_sensor_admittance_parameters
set_force_control_pid set_ft_sensor_force_parameters
config_force_control set_ft_sensor_force_parameters
ft_sensor_set_zero set_ft_sensor_zero
ft_sensor_iden_load iden_ft_sensor_load_offset
ft_sensor_cali_load set_ft_sensor_load_offset
ft_sensor_enable set_ft_sensor_enable
ft_sensor_app_set set_ft_sensor_mode
ft_sensor_app_get get_ft_sensor_mode
get_linear_track_registers get_linear_motor_registers
get_linear_track_pos get_linear_motor_pos
get_linear_track_status get_linear_motor_status
get_linear_track_error get_linear_motor_error
get_linear_track_is_enabled get_linear_motor_is_enabled
get_linear_track_on_zero get_linear_motor_on_zero
get_linear_track_sci get_linear_motor_sci
get_linear_track_sco get_linear_motor_sco
clean_linear_track_error clean_linear_motor_error
set_linear_track_enable set_linear_motor_enable
set_linear_track_speed set_linear_motor_speed
set_linear_track_back_origin set_linear_motor_back_origin
set_linear_track_pos set_linear_motor_pos
set_linear_track_stop set_linear_motor_stop
get_suction_cup get_vacuum_gripper
set_suction_cup set_vacuum_gripper
shutdown_system system_control

Doc

Linux

  • Get the code:

    git clone https://github.com/xArm-Developer/xArm-CPLUS-SDK.git
    
  • Change directory

    cd ./xArm-CPLUS-SDK/
    
  • Build library:

    make xarm
  • Build all example

    make test
  • Build a example

    make test-0002-get_property # build example/test-0002-get_property.cc
  • Build all (build library and build all example)

    make clean
    make # make xarm && make test
  • Install

    sudo make install
  • Uninstall

    sudo make uninstall
  • Run a example

    ./build/example/0002-get_property 192.168.1.221

Windows

  • Running environment

    It is recommended to run the project with visual studio 2015.Make sure your visual studio 2015 has a visual C++ development environment installed before running.
    
  • Get the code:

    git clone https://github.com/xArm-Developer/xArm-CPLUS-SDK.git
    
  • Change directory

    Change your directory xArm-CPLUS-SDK/visual_studio
    
  • Open project

    If you changed your directory, you can see a visual_studio.sln file. Click this file you will open the project.
    
  • Check the xarm project properties

    Open the xarm property pages and make sure your project configuration is the same as the following screenshot configuration.
    
    VC++ Directories path 
    	$(ProjectDir)..\..\include
    	$(ProjectDir)..\..\src

    image-20191217153415733

    image-20191217152542587

  • Check the example project properties

    Open the example property pages and make sure your project configuration is the same as the following screenshot configuration.
    Example project dependencies and xarm projects so references must be added to run.

    image-20191217154258804

    image-20191217154111439

  • Build project

    Right click example project and build the projiect.If the example project bulid successful you will get a .exe file in you project path.
    
    .exe path like this C:\Users\ufactory\Desktop\xArm-CPLUS-SDK\visual_studio\x64\Debug\0002-get_property.exe

    image-20191217155932743

  • Run project

    You can use cmd run project.  

    image-20191217160911893

  • New project

    If you want to create a new project, you need to pay attention to the dependent path of your new project. 
    You must make sure that the configuration of the project you create is the same as that of the example project.

About

C++ SDK for UFACTORY robots, 850, xArm5/6/7, and Lite6.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published