Table of Contents |
---|
Revisions
...
2023/07/14: (2.5) Added
validation
argument to UpdateTarget command2023/07/19: (2.5) Added BlockMove + ContinueMove commands (more details to come), also updated CombinedMove with new optional blockMove argument
2023/08/02: (2.5) Updated Move command with a new argument
constraint
.2023/08/09: (2.5) Correction of the preset-switching behavior in a CombinedMove command.
2023/08/10: (2.5) Updated name of HoldMove and ResumeMove commands (prev. block/continue)
2023/08/11: (2.5) Added MultiRobotMove command and updated SetAlternateLocation with a new mode
multirobot
.2023/09/22: (2.5) Replaced Move command argument
constraint
withconstraints
.2023/09/28: (2.5) Add documentation about yaml parsing per RAPID-38095
2023/11/14: (2.6) Added IsOnTarget command
Goal
...
2023/11/29: (2.6) Removed MultiRobotMove command
2023/11/29: (2.6) Added support for roadmap + planning moves to configs
2023/11/29: (2.6) Added Move command optional parameter
roadmap_mode
to define how the robot should use the roadmap + off-roadmap motions for roadmap moves to a pose or joint config2023/11/29: (2.6) Added new Move goal type
route
2023/12/21: (2.6) Added BeginMotionRecording, EndMotionRecording and CancelMotionRecording commands
2024/02/08: (2.6) Clarify that Move Costs sum is not constrained by the api
2024/03/04: (2.6) Added clarifying details to SetAlternateLocation “timeout” parameter
Goal
The ASCII API is a fundamental component of how a user interacts with the Realtime Controller and ultimately controls a robot. In order to effectively complete a task, the user must be able to retrieve information from the Rapidplan Create project, set behavioral characteristics of the robots, and move the robots either following the offline motion plans or with conventional move types.
The 2.0 ASCII API re-implements commands from the 1.x.x version with simplifications, renaming, and overall improvements. Most importantly, the request syntax changed to inline YAML, so that in future 2.x.x versions more functionality can be added while maintaining backwards compatibility. The key value structure will also make messages more readable, and easier to format. Requests can be returned in the same inline YAML format, or the same CSV response type as 1.x.x. versions.
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | If a robot error/fault state occurs for one of the robots in the currently loaded deconfliction group, the Realtime Controller will enter a fault state. Examples of reasons may be: lost connection to a robot due to an E-stop, or the robot entering a fault state due to excessive speed or force. The ClearFaults command will attempt to recover any faults that the OEM controller allows allows to be cleared programmatically, and transition the Controller back into Config mode if possible. It will fail if there are still active, unresolvable faults. If | ||
Response Details | This command will return a single response code as a result value. | ||
Example Request |
| ||
Example Responses |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This function loads an RPC project. A load result will be returned once the process has finished and then RapidPlan will be in configuration mode. | ||
Response Details | This command will return a response code to acknowledge the command has been received.
| ||
Delayed Response Details | Once the load is completed, the system will send a delayed response to indicate the project has finished loading.
| ||
Example Request |
| ||
Example YAML Responses |
| ||
Example CSV Responses |
|
...
Structure |
| ||||
---|---|---|---|---|---|
Argument Description |
| ||||
Function Description | This command is used to define which project is the Default project that will automatically be loaded when RapidPlan powers on or is otherwise not in Operation Mode. Sending a SetDefaultProject command without specifying the | ||||
Response Details | This command will return a response to acknowledge the command has been received and executed successfully. | ||||
Example Request |
or
| ||||
Example YAML Responses |
| ||||
Example CSV Responses |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This command indicates that the project is ready to begin operationAttempts to put the controller into Operation mode. This call is blocking, until all active robots have been connected. Once all participating robots have indicated readiness, return messages will be sent, and subsequent Move calls will be accepted. | ||
Response Details | This command will return a response to acknowledge the command has been received and executed successfully. | ||
Example Request |
| ||
Example YAML Responses |
| ||
Example CSV Responses |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This command will re-activate a robot. After this command, when Connect is called, the activated robot will be connected to, and when in OPERATION mode this robot will be controlled by RTR. | ||
Response Details | This command will return a response to acknowledge the command has been received and executed successfully. | ||
Example Request |
| ||
Example YAML Response |
| ||
Example CSV Response |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This command ‘deactivates’ a robot which means the RTR controller will ignore it when connecting to the robots within a project. Subsequent | ||
Response Details | This command will return a response to acknowledge the command has been received and executed successfully. | ||
Example Request |
| ||
Example YAML Response |
| ||
Example CSV Response |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This command is used to enable and set the alternate location for a robot. With this feature enabled, in the event a Move command fails or is interrupted, the Realtime Controller will not return a response code immediately, and will instead automatically plan to the specified alternate position. Depending on the behavior of complete move the Realtime Controller will either return a response Error code indicating the robot reached the alternate location, or continue to plan to the location that was first specified in the move command. | ||
Response Details | This command will return a response to acknowledge the command has been received and executed successfully. | ||
Example Request |
| ||
Example Responses |
| ||
Example CSV Responses |
|
...
Structure |
| ||||
---|---|---|---|---|---|
Argument Description |
target: target_name or
move_type : [ OPTIONAL ] The type of move the robot will make
A
If a robot's external axes remain fixed during a move, or switch to different setpoint values defined by a target,
Robot pose value plus
external_axis , paths_cost and waypoints_cost should be = 1. 0.
| ||||
Function Description | With this new generic A A A | ||||
Response Details | When a Move request is received, path planning occurs before a response is sent. If a path is found, this command will return a response code to acknowledge the command has been received, the name of the robot that this move is for, and a unique sequence ID for this specific move. If planning fails, an appropriate error code will be returned, and no delayed response will be sent.
| ||||
Delayed Response Details | If a path was found, the system will send a
or, for a
| ||||
Example Request |
| ||||
Example YAML Responses |
| ||||
Example CSV Responses |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This function tells the Realtime Controller to abort planning and motion for the specified robot. After calling this, a robot may be left in an off roadmap location and will require a planning move command. If If a move is canceled mid-motion after a | ||
Response Details | This command will return a response to acknowledge the command has been received and executed successfully. | ||
Example Request |
| ||
Example YAML Responses |
| ||
Example CSV Responses |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | ResumeMove: This command continues robot the through combined or pre-set moves for a defined robot. | ||
Response Details | |||
Example Request | ResumeMove: | ||
Example YAML Responses | ResumeMove: | ||
Example CSV Responses | ResumeMove: |
...
GetTargets
Structure |
|
---|
|
|
|
|
| |
Argument Description |
---|
moves
: An array of move commands for different robots. The move commands must adhere to the Move
command specification.
For now, MultiRobotMoves only support moves of type Roadmap
. At most one move is allowed per robot.
Function Description
MultiRobotMove
allows planning for multiple robots to occur at once if, for instance, you’d like robots to purposefully avoid blocking each other when trying to reach their target destinations. This is compared to normal motions where one robot motion is received at a time and is planned without consideration for what other robots may need to do. Note that normal motions will avoid colliding with other robots but cannot take into account the desired motions of robots whose paths have not yet been planned.
Response Details
The command will return an initial response to indicate that the command has been processed and a collision free path has been found.
A unique sequence number will be included to identify theMultiRobotMove
responses. The response will also include a list of robots that were unable to plan motions if the mode flag indicated that the motion should succeed anyway.
| ||||||
Function Description | This command retrieves the targets for a given robot in a specific preset in the loaded project. The default behavior is to return the targets in the active robot preset, but a different preset can be specified. | |||||
---|---|---|---|---|---|---|
Response Details | This command will return a response code, followed by a comma separated array of the target names. | |||||
Example Request |
|
|
|
|
Delayed Response Details
For every Move
in the MultiRobotMove
, a feedback response will be sent when that robot completes its motion.
Example YAML Responses |
|
---|
|
|
|
|
Example Request
| |||
Example CSV Responses |
|
---|
CreateTarget
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This command creates a target in the active robot preset for the specified robot. The target is created using the robot’s current joint angles. To ensure consistent joint angle readings, the robot must stay stationary while the target is created. Therefore, the controller must be in No connections will be created automatically for the new target. | ||
Response Details | This command will return an acknowledgement with a status code indicating the command was received and executed. | ||
Example Request |
| ||
Example YAML Responses |
|
|
| |||
Example CSV Responses |
|
---|
UpdateTarget
Structure |
|
---|
|
|
|
Example CSV Responses
Code Block |
---|
MultiRobotMove,0,23,1,robot_1,robot_2,robot_3
MultiRobotMoveFeedback,0,robot_2,23
MultiRobotMoveFeedback,0,robot_3,23
MultiRobotMoveFeedback,0,robot_1,23
MultiRobotMoveResult,0,23 |
Example Task Planner integration
The following example shows how MultiRobotMove can be used to resolve a deadlock at runtime.
In the case of a deadlock, normal Move commands will return failure. Using MultiRobotMove combining the targets of the deadlocked robots will resolve the deadlock and move the robots to their targets.
Code Block |
---|
robot_names = ["robA", "robB", "robC"]
target_map = {"robA":[A1,A2,A3,...], "robB":[B1,B2,B3,...], "robC":[C1,C2,C3,...]}
move_failed_robots = []
finish_all_targets = false
while(!finish_all_targets):
if move_failed_robots.empty():
for robot_name in robot_names:
rtr_move_to_target(robot_name, next_targets[robot_name])
if delay_response == succeed:
update_target(robot_name, target_map[robot_name])
else:
move_failed_robots.insert(robot_name)
else:
rtr_multi_robot_move(robot_names, next_targets)
if delay_response == succeed:
update_targets(robot_names, target_map)
move_failed_robots.clear()
finish_all_targets = are_all_targets_finished(next_targets, target_map) |
GetTargets
...
Structure
...
Code Block |
---|
{topic: GetTargets,data: {robot_name: <value>}} |
...
Argument Description
...
robot_name
: Specifies which robot’s targets will be returned.
preset_name
:
Status | ||||
---|---|---|---|---|
|
...
Function Description
...
This command retrieves the targets for a given robot in a specific preset in the loaded project. The default behavior is to return the targets in the active robot preset, but a different preset can be specified.
...
Response Details
...
This command will return a response code, followed by a comma separated array of the target names.
...
Example Request
...
Code Block |
---|
{topic: GetTargets,data: {robot_name: robot_1}} |
...
Example YAML Responses
...
Code Block |
---|
{topic: GetTargets,type: Response,data: {targets:[weld_1,weld_2,weld_3]}} |
...
Example CSV Responses
...
Code Block |
---|
GetTargets,0,3,weld_1,weld_2,weld_3 |
CreateTarget
...
Structure
...
Code Block |
---|
{topic: CreateTarget,data: {target_name: <value>,robot_name: <value>}} |
...
Argument Description
...
target_name
: Specifies the name of the new target to be created.robot_name
: This indicates which robot will be assigned to the new target.
...
Function Description
...
This command creates a target in the active robot preset for the specified robot.
The target is created using the robot’s current joint angles. To ensure consistent joint angle readings, the robot must stay stationary while the target is created. Therefore, the controller must be in CONFIG
mode and the robot state must be connected.
No connections will be created automatically for the new target.
...
Response Details
...
This command will return an acknowledgement with a status code indicating the command was received and executed.
...
Example Request
...
Code Block |
---|
{topic: CreateTarget,data: {target_name: weld5,robot_name: robot_1}} |
...
Example YAML Responses
...
Code Block |
---|
{topic: CreateTarget,type: Response} |
...
Example CSV Responses
...
Code Block |
---|
CreateTarget,0 |
UpdateTarget
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Argument Description |
If
| ||
Function Description | This command updates the specified targets position to be at the specified robot TCP location in its current preset, or using an optional pose value. The target’s new position will be used for all assigned robots. A target’s position will only be updated, if all of its connections remain valid, otherwise the command fails and returns an error code Only one target can be updated at a time. While a target is updating, any subsequent UpdateTarget commands will be rejected. With the | ||
Response Details | This command will return an acknowledgement with a status code indicating the command was received and is being executed. | ||
Delayed Response Details | This command will also return a delayed response when the update has completed or failed. | ||
Example Request |
| ||
Example YAML Responses |
| ||
Example CSV Responses |
|
...
Structure |
| ||
---|---|---|---|
Argument Description |
| ||
Function Description | This command removes a target in the active robot preset for the specified robot. To remove the target, Realtime Controller must be in Removing the target will remove any manually created connections , and any connections created by auto-connect, between this target and other targets. | ||
Response Details | This command will return an acknowledgement with a status code indicating the command was received and executed. | ||
Example Request |
| ||
Example YAML Responses |
| ||
Example CSV Responses |
|
AddConnection
Structure |
| ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Argument Description |
type is set to auto (2 ), autoconnect_name can be specified by the user. If unspecified, a default autoconnect name will be assigned.
| ||||||||||||||||||
Function Description | This command creates new connections within a given roadmap. It can be used to create manual connections or auto-connects. | ||||||||||||||||||
Response Details | This command will return a response code. | ||||||||||||||||||
Delayed Response Details | This command will also return a delayed response only if | ||||||||||||||||||
Example Request |
| Example YAML Responses |
| ||||||||||||||||
Example YAML Responses |
| ||||||||||||||||||
Example CSV Responses |
| ||||||||||||||||||
Example CSV Responses |
|
RemoveConnection
|
RemoveConnection
Structure |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Argument Description |
robot_name is used.
preset is ignored and not checked for validity. | ||||||||||||
Function Description | This command removes connections in the roadmap. It can remove manual connections between two targets or an auto-connect by name. It can only be run in CONFIG mode. | ||||||||||||
Response Details | This command will return a response code. | ||||||||||||
Example Request |
| Argument Description | |||||||||||
Example YAML Responses |
| ||||||||||||
Example CSV Responses |
|
GetJointConfiguration
Structure |
| ||
---|---|---|---|
Argument Description |
|
the name of the robot to |
preset
: Status | ||||
---|---|---|---|---|
|
preset
is ignored and not checked for validityreturn the joint angles for. |
targets
: A list of two targets to remove the manual connection between.
Status | ||||
---|---|---|---|---|
|
robot_name
is used.
| |
Function Description | This command |
---|
retrieves the current joint angles of a specified robot. If the robot has additional axes, they will be included sorted by their driver index. The values will be returned in the client’s units for both revolute and prismatic joints. | |||
Response Details | This command will return a response code, followed by the current joint angles in a comma separated array. This command will always include the robot axes, and by default will include the position of external axes if present. | ||
---|---|---|---|
Example Request |
|
|
|
|
| |||
Example YAML Responses |
|
---|
|
|
| |
Example |
---|
CSV Responses |
|
---|
{topic: RemoveConnection,type: Response}
Example CSV Responses
Code Block |
---|
RemoveConnection,0 |
...
|
GetTCPPose
Structure |
|
---|
|
|
| |
Argument Description |
|
---|
which robot’s TCP pose will be returned. The TCP of the active robot preset will be used.
|
native
: [ OPTIONAL ] This argument, if true
, returns only robot native joint configuration. If false
, full robot joint configuration including external axes is returned. Default value is false
.
with_joint_names
: [ OPTIONAL ] This argument, if true
, specifies the returned names of the robot joints and external joints in the current active robot preset. The returned names are also based on the status of native
.TCP coordinates. Default is
| |
Function Description | This command |
---|
returns the specified robot’s TCP coordinates in the world or user specified frame for the active robot preset. The coordinates are returned in the client’s |
unit and rotation convention. |
Response Details |
---|
This command will return a response |
to acknowledge the command has been received and executed successfully along with the position and rotation of the specified robot’s TCP. | |||
Example Request |
|
---|
|
| |||
Example YAML Responses |
|
---|
|
|
|
| ||
Example CSV Responses |
|
---|
|
GetTCPPose
Structure |
|
---|
IsOnTarget
Structure |
|
---|
Argument Description
robot_name
: Specifies which robot’s TCP pose will be returned. The TCP of the active robot preset will be used.
ref_frame
:
Status | ||||
---|---|---|---|---|
|
world
. The acceptable frames are:<robot_name>_base
: the base frame of the robot as defined in the robot model. This is a reserved frame name in RPC.<robot_name>_default_tcp
: the default tcp as defined in the robot model. This is a reserved frame name in RPC.any user created frame in the RPC project
Function Description
This command returns the specified robot’s TCP coordinates in the world or user specified frame for the active robot preset.
The coordinates are returned in the client’s unit and rotation convention.
Response Details
This command will return a response to acknowledge the command has been received and executed successfully along with the position and rotation of the specified robot’s TCP.
Example Request
| |||
Argument Description |
| ||
---|---|---|---|
Function Description |
| ||
Response Details |
| ||
Example Request |
| ||
Example YAML Responses |
|
|
| |||
Example CSV Responses |
|
---|
BeginRoadmapRecording
Structure |
|
---|---|
Argument Description | |
Function Description |
|
Response Details | |
Example Request | |
Example YAML Responses | |
Example CSV Responses |
Code Block |
---|
GetTCPPose,0,1.0,0.5,0.375,90.0,0.0,0.0 |
IsOnTarget
EndRoadmapRecording
Structure |
|
---|
|
Argument Description |
---|
robot_name
: Specifies which robot to check
target_name
: Specifies which target to check
epsilon
[ OPTIONAL ] : the distance metric to use when determining if the robot is on target.Function Description |
---|
IsOnTarget
|
Response Details
{topic: IsOnTarget, type: Response, data: {on_target: <boolean>}}
Example Request
{topic: IsOnTarget, data: { robot_name: robot1, target_name: target2}}
{topic: IsOnTarget, data: { robot_name: robot2, target_name: target5, epsilon: 0.3}}
Example YAML Responses
Code Block |
---|
{topic: IsOnTarget, type: Response, data: {on_target: true}} |
Example CSV Responses
stop recording motions and save motion data to the project roadmap. This will stop the robot motion, set appliance back to config mode, and automatically start adding the recording targets and edges into the roadmap. | |
Response Details | |
---|---|
Example Request | |
Example YAML Responses | |
Example CSV Responses |
CancelMotionRecording
Structure |
|
---|---|
Argument Description | |
Function Description |
|
Response Details | |
Example Request | |
Example YAML Responses | |
Example CSV Responses |
API Endpoints - Scene Modeling
...