Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waveshare Roarm SDK

Python 2.7 Python 3

This is a python API for serial or http communication with waveshare roarm and controlling it.

Series Models Image
RoArm-M2 RoArm-M2-S, RoArm-M2-Pro RoArm-M2
RoArm-M2 RoArm-M2-GA RoArm-M2-GA
RoArm-M3 RoArm-M3-S, RoArm-M3-Pro RoArm-M3

Model mapping:

  • RoArm-M2-S / RoArm-M2-Pro: roarm_type="roarm_m2", gripper_type="angular_direct" (default)
  • RoArm-M2-GA: roarm_type="roarm_m2", gripper_type="angular_gear"
  • RoArm-M3-S / RoArm-M3-Pro: roarm_type="roarm_m3" (single gripper type; gripper_type usually omitted)

Installation

Pip install

pip install roarm-sdk==0.1.1

Source code

git clone https://github.com/waveshareteam/waveshare_roarm_sdk.git <your-path>
cd <your-path>/waveshare_roarm_sdk
# Install
[sudo] python2 setup.py install
# or
[sudo] python3 setup.py install

Usage:

from roarm_sdk.roarm import roarm

# for roarm_m2 Serial communication example
roarm = roarm(roarm_type="roarm_m2", port="/dev/ttyUSB0", baudrate=115200)

# for roarm_m3 Serial communication example
#roarm = roarm(roarm_type="roarm_m3", port="/dev/ttyUSB0", baudrate=115200)

# Optional: gripper type and debug
# gripper_type: "angular_direct" (default, invert gripper) or "angular_gear" (pass-through)
# debug: False (default, no print) or True (print TX/RX data)
# RoArm-M2-GA example:
#roarm = roarm(roarm_type="roarm_m2", port="/dev/ttyUSB0", baudrate=115200, gripper_type="angular_gear", debug=True)

Constructor notes:

  • gripper_type"angular_direct" (default) or "angular_gear". Default keeps legacy invert behavior; angular_gear sends/reads gripper values without invert. Omit it for backward compatibility.
  • RoArm-M2-GA – use roarm_type="roarm_m2" with gripper_type="angular_gear".
  • debugFalse (default) or True. When True, print serial/HTTP payload data.
  • host – HTTP mode is control-only (send commands). Use serial for feedback reads and drag teach.

The demo directory stores some test case files.

You can find out which interfaces roarm_sdk provides in ./doc/README.md.

jaywcjlove/sb jaywcjlove/sb

roarm_m2 api 说明 | roarm_m2 api Description

roarm_m3 api 说明 | roarm_m3 api Description

About

This is a python API for serial or http communication with waveshare roarm and controlling it.

Topics

Resources

Stars

12 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages