A gRPC service implemenation for controlling UFACTORY xArm series using the xArm-CPLUS-SDK.
The dependencies are added as subomodules, so when cloning this repository, do:
$ git clone git@github.com:Interactions-HSG/xarm-grpc.git --recursiveThis project implements the following:
xarm-grpc-service: The gRPC service responsible for the Modbus/TCP connection management and packet generation (i.e.,xArmAPIobject) providing thexArmAPIas a service.xarm-commander: A gRPC client implemented as a C++ CLI Tool to run commands on xArms. For further information about thexarm-commandergo to section Tools.
The proto file is defined in proto/xapi.proto based on xarm_api.h.
The following services are specific to the connection management:
Initialize: instantiate axArmAPIobject and connect the server to a xArm specified by the-xoption.Disconnect: close the connection to the xArm.
To use the xarm-grpc-service first install the xArm-PLUS-SDK library:
$ make -C libs/xArm-CPLUS-SDK xarmFollow the gRPC's Quick start guide to install cmake, gRPC, and Protocol Buffers.
The rest of this document assumes you have installed gRPC and Protocol Buffers in ~/.local.
$ mkdir -p cmake/build && cd cmake/build
$ cmake -DCMAKE_PREFIX_PATH=~/.local ../..
$ make -jThe gRPC service can be started using following command:
$ xarm-grpc-service startThen use a gRPC client (e.g., xarm-commander) to send commands to the xArm.
To close the gRPC service run:
$ xarm-grpc-service stopFor further description about usage of the xarm-grpc-service, use -h or --help.
The Tools directory includes available clients for the xarm-grpc-service. Currently, the following clients are implemented:
xarm-commander: A gRPC client implemented as a C++ CLI Tool to run commands on xArms. For further instructions on how to use thexarm-commandersee here.
See CONTRIBUTING.md.
- Iori Mizutani (@iomz)
See here
See LICENSE.