Skip to content

IndyDCP3

IndyDCP3 is a remote procedure call (RPC) protocol that utilizes gRPC. It is based on HTTP/2, offering high performance and rapid communication speeds, and features language neutrality, allowing for easy development across various languages. Additionally, it supports bidirectional streaming and asynchronous communication, enabling the implementation of a wide range of applications.

Note

Communication speed may vary depending on the network latency between the client and server, message size, and the system's processing capability. The actual communication speed is determined by the application's requirements and resource limits. For IndyDCP3, the average latency for basic robot state message responses (e.g., receiving joint angles) over a wired network connection is approximately 2ms.

For Python and C++ clients of IndyDCP3, Neuromeka officially provides them, so you can use them directly through the links below. For other development languages, please refer to the rest of the documents in this chapter.

Note

The current public Python / C++ IndyDCP3 client implementation and examples are maintained in the neuromeka-package repository.

Developing IndyDCP3 Client Using Protobuf

In this chapter, we will explain how to implement IndyDCP3 (gRPC) clients in various development languages using Protobuf.

Protobuf

Protocol Buffers (Protobuf) is Google's language-neutral data format for efficiently serializing structured data. gRPC natively uses Protobuf to exchange data between clients and servers.

Installing Protobuf

You can install the Protobuf compiler (protoc) to compile .proto files. Installation instructions for various operating systems are available on the Protocol Buffers GitHub page.

Defining .proto Files

  • Define data structures (message) and service interfaces in .proto files.
  • Messages consist of field types, names, and unique numbers.
  • Services define RPC methods and their request/response message types.
syntax = "proto3";

package example;

// Message definition
message MyMessage {
  int32 id = 1;
  string name = 2;
  repeated string values = 3;
}

// Service definition
service MyService {
  rpc MyMethod(MyMessage) returns (MyMessage);
}

Compiling .proto Files

  • Use the protoc compiler to transform .proto files into code for a specific programming language.
  • Example: protoc --java_out=. my.proto

Implementing a gRPC Client

  • Implement a gRPC client using the generated code.
  • The server implements the defined service interface (IndyDCP3 server), and the client sends requests to the server through this interface.

Exchanging Messages

  • The client sends data to the server using the defined Protobuf message format.
  • The server receives this data, performs the necessary operations, and returns a response to the client.

Additional Resources

This manual introduces the basic concepts and procedures for using gRPC and Protobuf. Actual implementation may involve additional steps and considerations specific to each programming language and framework.

Protobuf for IndyDCP3

Below is a summary of some of the protobuf definitions used by IndyDCP3.

v3.5.0 retains the existing service organization and adds RPCs that identify one arm or end tool in a multi-arm system. For query names ending in For or At, pass the zero-based arm or end-tool index in the Int request. The Python client exposes the corresponding operations as get_*_for(index) or get_*_at(index) helpers.

Service RPC Method Request Message Response Message Description
Control GetControlInfo Empty ControlInfo Retrieves control information of the robot.
MoveJ MoveJReq Response Moves the robot to a specified position in joint space.
MoveJT MoveJTReq Response Moves the robot in joint space within a specified time.
MoveL MoveLReq Response Moves the robot to a specified position in workspace.
MoveLT MoveLTReq Response Moves the robot in workspace within a specified time.
MoveC MoveCReq Response Moves the robot in a circular path in workspace.
MoveCT MoveCTReq Response Moves the robot in a circular path within a specified time.
WaitIO WaitIOReq Response Waits for a specified I/O signal.
WaitTime WaitTimeReq Response Waits for a specified time.
WaitProgress WaitProgressReq Response Waits for progress status.
WaitTraj WaitTrajReq Response Waits until trajectory movement is complete.
WaitRadius WaitRadiusReq Response Waits until movement within a specified radius is complete.
MoveJCond MoveJCondReq Response Moves the robot in joint space conditionally.
JointToTcpTransform JointToTcpTransformReq JointToTcpTransformRes Calculates the joint-to-TCP transform for a selected arm.
ReadTeleOpInputFor Int TeleP Retrieves teleoperation input for a selected arm.
SetTeleCalibArm UInt Response Selects the arm used for teleoperation calibration.
GetTransformedFTSensorDataFor Int TransformedFTSensorData Retrieves transformed F/T data for a selected arm.
... ... ... ...
Device SetBrakes MotorList Response Changes the brake settings of motors.
SetServoAll State Response Sets the state of all servos.
GetDI Empty DigitalList Retrieves the digital input status.
GetDO Empty DigitalList Retrieves the digital output status.
GetEndRS485RxFor Int EndtoolRS485Rx Retrieves RS485 receive data for a selected end tool.
GetEndRS485TxFor Int EndtoolRS485Tx Retrieves RS485 transmit data for a selected end tool.
GetSanderCommandFor Int SanderCommand Retrieves the sander command state for a selected end tool.
GetFTSensorDataFor Int FTSensorData Retrieves F/T sensor data for a selected end tool.
SetConveyorArmIndex Int Response Selects the arm used for conveyor tracking.
GetGripperDataFor Int GripperData Retrieves gripper state for a selected end tool.
... ... ... ...
RTDataExchange GetMotionData Empty MotionData Retrieves motion data.
GetControlData Empty ControlData Retrieves control data.
... ... ... ...
Config SetRefFrame Frame Response Sets the reference frame.
GetRefFrameFor Int Frame Retrieves the reference frame for a selected arm.
GetHomePosition Empty JointPos Retrieves the home position.
SetSpeedRatio Ratio Response Sets the speed ratio.
GetToolPropertyAt Int ToolProperties Retrieves tool properties for a selected arm.
GetFTSensorConfigFor Int FTSensorDevice Retrieves F/T sensor configuration for a selected arm.
... ... ... ...
CRI StartCRIRecord Empty Response Starts CRI reduction-ratio recording for Offline Safetics.
StopCRIRecord Empty Response Stops CRI reduction-ratio recording.
StartCRIPlayback Empty Response Starts playback of recorded CRI reduction ratios.
StopCRIPlayback Empty Response Stops CRI reduction-ratio playback.
GetCRIRecordMode Empty CRIRecordModeState Retrieves the recording or playback state.
TeleOp GetSelfCollisionPairs Empty SelfCollisionPairs Retrieves calculated self-collision pairs; configure behavior with Get/SetSelfCollisionConfig.
SetObstacleInfo ObstacleInfo Empty Sets obstacle information.
GetObstacleInfo ObstacleIndex ObstacleInfo Retrieves one obstacle.
GetCollisionSpheres Empty CollisionSpheresInfo Retrieves collision-sphere information.
ApplyTeleopConstraintBatch ApplyTeleopConstraintBatchRequest Response Applies multiple teleoperation constraints together.
GetTeleopConstraintRuntimeStatus Empty TeleopConstraintRuntimeStatus Retrieves constraint runtime status.
GetDesiredPosition Empty DesiredPosition Retrieves the teleoperation target position.
GetCurrentPosition Empty CurrentPosition Retrieves the current teleoperation position.

The table briefly summarizes key functionalities. Complete protobuf definitions and Python/C++ client examples are available in the Neuromeka Github repository.