Skip to content

Extended IndyDCP

Extended IndyDCP is used when the size of the data is big or the format is complicated.

0800 command can be used for extended IndyDCP. The data of requet frame consists of two 4-byte integer. First data is command id for extended IndyDCP, and second data is total frame size of extended IndyDCP.

Header Command
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID
"NRMK-Indy7" "" 0x00 0x34 20 8 - 800

Data
Extended Command ID
(4 byte)
Extended IndyDCP Frame Length
(4byte Integer)
1 8724

In the extended IndyDCP, after sending the request frame as above, a request frame corresponding to the extended command ID is formed, and data corresponding to the frame size is additionally sent.

When the additional data transfer is finished, IndyDCP server executes the command and sends the response frame. The response frame has same data with requet frame : command ID (4 byte) and extended IndyDCP frame length (4 byte).

Extended Command list

The commands used in extended IndyDCP are listed on table below.

ID Extended Command Data length of requet frame Data length of response frame
1 External Trajectory Move with Binary Data Variable
(Data length)
0
2 External Trajectory Move with Formatted Text Data Variable
(Data length)
0
3 External Trajectory Move with Binary File Variable
fFile path)
0
4 External Trajectory Move with Formatted Text File Variable
(File path)
0
11 Joint Move To WaypointSet Variable
(DOF*8*len)
0
12 Task Move To WaypointSet Variable
(6*8*len)
0

MoveMotion Command with External Trajectory Data

Extended command ID 1~4 is move command with external trajectory data.

External Trajectory Data Format

In order to use external trajectories for controlling Indy robot motion, trajectory data should be matched with format required by the NRMKFramework.

The data can be saved in text or binary and can be used for Indy robot motion by reading the file containing or transmitting via IndyDCP.

The Trajectory data format is as follows.

Header
Trajectory Type Frequency DataSet Num [n] DataSet Size [j] Trajectory Length [i]

Data
DataSet[i][n][0] DataSet[i][n][1] DataSet[i][n][2] ...

The data type of attributes within each header is integer.

  • Trajectory Type : is the type of trajectory data (1 for JointMove and 2 for TaskMove).

  • Frequency : is the real-time task frequency of the currently connected robot. Basically 4000 Hz (except IndyRP2).

  • DataSet Num : is the number of data sets in the trajectory. For example of JointMove trajectory data (Type 1), number is 3, qd (desired position), qdod (desired velocity), qddod (desired acceleration).

  • DataSet Size : is the length of each DataSet. For example of Indy7, since it has 6-DoF, the value is 6.

  • Trajectory Length : is the total length of the trajectory of data. If it is 8000, it means that the robot moves at 4000 Hz for 2 seconds. The maximum value of the trajectory length is 480000.

The data area has each DataSet in order. The type of each data is double. The values in the data area are listed in order, followed by the j-th data in n-th data set of i-th trajectory data. The order is j -> n -> i : in case of JointMove trajectory, joint index (0-5) -> data type(qd, qdotd, qddotd) -> number of data.

For example of type 1 joint trajectory data(6-DoF Indy7, frequency : 4000Hz), the data format is as follows.

Header
Trajectory Type Frequency DataSet Num [n] DataSet Size [j] Trajectory Length [i]
1 4000 3 6 8000

