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.

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.

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.
... ... ... ...
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.
... ... ... ...
RTDataExchange GetMotionData Empty MotionData Retrieves motion data.
GetControlData Empty ControlData Retrieves control data.
... ... ... ...
Config SetRefFrame Frame Response Sets the reference frame.
GetHomePosition Empty JointPos Retrieves the home position.
SetSpeedRatio Ratio Response Sets the speed ratio.
... ... ... ...

The table briefly summarizes key functionalities, and the complete protobuf file can be downloaded from Neuromeka Github.