Specification and Javascript implementation of the queued streaming robot motion interface CRCL-JS, an adapted minimal JSON-based version of CRCL.
There are also two specific implementations:
- a Node-JS specific implementation: CRCL-JS-Node
- a browser version with websockets: CRCL-JS-WS, which needs a socket-websocket-gateway, the CRCLJS-WSAdapter.
The main principle of CRCL-JS is an implemented parallel communication and execution framework on the robot PLC which parses the received CRCL-commands, enqueues them and simultaneously executes them in a FIFO-manner. Every execution triggers multiple status notifications back to the High-Level System, depicted as Decision Making Component in the following figure.
To test the reference implementation run
npm test
- Timon Höbert
A CRCL-Command has the following fields, which can be ordered as follows for simpler parsing:
CRCLCommand
: string - type of command determines the crcl paramsCommandID
: integer - unique positive identifier, incremental- (
Name
) : string - description of the command for humans CRCLParam
: object - additional parameters
Moves the robot to the specified position in the specified manner, either as point to point movement or straight and with a specified blending radius.
Pose
: object - target TCP positionX
, (Y
), (Z
), (A
), (B
), (C
). The angles A,B,C are Euler angles in degrees: Fixed angles X-Y-Z (equivalent to rotating Z-Y'-X'' euler angles, equivalent to Yaw, Pitch, Roll)- (
Straight
) : boolean - if true, TCP stays in line between origin and target position, otherwise arbitrary trajectory (default). - (
Blending
) : float - blending radius in [mm] to blend this movement with the next movement, no blending with 0 (default)
{
"CommandID" : 1,
"Name" : "Move Articulated Robot",
"CRCLCommand" : "MoveTo",
"CRCLParam" : {
"Pose" : {
"X": -60.0,
"Y": 120.0,
"Z": 90.0,
"A": -80.0,
"B": 100.0,
"C": 130.0
},
"Straight" : true
}
}
{
"CommandID" : 2,
"Name" : "Move Cartesian Robot",
"CRCLCommand" : "MoveTo",
"CRCLParam" : {
"Pose" : {
"X" : -60.0,
"Y" : 120.0,
"Z" : 90.0,
"C" : 130.0
},
"Straight" : true,
}
}
{
"CommandID" : 3,
"Name" : "Move Conveyor Belt",
"CRCLCommand" : "MoveTo",
"CRCLParam" : {
"Pose" : {
"X" : 0.0,
},
"Straight" : true,
}
}
Sets the value of the active end-effector, for example, a gripper.
Setting
: float - tool, for example gripper, state between 0.0 and 1.0
{
"CRCLCommand" : "SetEndEffector",
"Name" : "Grasp",
"CommandID" : 4,
"CRCLParam" : {
"Setting" : 0.0
}
}
Changes the active end-effector
ToolID
: integer - id of the tool, for example gripper id
{
"CRCLCommand" : "SetEndEffectorParameters",
"Name" : "Use Tool 7",
"CommandID" : 5,
"CRCLParam" : {
"ToolID" : 7
}
}
Sets the speed value
- (
Relative
) : float - fraction of the maximum translational speed.
{
"CRCLCommand" : "SetTransSpeed",
"Name" : "Set Movement Speed to 50 percent",
"CommandID" : 6,
"CRCLParam" : {
"Relative" : 0.3
}
}
Sets the acceleration value
- (
Relative
) : float - fraction of the maximum translational acceleration.
{
"CRCLCommand" : "SetTransAccel",
"Name" : "Set movement acceleration to 50 percent",
"CommandID" : 7,
"CRCLParam" : {
"Relative" : 0.3
}
}
waits for a specified time
- (
Time
) : float - time im seconds to wait
{
"CRCLCommand" : "Wait",
"Name" : "Wait 0.5s",
"CommandID" : 7,
"CRCLParam" : {
"Time" : 0.5
}
}
Clears the currently enqueued commands.
None.
{
"CRCLCommand" : "Clear",
"Name" : "Clear Queue",
"CommandID" : 8,
"CRCLParam" : {
}
}
The status messages which are sent back to the command sender after each event.
CommandID
: integer - the CommandID of the command which is referenced with this status messageStatusID
: integer - the unique positive status identifier, incrementalCommandState
: string - state description enum:CRCL_Queued
- command sucessfully parsed und put into the queueCRCL_Working
- command startedCRCL_Done
- command finishedCRCL_Error
- command failed
- (
StateDescription
) : string - description of the state for humans
{
"CommandStatus": {
"CommandID": 1,
"StatusID": 1,
"CommandState": "CRCL_Working"
}
}