Data
DataSet
[0][0][0]
DataSet
[0][0][1]
DataSet
[0][0][2]
DataSet
[0][0][3]
DataSet
[0][0][4]
DataSet
[0][0][5]
qd[0][0] qd[0][1] qd[0][2] qd[0][3] qd[0][4] qd[0][5]
DataSet
[0][1][0]
DataSet
[0][1][1]
DataSet
[0][1][2]
DataSet
[0][1][3]
DataSet
[0][1][4]
DataSet
[0][1][5]
qdotd[0][0] qdotd[0][1] qdotd[0][2] qdotd[0][3] qdotd[0][4] qdotd[0][5]
DataSet
[0][2][0]
DataSet
[0][2][1]
DataSet
[0][2][2]
DataSet
[0][2][3]
DataSet
[0][2][4]
DataSet
[0][2][5]
qddotd[0][0] qddotd[0][1] qddotd[0][2] qddotd[0][3] qddotd[0][4] qddotd[0][5]
DataSet
[1][0][0]
DataSet
[1][0][1]
DataSet
[1][0][2]
DataSet
[1][0][3]
DataSet
[1][0][4]
DataSet
[1][0][5]
qd[1][0] qd[1][1] qd[1][2] qd[1][3] qd[1][4] qd[1][5]
DataSet
[1][1][0]
DataSet
[1][1][1]
DataSet
[1][1][2]
DataSet
[1][1][3]
DataSet
[1][1][4]
...
qdotd[1][0] qdotd[1][1] qdotd[1][2] qdotd[1][3] qdotd[1][4] ...

Trajectory data can be saved in 2 format (binary and text). In case of binary data, all value of header area is 4 byte integer, and all value of data domain is double 8 byte floating point. For each data, binary value can be listed in order (see example).

For text type, each data is separated by space between each data value. In case task trajectory data with type 2, the data in text format can be saved as follows.


Text-formatted data is more human-friendly, but it needs more capacity than binary data, and it takes longer to set the trajectory because the value must be read and transformed to binary.

Warning

The first data of trajectory should be near to current robot position. If qd is set to (0, 0, 0, 0, 0, 0) when current position is (0, 15, 90, 0, 90, 0), robot need to move very fast to desired position in 0 [s]. It is impossible and robot will stop with emergency error.

Executing Robot Move Motion by Sending Trajectory Data

Extended Command ID 1, 2

This command make robot follow the trajectoy. The id 1 command is for binary trajectoy data and id 2 is for text formatted trajectoy data.

The following example is the request frame for Extended Command 1.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Extended Command ID Extended IndyDCP Frame Length
"NRMK-Indy7" "" 0x00 0x34 21 8 - 800 1 5760020
Extended Frame Data
Binary Type Trajectory Data (5760020-bytes)

The ACK response frame for this request is shown below.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Extended Command ID Extended IndyDCP Frame Length
"NRMK-Indy7" "v2.2.3" 0x02 0x12 21 8 - 800 1 0
Extended Frame Data
None (0 byte); No write

NAK Frame is same as normal IndyDCP. Since command has failed, there's no additional data, and the error code is sent.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Error Code (4-byte)
"NRMK-Indy7" "v2.2.3" 0x02 0x12 21 4 - 9999 9

Execution of robot MoveMotion by sending pile path saving Trajectory Data

Extended Command ID 3, 4

This command send the location of the file in which the trajectory data is stored and make robot follow the stored trajectoy data. Extended command 3 is for the binary file, and 4 is for the text file.

The following example is the request frame for extended command 4.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Extended Command ID Extended IndyDCP Frame Length
"NRMK-Indy7" "" 0x00 0x34 21 8 - 800 4 35
Extended Frame Data
"/home/user/Downloads/test_long.txt\0" (35-byte including NULL characters)

As shown in the example above, a NULL string ("\ 0") must be inserted at the end of the string representing the path. The ACK response frame for this is shown below.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Extended Command ID Extended IndyDCP Frame Length
"NRMK-Indy7" "v2.2.3" 0x02 0x12 21 8 - 800 4 0
Extended Frame Data
None (0 byte); No write

MoveMotion Command by External Trajectory Data

Extended command ID 11-12 are the command that passes a set of external waypoints (JointMove or TaskMove). For example, an example of requesting JointMove with 7 waypoints using extended command 11 is shown below.

Header Command Data
Robot Name Robot Version STEP Info SoF InvokeID Data Length Reserved Command ID Extended Command ID Extended IndyDCP Frame Length
"NRMK-Indy7" "" 0x00 0x34 22 8 - 800 1 336
Extended Frame Data
JointMove Waypoint Set (DOF*8*Waypoint length[7])