Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
vinman
vinman release-1.2.2
Latest commit 5292578 Sep 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc release-1.2.2 Sep 6, 2019
example/wrapper release-1.2 Sep 3, 2019
xarm release-1.2.2 Sep 6, 2019
.gitignore release-1.0.0 Jun 11, 2019
LICENSE first commit May 14, 2018
README.md release-1.2.2 Sep 6, 2019
ReleaseNotes.md release-1.2 Sep 3, 2019
requirements.txt release-1.0.0 Jun 11, 2019
setup.py release-1.2.2 Sep 6, 2019

README.md

xArm-Python-SDK

Overview

xArm Python SDK

Caution

  • There is currently no collision detection, so try not to be close during use.
  • 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.

Installation

Install is not necessary, you can run examples without installation.Only Python3 is supported.

  • download

    git clone https://github.com/xArm-Developer/xArm-Python-SDK.git
  • install

    python setup.py install

Doc

Update Summary

  • 1.2.2

    • Fix mechanical claw false positive error
    • Modify the wait logic of a motion instruction
    • Support for blocky code conversion and operation of xArmStudio1.2.2
  • 1.2.0

    • Fix the parameters of the control box GPIO analog signal
    • Support for more Gcode commands
    • Support trajectory recording
    • Support for reduced mode settings
    • Optimize some interfaces and bug fixes
    • Support for blocky code conversion and operation of xArmStudio1.2.0
  • More

Example

Note: Before running the example, please modify the ip value in the robot.conf file to the robot arm you want to control.

  • 0000-template

  • 0001-event_register
  • 0002-get_property
  • 0003-api_get
  • 0004-servo_attach_detach
  • 1001-move_line
  • 1002-move_line
  • 1003-relative_move_line
  • 1004-move_arc_line
  • 1005-move_arc_line
  • 2001-move_joint --> xarm5 --- xarm6 --- xarm7
  • 2002-move_joint --> xarm5 --- xarm6 --- xarm7
  • 2003-move_joint --> xarm5 --- xarm6 --- xarm7
  • 2004-move_joint --> xarm5 --- xarm6 --- xarm7
  • 3001-move_circle
  • 3002-record_trajectory
  • 3003-playback_trajectory
  • 5001-get_tgpio_digital
  • 5002-get_tgpio_analog
  • 5003-set_tgpio_digital
  • 5004-set_gripper
  • 5005-get_cgpio_digital_analog
  • 5006-set_cgpio_dialog_analog
  • 5007-set_cgpio_input_output_function
  • 5008-get_cgpio_state
  • 6001-set_reduced_mode
  • blockly_to_python
  • Import

    from xarm.wrapper import XArmAPI
    arm = XArmAPI('COM5')
    arm = XArmAPI('192.168.1.113')
    arm = XArmAPI('192.168.1.113', do_not_open=False)
    arm = XArmAPI('192.168.1.113', is_radian=False)
  • Connect/Disconnect

    arm.connect(...)
    arm.disconnect()
  • Move

    arm.reset(...)
    arm.set_position(...)
    arm.set_servo_angle(...)
    arm.set_servo_angle_j(...)
    arm.move_gohome(...)
    arm.move_circle(...)
    arm.emergency_stop()
  • Set

    arm.set_servo_attach(...)
    arm.set_servo_detach(...)
    arm.set_state(...)
    arm.set_mode(...)
    arm.motion_enable(...)
    arm.set_pause_time(...)
  • Get

    arm.get_version()
    arm.get_state()
    arm.get_is_moving()
    arm.get_cmdnum()
    arm.get_err_warn_code()
    arm.get_position(...)
    arm.get_servo_angle(...)
  • Setting

    arm.set_tcp_offset(...)
    arm.set_tcp_jerk(...)
    arm.set_tcp_maxacc(...)
    arm.set_joint_jerk(...)
    arm.set_joint_maxacc(...)
    arm.set_tcp_load(...)
    arm.set_collision_sensitivity(...)
    arm.set_teach_sensitivity(...)
    arm.set_gravity_direction(...)
    arm.clean_conf()
    arm.save_conf()
  • Gripper

    arm.set_gripper_enable(...)
    arm.set_gripper_mode(...)
    arm.set_gripper_speed(...)
    arm.set_gripper_position(...)
    arm.get_gripper_position()
    arm.get_gripper_err_code()
    arm.clean_gripper_error()
  • GPIO

    # Tool GPIO
    arm.get_tgpio_digital(...)
    arm.set_tgpio_digital(...)
    arm.get_tgpio_analog(...)
    # Controller GPIO
    arm.get_cgpio_digital(...)
    arm.get_cgpio_analog(...)
    arm.set_cgpio_digital(...)
    arm.set_cgpio_analog(...)
    arm.set_cgpio_digital_input_function(...)
    arm.set_cgpio_digital_output_function(...)
    arm.get_cgpio_state()
  • Other

    arm.set_pause_time(...)
    arm.shutdown_system(...)
    arm.clean_error()
    arm.clean_warn()
  • Register/Release

    arm.register_report_callback(...)
    arm.register_report_location_callback(...)
    arm.register_connect_changed_callback(callback)
    arm.register_state_changed_callback(callback)
    arm.register_mode_changed_callback(callback)
    arm.register_mtable_mtbrake_changed_callback(callback)
    arm.register_error_warn_changed_callback(callback)
    arm.register_cmdnum_changed_callback(callback)
    arm.release_report_callback(callback)
    arm.release_report_location_callback(callback)
    arm.release_connect_changed_callback(callback)
    arm.release_state_changed_callback(callback)
    arm.release_mode_changed_callback(callback)
    arm.release_mtable_mtbrake_changed_callback(callback)
    arm.release_error_warn_changed_callback(callback)
    arm.release_cmdnum_changed_callback(callback)
  • Property

    arm.connected
    arm.default_is_radian
    arm.version
    arm.position
    arm.last_used_position
    arm.tcp_speed_limit
    arm.tcp_acc_limit
    arm.last_used_tcp_speed
    arm.last_used_tcp_acc
    arm.angles
    arm.joint_speed_limit
    arm.joint_acc_limit
    arm.last_used_angles
    arm.last_used_joint_speed
    arm.last_used_joint_acc
    arm.tcp_offset
    arm.state
    arm.mode
    arm.joints_torque
    arm.tcp_load
    arm.collision_sensitivity
    arm.teach_sensitivity
    arm.motor_brake_states
    arm.motor_enable_states
    arm.has_err_warn
    arm.has_error
    arm.has_warn
    arm.error_code
    arm.warn_code
    arm.cmd_num
    arm.device_type
    arm.axis
    arm.gravity_direction
You can’t perform that action at this time.