2.2 Realtime Robotics RapidPlan ASCII API

Revisions

  • 2022/03/14: Initial 2.0 API documentation; motion and setup commands.

  • 2022/03/21: Preset name argument added to Move and Combined move. Collision checking against DSM has been moved to an explicit new argument in Move command. Combined move structure row clarifications.

  • 2022/03/30: GetTCPPose description added (formerly duplicated GetJointAngles). DSM command descriptions added. Additional desctiption added to SetAlternateLocation’s “mode” argument. Moved SetServos location for better organization.

  • 2022/04/08: SetResponseType and SetUnits can now be stored per IP address rather than per client. Example CSV responses added to DSM commands. Robot Presets and Object states are now stored to disk so project reload will have the last set values. SetInterruptBehavior timeout value is now used as the timeout for the alternate location mode: 0 with complete_move: 1, and mode: 1. UpdateTarget can now optionally re-generate the autoconnects associated with that target.

  • 2022/04/14: Initial RSM command documentation. AddBox description updated to include box origin and offset argument. AddFrame description updated to note that frames are not saved to disk.

  • 2022/04/21: API specs for enabling a subset of a project added (Activate, Deactivate, UpdateInactiveRobotSettings).

  • 2022/04/28: GetRapidSenseStatus now returns the pallet_id if one exists. InspectPallet no longer returns the package_id. QueryClearance argument description and response details corrected to state that the clients active units will be used for the clearance value. Fixed minor typos in AddFrame and InspectInboundPackage.

  • 2022/05/02: InspectInboundPackage now returns the package_orientation. Interlock generation and report commands added.

  • 2022/05/03: InspectPallet now returns the package_id.

  • 2022/05/04: SetUnits and SetResponseType descriptions updated to make it clear that only new connections will be affected by set_ip_default.

  • 2022/05/12: GetTCPPose YAML response corrected, the key is pose, not tcp_pose. CreateTarget CSV response delayed response corrected from CreateTarget to CreateTargetResult. Added a note to the SetRobotPreset description that ReleaseControl must be called first, if the number of axes on the robot is changing. Added to the UpdateTarget description to indicate that auto connect constraints will be maintained at the targets new location. Updated CancelMove description to note that it is only accepted in OPERATION mode.

  • 2022/05/31: Preset argument description updated in Move and CombinedMove. GetJointAngles is being renamed to GetJointConfiguration, but both are supported currently.

  • 2022/06/01: Added acceptable string characters to the formation rules section.

  • 2022/06/08: Added SetMaxLinearSpeed and SetMaxLinearAcceleration descriptions.

  • 2022/06/14: More SetAlternateLocation examples added. Clarified the behavior of the reset flag for SetMaxLinearSpeeds and SetMaxLinearAcceleration.

  • 2022/06/17: Corrected SetMaxLinearAcceleration’s max value.

  • 2022/07/01: Updated spec for Move with supported move type and goal combinations.

  • 2022/08/08: Clarified the effect CancelMove has on queued Move and CombinedMove commands.

  • 2022/08/30: Added OverrideInspectError, ToggleMonitorFaults, Calibrate descriptions.

  • 2022/08/31: Updated Queuing Moves when a robot preset changes. Updated Queuing Moves with smoothing support. Updated Move spec that supports robot preset changes. Updated SetRobotPreset spec.

  • 2022/10/03: Updated spec for DeactivateRobots.

  • 2022/12/03: (2.2)Updated spec for CreateTarget to add a new target without connections.

  • 2022/12/03: (2.2)Added RenameTarget command.

  • 2022/12/03: (2.2)Added RemoveTarget command.

  • 2022/12/03: (2.2)Added AddConnection command.

  • 2022/12/03: (2.2)Added RemoveConnection command.

  • 2022/12/03: (2.2)Updated spec for Move with support for external axes and triggers.

  • 2022/12/03: (2.2)Updated spec for CombinedMove with support for external axes and triggers.

  • 2022/12/03: (2.2)Updated spec for CancelMove with ramp-down speed at a fixed 80%.

  • 2022/12/03: (2.2)Updated spec for SetDefaultProject to clear the default project if project name input is not specified.

  • 2022/12/03: (2.2)Added GetLoadedProject command.

  • 2022/12/03: (2.2)Added GetRobotPresets command.

  • 2022/12/03: (2.2)Updated spec for UserLog with allowed characters in a user log.

  • 2022/12/04: (2.2)Danger/risk of interleaving RTR with non-RTR move commands is documented in the Move command.

  • 2022/12/05: (2.2)GetJointAngles command is deprecated and replaced by GetJointConfiguration.

  • 2022/12/05: (2.2)Added move type and target type support matrix.

  • 2022/12/05: (2.2)Added 2 cautionary statements regarding mixing RTR with non-RTR moves and robot off-roadmap behaviors for Move command.

  • 2022/12/09: (2.2)Added 1 cautionary statement regarding mixing RTR-controlled moves with non-RTR stop commands.

  • 2023/01/04: (2.2)SetServos command is removed.

  • 2023/01/13: (2.2)Move command and queued move smoothing behavior description is updated.

  • 2023/01/18: (2.2)API command string size limit is specified.

  • 2023/01/30: (2.2)Move command trigger behavior description is updated.

  • 2023/03/06: SetRobotPreset command description is updated

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.

API Format

Syntax (Inline YAML 1.2 Spec)

The ASCII strings received by the Realtime Controller will be formatted to adhere to the inline YAML format, for robust parsing. Inline YAML allows the API to use key-value pairs (KVPs). KVPs will be comma delimited, much like the current API, but attaching keys to the values will allow parameters to come in any order. Additionally, there can be multiple optional parameters and any combination of them. If the optional parameters aren’t used, they can simply be omitted and a default value will be used. Another benefit is readability, since now the values in the requests can be identified based on their key.

Command strings will be terminated with CR+LF line endings. The length of the command strings should be less then 2KB. Commands that exceed the 2KB size limit are not forwarded out of the networking layer. They’re simply discarded and the connection is closed.

Requests

Requests sent to the Realtime controller will be formatted according to the inline YAML spec. The function type is set by the topic key and then arguments are passed as key value pairs.

Inline YAML allows the API to be more easily backwards compatible. When arguments are added in the future, they will have a default value, so that existing code will remain functional on newer software versions.

{topic: <value>, type: <value>, id: <value>, data: {key1: value1,...,keyN: valueN}}

topic: The name of the function being requested. Topic values are case insensitive. Eg. GetMode, Move

data: optional The arguments for the specific topic if required. See the detailed topic descriptions below for more information.

type: optional The type of request being sent. The default value is Command and currently that is the only request type.

id: optional A client can provide an id for the message in order to easily match responses to requests. Any id provided in the request, will be returned in the matching responses. The value can be either a string or int. Note: CSV response types omit this field since it is optional.

Formation Rules

All requests made to the Realtime Controller adhere to the following formation rules:

  • The topic values are case insensitive.

  • Any required key must be 100% correct and contain a valid value, otherwise the request is rejected.

  • If an optional key is not specified (either because it was not provided or because the key was malformed) the default value for the key is used.

  • Any optional key that is provided must contain a correct and valid value, otherwise the request is rejected.

  • If irrelevant keys are passed (including malformed optional keys), they are ignored.

  • If a value is valid but out of a range that we specify, the request is rejected.

  • Strings may only contain: numbers, letters, hyphens, and underscores

Boolean Values

When an argument expects a boolean type, the acceptable values are integers or case insensitive strings.

The following are evaluated as True:

  • true (or any capitalized form eg. True, TRUE)

  • 1

The following are evaluated as False:

  • false (or any capitalized form eg. False, FALSE)

  • 0

Responses

Responses can be returned in CSV format for easy parsing, or in YAML format for human readability and programming languages that support it. The CSV responses will follow a fixed order with no optional returns, and therefore are more limited than the YAML response type. For any complex types returned in YAML (like an array), the values will be broken out in the CSV response. See GetJointConfiguration for an example.

The default response type is YAML, but upon establishing a connection, a client can immediately specify CSV response type with the SetResponseType command and never needs to parse YAML.

Responses will include an optional error key if a problem has occurred preventing completion of the request. This key data is a dictionary containing code and msg keys, which provide the numeric code and a text description of the error. Note: CSV responses will always contain the error code, with code 0 indicating success. Subsequent result key value pairs depend on the request command that was received.

Commands can have multiple response types. The type are: Response,Feedback, and DelayedResponse.

  • A Response is always returned and it indicates if the request has executed successfully or not.

  • A DelayedResponse is returned for commands that take time to execute, like a Move or LoadProject. When a Response includes a seq key, that indicates that a DelayedResponse will be returned for that command. Both the immediate and delayed responses will have a globally unique sequence number (referred to as seq) so that the delayed response can be matched to the command it is for.

  • A Feedback response is returned when an intermediate event occurs before the completion of the command. For example, each move segment in a CombinedMove command returns a Feedback response to indicate it’s completion before the CombinedMove completes and returns it’s DelayedResponse.

Immediate Responses:

{topic: <value>, type: Response, id: <value>, error: {code: <value>, msg: <value>}, data: {result1: <value>,...,resultN: <value>}} or in the CSV response, TopicName,code,result1,...,resultN

Feedback Responses:

{topic: <value>,type: Feedback, id: <value>, error: {code: <value>, msg: <value>}, data: {result1: <value>,...,resultN: <value>}} or in the CSV response, TopicNameFeedback,code,result1,...,resultN

Delayed Responses:

topic: The name of the message type. Eg. GetMode, Move

type: The type of response being provided; either Response or DelayedResponse.

data: optional The return arguments for the specific topic. If an error occurs, data will not be returned.

error: optional If an error occurs, the error code and text description will be returned in the YAML format. In the CSV response the code will be returned in every response.

id: optional A client can provide an id for the message in order to easily match responses to requests. If a client provided an id, the same id will be returned in the responses. Note: if the response type is CSV and a id is provided in the request, it will be omitted in all responses due to the no optional returns rule.

Stateful Commands

Commands can now be stateful. Before, a workstate had to be passed in every MOVE command, but now the workcell and robot presets are set, and then subsequent move commands use the active preset.

Commands Stored on Disk

Certain commands are now stored on disk, so when the project is unloaded and reloaded, they hold their previous state. This will reduce the amount of repetitive commands during integration and testing, while also resulting in more predictable behavior.

  • SetDefaultProject

  • SetRobotPreset

  • SetObjectState

  • CreateTarget

  • UpdateTarget

Default Units

Unless set by the SetUnits command, all requests and responses with the Realtime Controller assume millimeters for lengths and degrees for angles.

Move Type and Target Type Support

API support for moves without using external_axes argument:

 

direct

roadmap

planning

 

direct

roadmap

planning

target

>=2.2

>=2.0

>=2.0

config

Not supported

Not supported

Not supported

pose

>=2.0

>=2.0

>=2.2

 

API support for moves using external_axes argument:

 

direct

roadmap

planning

 

direct

roadmap

planning

target

N/A*

N/A*

N/A*

config

Not supported

Not supported

Not supported

pose

>=2.2

>=2.2

>=2.2

*In Rapidplan create, targets are defined by full joint configuration of a robot, including external axes values.

API Endpoints - Project

SetResponseType

Structure

Argument Description

response_type: This indicates which format the Realtime Controller will use when sending responses; either CSV or yaml. The default response type is yaml. The argument can be either case insensitive text or its numeric equivalent.

  • 0 or csv

  • 1 or yaml

set_ip_default: optional This optional boolean argument will store the response type based on the devices IP address rather than for the current socket. All new connections from the IP address will use this response type.

Function Description

This command is used to set the response format of the TCP/IP communication with the Realtime Controller. The Realtime controller stores this response type for each client that is connected to it. This command should be called at the beginning of a program to indicate the format in which the responses should be sent. If this command is not sent, the default response type is yaml.

If the set_ip_default argument is enabled, then all new connections from the IP address will use the specified response type. Existing sockets will be unaffected by this change, until they re-establish a connection.

As long as the IP address has at least one open connection, the settings will persist.

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

SetUnits

Structure

Argument Description

length: This specifies the unit of measure for length. The unit can be specified with a case insensitive string or its corresponding integer value. For example, when a pose is specified this length unit will be used.

  • 0 or m,meter,meters

  • 1 or cm,centimeter,centimeters

  • 2 or mm,millimeter,millimeters

  • 3 or ft,foot,feet,'

  • 4 or in,inch,inches,”

angle: This specifies the unit of measure for angles. The unit can be specified with a case insensitive string or its corresponding integer value. For example, when a robot’s joint angles are set or when a frame’s rotation is specified, this angle unit will be used.

  • 0 or rad,rads,radian,radians

  • 1 or deg,degs,degree,degrees,°

set_ip_default: optional This optional boolean argument will store the unit change based on the devices IP address rather than for the current socket. All new connections from the IP address will use these unit preferences.

Function Description

This command is used to set the unit convention for API calls made to the Realtime controller. On first project load, the default units of millimeters and degrees will be used, and if this command is called, the units will be stored for that specific client. Subsequent loads for that project will use require the client to reinitialize their unit convention.

If the set_ip_default argument is enabled, then all new connections from the IP address will use these unit preferences. Existing sockets will be unaffected by this change, until they re-establish a connection.

As long as the IP address has at least one open connection, the settings will persist.

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

GetMode

Structure

Argument Description

None

Function Description

This command retrieves the current mode of the Realtime Controller.

Response Details

This command will return a response code, followed by the current state of the system.

Example Request

Example YAML Responses

Example CSV Responses

ClearFaults

Structure

Argument Description

None

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, robot entering an E-stopped state, 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 programatically, and transition the Controller back into Config mode if possible. It will fail if there are still active, unresolvable faults.

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

LoadProject

Structure

Argument Description

project_name: The name of the project installed on the control panel that you want to load.

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

GetLoadedProject

Structure

Argument Description

None

Function Description

This command retrieves the currently loaded project on the Realtime Controller.

If a project is not currently loaded, an error code will be returned {code: 3009,msg: PROJECT_NOT_LOADED}

Response Details

This command will return a response code, followed by the currently loaded project or appropriate error code.

Example Request

Example YAML Responses

Example CSV Responses

UnloadProject

Structure

Argument Description

None

Function Description

This command brings the Realtime Controller out of operation mode and unloads the project. Current motions will be cancelled, and no new motion requests will be accepted. Duplicate calls have no effect. Connection to robot controllers will be terminated.

Response Details

This command will return a response to acknowledge the command has been received.

Example Request

Example YAML Responses

Example CSV Responses

SetDefaultProject

Structure

Argument Description

project_name: This indicates which project will be made the default project. if the project name is not specified, the default project is cleared.

Function Description

This command is used to enable and set which project is the Default project that will automatically be loaded when a RapidPlan controller powers on or is otherwise not in Operation Mode.
Once this behavior was enabled, it has to explicitly be disabled for it to not function.

Response Details

This command will return an acknowledgement with a status code indicating the command was received and executed.

  • Responses

    • Success

    • Improper number of arguments

    • Improper argument format

    • Project not found

Example Request

Example Responses

 

EnterOperationMode

Structure

Argument Description

None

Function Description

This command indicates that the project is ready to begin operation. 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. Move calls received previously will be ignored.

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

EnterConfigurationMode

Structure

Argument Description

None

Function Description

This command brings the Realtime Controller out of operation mode back into Config Mode. Current motions will be cancelled, and no new motion requests will be accepted. Duplicate calls have no effect. Connection to robot controllers will be maintained when returning to CONFIG mode.

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

Shutdown

Structure

Argument Description

None

Function Description

This command issues an asynchronous system call, systemctl poweroff -i, which shuts the appliance down, if in Fault or Configuration Mode.
Should the appliance be in operation or in calibration mode, this command will be rejected.

Between this call and the system shutting down, the appliance will be in a “Shutdown” state and refuse any further ASCII commands.
If this system call results in an error, rather than shutting down the following will occur:

  • An additional delayed response will be returned, with the command and error status

  • The controller will enter “Fault”.

Response Details

This command will return a response to acknowledge the command has been received and queued for execution.

Delayed Response Details

If the shutdown command fails during execution, a delayed response will be sent with the command’s error status.

Example Request

Example YAML Responses

Example CSV Responses

UserLog

Structure

Argument Description

message: A string to be written to the RapidPlan logs. Must be less than 500 characters and may only contain letters, numbers, - and ..

Function Description

This function allows the user to write a simple string to the RapidPlan logs.

Response Details

This command will return immediately with a response indicating whether or not the string could be written to the log.

Example Request

Example YAML Responses

Example CSV Responses

BeginInterlockRecording

Structure

Argument Description

None

Function Description

This command indicates to RTR that for the upcoming cycle, RTR should record motion data for interlock calculations. This command is only accepted in CONFIG mode. To generate an interlock report, issue BeginInerlockRecording, execute all the robot motions, call EnterConfigMode, and then call GenerateInterlockData to retrieve the result.

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

GenerateInterlockData

Structure

Argument Description

None

Function Description

This command indicates to RTR to that the simulation tool wishes to retrieve the interlock data for the preceding cycle. This command is only accepted in CONFIG mode.

Response Details

The response is a report of interlock data for each edge taken by a robot while interlock recording was active in YAML format. The report contains keys for each robot, and for each robot there is a key for every motion it takes.

  • Each motion taken by the robot is represented as a sequence_number

  • For each sequence_number, a path is provided which contains a list of waypoints.

    • The first waypoint is always the starting position of the robot during the move.

    • The last waypoint is always the position the robot when the move finishes.

  • For each sequence_number an interlock list is provided.

    • Each interlock is given a unique name.

    • An empty list indicates that no interlocks are required for that motion.

    • The begin_interlock key indicates the furthest point the robot can proceed to before it is required to obtain the specific interlock.

    • The end_interlock key indicates which point the robot must reach in order to release the interlock.

    • It is possible for the end_interlock key to be achieved through a different move.

    • Sometimes, the interlocks starting position is the first waypoint of the move which means the robot cannot move at all until the interlock is obtained.

    • Interlocks are not robot specific, so the same interlock can appear for multiple robots motions.

    • A null value for end_interlock indicates that the robot was still in a position that required an interlock when the recording was terminated.

Example Request

Example YAML Response

For each robot, the information of the robot motion and interlock is returned.

 

Example CSV Response

None, only the YAML response type is supported for interlock generation.

API Endpoints - Robot

ActivateRobots

Structure

Argument Description

robot_names: optional An array specifying which robots should be activated. If not passed, all inactive robots in the project will be activated.

Function Description

This command will re-activate a robot for the loaded project. 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.

This command must be called when a project is loaded and the controller is in CONFIG mode.

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

DeactivateRobot

Structure

Argument Description

robot_name: Specifies which robot should be deactivated.

treat_as_obstacle: optional A boolean value that specifies if the deactivated robot should be treated for collisions by the other robots in the work cell. Default value is true.

preset_name: optional A string specifying the preset of the robot to be used in the inactive state. The preset will determine the collision geometry as well as the number of joints. If not specified, the active preset will be used.

 

If treat_as_obstacle is enabled, then the following keys are mutually exclusive to specify the behavior of the deactivated robot:

joint_config: optional An array of floats specifying the angle for each joint of the robot. If the robot’s preset includes user defined joints, they must be provided as well, sorted by the driver index.

target_name: optional A string specifying the name of the target that the robot will be positioned at.

use_last_known_config: optional Default option. A boolean flag that specifies the last known joint configuration of the robot should be used. A robot must have been Connected at least once for there to be known joint angles. These values are saved to disk, so on project reload, this option can still be used.

If none of the optional keys is set, the last configured setting will be used. If the robot has never been deactivated then the use_last_known_config behavior is active. Setting target_name or joint_config does not clear the last known configuration.

Function Description

This command ‘deactivates’ a robot which means the RTR controller will ignore it when connecting to the robots within a project. Subsequent Connect commands will only connect to activated robots, and when in Operation mode, only the activated robots will be controlled by RTR. In order to prevent collisions, the deactivated robots can be configured for collision checking by setting the appropriate preset and joint angles. Optionally, the robot can be ignored during collision checking if it is not present in the workcell.

This command must be called when a project is loaded and the controller is in CONFIG mode.

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

UpdateInactiveRobotSettings

Structure

Argument Description

robot_name: Specifies which robot should have it’s settings updated while in the deactivated state.

treat_as_obstacle: A boolean value that specifies if the deactivated robot should be treated for collisions by the other robots in the work cell.

preset_name: A string specifying the preset of the robot to be used in the inactive state. The preset will determine the collision geometry as well as the number of joints.

 

If treat_as_obstacle is enabled, then the following keys are mutually exclusive to specify the behavior of the deactivated robot:

joint_config: An array of floats specifying the angle for each joint of the robot. If the robot’s preset includes user defined joints, they must be provided as well, sorted by the driver index.

target_name: A string specifying the name of the target that the robot will be positioned at.

use_last_known_config: A boolean flag that specifies the last known joint configuration of the robot should be used. A robot must have been Connected at least once for there to be known joint angles. These values are saved to disk, so on project reload, this option can still be used.

Function Description

This command updates the settings used for collision checking against a deactivated robot. If the settings were not specified in DeactivateRobot or if they have changed, this command can be used to specify them.

This command must be called when a project is loaded and the controller is in CONFIG mode.

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

Connect

Structure

Argument Description

robot_name: optional Specify which robot should be connected to. If not passed, all active robots in the project will be connected.

Function Description

This command connects to all active robots in the loaded project, or optionally a single robot. After this command executes, the Realtime Controller will begin monitoring the position of the robot/s.

This command should normally be called near the beginning of a robot program, before attempting to make any Move commands. If the robot/s have already been connected, this command will return successfully.

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

Disconnect

Structure

Argument Description

robot_name: optional The specific robot to disconnect from.

Function Description

This command disconnects from all robots in the project (unless a robot is specified) and returns them to the Initialized status. Disconnect can only be called successfully when in CONFIG mode.
This command is useful for saving time by keeping the project loaded on the controller while allowing the robots to perform tasks independent of Realtime control like rebooting.

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

AcquireControl

Structure

Argument Description

robot_name: The name of the robot to acquire control of.
preset_name:optional Switches the active robot preset when acquiring control.

Function Description

This command allows the user to signal that they are done with an operation that required RTR to release external control of the robot, and the Realtime Controller should resume control, with the last active robot preset or a specified preset.

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

ReleaseControl

Structure

Argument Description

robot_name: The name of the robot to release control of.
preset_name:optional Switches the active robot preset when releasing control.

Function Description

This command is intended to enable the user to take temporary control of the robot to get/set IOs, or execute a portion of their robot program that is not suitable for RTR control at this point. This may be gluing, welding, or some other time-dependent, sensitive process. 
While a robot is in Released mode, the rest of the Realtime Controller system will use the last known joint state of the paused robot as an obstacle, and will use the robot preset that was active (or optionally set) when that call was made. 
After completing the desired operation, the user should call AcquireControl. Until that call, the robot will not accept any Move commands from this API.

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

 

SetMaxLinearAcceleration

Structure

Argument Description

robot_name: The name of the robot this command is for.
max_accel: A value from 1mm/s^2 to 10,000,000mm/s^2 that defines the maximum acceleration allowed for the specified robot. The clients active units will be used, or the default units of mm/s^2.

reset: optional A boolean flag that indicates the Linear Acceleration limits should be reset to the default values. The only accepted value for this flag is one that evaluates to True. Note: if max_accel is also provided, it’s value will be ignored, and the acceleration limits will be reset.

Function Description

This command limits the linear acceleration of a robots TCP. A user can specify the max acceleration allowed for a robot using this command, or reset to the default value using the reset flag. This command can only be sent when the specified robot is stationary, and all subsequent motions will adhere to the provided limit.

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

SetMaxLinearSpeed

Structure

Argument Description

robot_name: The name of the robot this command is for.
max_speed: A value from 0.1mm/s to 100,000mm/s that defines the max linear speed allowed for a specified robots TCP. The clients active units will be used, or the default units of mm/s.

reset: optional A boolean flag that indicates the Linear Acceleration limits should be reset to the default values. The only accepted value for this flag is one that evaluates to True. Note: if max_accel is also provided, it’s value will be ignored, and the acceleration limits will be reset.

Function Description

This command limits the max linear speed of a specified robot. In following move commands, the speed parameter will move the robot at a percent of this specified speed. For example, if this command is called and 500 (in mm/s) is passed for the max_speed parameter, a move command with a speed parameter of 0.5 will move the robot at up to 250mm/s.

A user can specify the max linear speed allowed for a robot using this command, or reset to the default value using the reset flag.

This command can only be sent when the specified robot is stationary, and all subsequent motions will adhere to the provided limit.

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

SetAlternateLocation

Structure

Argument Description

robot_name: This indicates which robot this call pertains to .
enabled: Accepts 0 to disable alternate behavior or 1 to enable alternate behavior at the specified target. If enabled is being set to 0, no other arguments are required.

mode: optional Specifies what the robot should do if the original motion fails.

  • 0: Default behavior. Move to a different, specified, position.

  • 1: Partial Execution. If this option is selected, the robot will move along its path as far as it can before a robot-based obstruction is present. If the obstruction is removed before deceleration, the robot will not stop at this point and continue smoothly towards the goal. If the obstruction is still present, the robot will come to a stop and automatically resume motion when the robot-based obstruction is removed. This behavior does not trigger for static-obstacle obstructions.

goal: optional If mode is set to 0, this argument specifies the position that will act as the alternate position for the specified robot. Goal is a placeholder, and the actual key value pair would correspond to the acceptable positions which are:

  • target_name: <target_name>

  • pose: [x,y,z,r,p,y]

complete_move: optional Default value of 1. This boolean specifies if the robot should continuously try to plan a motion to the original target after it has successfully moved to the alternate location. If True a robot that has a move timed out will first move to the alternate location. If this alternate move is successful it will continuously try to plan a motion from the alternate location to the original move request location. If False a robot that has a move timed out will move to the alternate location and wait there for the next command.

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 code indicating the robot reached the alternate location, or continue to plan to the location that was first specified in the move command.

Only one target can be set as the alternate location, so if that target does not exist in all of the robots presets, when a preset it changed, the alternate location should be updated.

Enabling the alternate location behavior changes the way a robot will execute a move, therefore a SetAlternateLocation command can only be sent while a robot is stationary and while the Realtime Controller is in either CONFIG or OPERATION mode.

When this behavior is enabled, the robot will execute motions using the same parameters as the original move. For example, if a move is sent using move_type: roadmap then the robot will make a roadmap move to the alternate location. If the original move is a move_type: direct then a direct move will be made to the alternate location.

When partial execution is enabled (mode: 1) or the default behavior (mode: 0) with complete move enabled, the timeout value from SetInterruptBehavior will be used.

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

SetInterruptBehavior

Structure

Argument Description

robot_name: This indicates which robot this call pertains to. 
timeout: -1 or 0.05 to 1000.0. This indicates how long the Realtime Controller should continue trying to find a path if one cannot currently be found. -1 indicates an infinite timeout, and any non-zero floating point value specifies the time (in seconds) before a timeout response is sent. This timeout will also be used by SetAlternateLocation when mode: 1 or mode:0 and complete_move: true.
max_replans:optional -1 or 0 to 1000. Default value of -1. This parameter specifies how many times a robot will attempt to find a path to the goal if it is blocked or interrupted during it’s motion. A value of 0 indicates the robot should not attempt to replan if blocked, a value of N indicates that the robot should attempt to replan a maximum of N times before returning failure, and -1 indicates an infinite number of replan attempts.

Function Description

This function should be invoked towards the beginning of a robot program. It sets the behavior for the server with respect to replanning and timeout behavior. If this function is not called, the default behavior for a project will be: timeout = 30 and max_replans=10

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

SetRobotPreset

Structure

Argument Description

robot_name: The name of the robot this command is for.
preset_name: Specifies which preset to switch to as defined in RPC.

Function Description

This command changes the active robot preset for a specific robot. When a preset is changed, current robot motions are not re-validated, but new move commands will respect the new active preset. A robot must be stationary in order to call this command explicitly. SetRobotPreset commands will be rejected if sent between a user issuing move request to the RTR controller, and the final response being sent from the RTR controller to the user for a given bot . If a preset change is needed, it can be accomplished using the preset_name key within a queued move or combined move request. In the case of switching presets using the preset_name key, there is a requirement that changes in preset during queued moves or CombinedMoves must not change the TCP or the controllable axes. This requirement is in effect if there are any current motions that the user has issued to RTR, that RTR has not yet returned the final API response to the user.

If the new preset has a different number of controlled axes than the current preset, ReleaseControl must be called for that robot prior to the SetRobotPreset command. Once the preset change has succeeded, AcquireControl can be called again.

When called, the selected preset is stored to disk so upon project reload, the last active preset will be used.

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

 

GetRobotPresets

Structure

Argument Description

robot_name: Specifies the name of the robot to return the presets for.

Function Description

This command will return a response with a comma separated array of the robot preset names (preset_names) and the active preset name (active_preset). 

Response Details

active_preset: This response will return the name of the active robot preset.

robot_presets: This response will return the names of all presets from the same robot.

For CSV responses, after the acknowledgement codes, i.e., GetRobotPresets, 0, the response code will return with the name of the active preset, followed by the number of the robot presets, and then followed by the name of each robot preset.

Example Request

Example YAML Responses

Example CSV Responses

 

Queueing Moves

Move commands can be sent to a robot before it's current motion has finished. The new Move request will be added to the queue for the specified robot to be executed as soon as it’s current motion finishes.

  • Only Direct and Roadmap move types can be added to the queue.

  • A maximum of 100 moves can be added to the queue.

  • If received in time, the robot will smooth it's current motion into the next in the queue using it's smoothing argument.

  • The move queue for a given robot is cleared when:

    • A Move fails

    • A Move is cancelled

  • While a robot is executing a motion, the next move in the queue is planned

    • A robot reserves the swept volume of it’s current motion and the next move in the queue.

    • A Move is only added to the queue, if a path could be found.

    • Initial responses will be sent for move requests when planning has finished.

  • Delayed responses will be sent when queued move segments terminate (due to completion, cancelling, or interruption).

  • Canceling a robot’s motion with CancelMove will clear the move queue and cancel all moves simultaneously. The delayed responses of these moves are not guaranteed to be in queue order.

  • Queued motions will use the interrupt settings when planning in the background.

  • Queued motions will use the alternate location, if enabled.

  • A robot’s preset can be changed when Moves are queued. The number of controlled axes shall stay the same. The robot TCP could change when a robot’s preset switches in the queue.

  • It is highly recommended to include preset_name in every queued Move command in case a robot’s preset switches in the queue.

  • Smoothing is supported in queue moves. If the new motion is received in time, the robot will use the current motions smoothing value to blend into the new motion.

Move

Structure

Argument Description

robot_name: The name of the robot you would like to move.

goal: Where the robot will move to, either a target or pose. Goal is a placeholder key, and the acceptable keys are either pose or target . When additional robot axes are present, the goal does not include them. Unless the external axes value is provided as an argument, external axes will either remain fixed during a move, or switch to different setpoint values defined by roadmap moves. Valid key values are as following, pose: [x,y,z,r,p,y] or target: target_name .

speed: The speed at which the robot will move on a scale from 0.01 to 1.0. This scales max velocity but not acceleration or jerk. For planning move types, the speed is capped at 0.1.

external_axes: OPTIONAL This argument, including all the related parameters that are defined within this object, specifies the names of the external axes, the external axes position value to for moving to a goal pose, or whether the external axis should be used by RapidPlan software when solving a move to a goal pose.

If a robot's external axes remain fixed during a move, or switch to different setpoint values defined by a target, external_axes should be left unspecified.

  • external_axes is defined as {<axis name>: active} or {<axis name>: <value>}. The names of the external axes must match what is already defined in the RapidPlan Create project.

  • use {<axis name>: active} if an external axis is used by RapidPlan software when solving a move to a goal pose.

  • use {<axis name>: <value>} if an external axis is used for a move to a goal pose with a specific external axis position value.

move_type: OPTIONAL The type of move the robot will make. Either direct, roadmap, or planning. Default move type is a roadmap move. The arguments are case insensitive or can use the assigned numeric value.

  • 0 or direct

  • 1 or roadmap

  • 2 or planning

smoothing: OPTIONAL A value from 0.0 mm to 500 mm indicating how far from a node the robot should begin smoothing it’s trajectory. Default value is 0.0 mm. The smoothing argument will be applied to via points between the start and end joint configurations for a roadmap move type, and will be used to blend into queued motions for roadmap and direct move types.

interp: OPTIONAL Specifies the interpolation type for the robot when making a direct move, or any time it must leave the roadmap. Use the case insensitive string, or it’s integer equivalent to specify joint or linear interpolation. This parameter does not apply to a planning move. Default is joint space interpolation.

  • 0 or J (default)

  • 1 or L

collision_check: OPTIONAL This flag overrides collision checking against the static scene for Direct move types. Robot to robot collisions will always be checked regardless of this flag, but robot self collisions will not be checked. A value of 1 specifies collisions should be checked, and a value of 0 specifies collisions will not be checked. Default value is 1.

collision_check_dsm: OPTIONAL This flag overrides collision checking against the Dynamic Scene Model( ) for Direct move types. A value of 1 specifies collisions should be checked, and a value of 0 specifies collisions will not be checked. Default value is 1.

timeout: OPTIONAL This timeout only applies to planning move types when the interrupt behavior is not applicable. This value is the amount of time given to plan a path to the specified goal, in seconds. If not provided, the default value is 10 seconds. The minimum value is 0.01 seconds and the maximum value is 120.0 seconds.

relative: OPTIONAL A boolean flag indicating that a pose move should be performed relative to the last commanded robot pose. Default value is false. The move type must be direct when using the relative flag. A reference frame can be specified as well for the pose to be in.

ref_frame: OPTIONAL The name of a frame in the RPC project that should be used as a reference for relative moves. The default reference frame is world.

preset_name: OPTIONAL This argument specifies which preset the robot should switch to before executing the motion. Including this argument has the same effect as calling SetRobotPreset before the Move command. If included, the robot cannot have any moves in it’s queue with a different TCP or number of controlled axes.

trigger: OPTIONAL This argument, including all the related fields, specifies an output based on the timing of a move or a move segment of a combined move. A trigger argument has the following fields:

  • name: Only one trigger can be included for each move command, or each move segment of a combined move command. The trigger should have a user defined, stateless, globally unique name, to identify the signal for the receiver of the trigger.

  • output: The trigger output should be configured during runtime as part of a move command, to turn on or off the output signal as an 1-shot event, until the signal is overridden by either another Move command, or a different control device, e.g., a PLC. If the output key is not specified, this trigger is disabled and trigger time is ignored. If output is specified, trigger time must be defined and cannot be omitted.

    • 0 or false: output is off

    • 1 or true: output is on

  • time: Specifies the timing of the output, i.e. the time before the target position is reached, or after the move has started. The unit is in seconds and whose absolute value must be greater than 0.1.

    • time must be a none-zero value, and should always be >= 0.1 or <= -0.1. The move command will return an error code if 0.1 < time < 0.1.

    • A positive value ( time>=0.1) indicates the time after the move starts, ie., a "time-after trigger".

    • A negative value (time<=-0.1) indicates the time before reaching the goal, ie., a “time-before trigger”.

    • If time is longer than the actual move time, a time-after trigger will turn on when reaching the goal, a time-before trigger will turn on when the move starts. The MoveFeedback response message for the trigger will arrive before the MoveResult message for the move.

    • If alternate location is used(mode=0 in SetAlternateLocation), and if complete_move = true:

      • Only a time-after trigger will apply to the move to the alternate location, a time-before trigger will take no effect to this move.

      • From the alternate location, only a time-before trigger will apply to the move that reaches the next goal, a time-after trigger will take no effect to this move.

    • If alternate location is used(mode=0 in SetAlternateLocation), and if complete_move = false:

      • Only a time-after trigger will apply to the move to the alternate location, a time-before trigger will take no effect to this move.

    • If partial execution is used(mode=1 in SetAlternateLocation), for time-after triggers:

      • if robot is blocked for a duration > time, trigger will be activated at the specified time value.

      • if robot is unblocked before timeexpires, trigger will be activated at the distance corresponding to the trigger timevalue of the original non-blocked move.

    • If partial execution is used(mode=1 in SetAlternateLocation), for time-before triggers:

      • Before reaching the final goal, if time is less than the duration from the partial execution position to the final goal, trigger will be activated at the specified time as normal.

      • If the specified trigger time is more than the duration from the partial execution position to the final goal, trigger will be activated immediately after the robot is unblocked.

 

Function Description

Formerly there were blind moves, MoveToXXX, and OffroadtoXXX commands. We would end up with a minimum of 9 different move commands based on if you wanted to move to a target, coordinate (pose) or a joint configuration. With this new generic Move command and the key value syntax, you can specify any of those moves with this one command.
A direct move moves the robot directly from it's current position to it's goal position with a given interpolation type. This command is efficient, but can easily be blocked by other robots. It is very useful for final motions, especially if collision checking needs to be disabled.
A roadmap move will follow the edges defined in the RPC project. This is expected to be the most common move type since the robots will use the roadmap to dynamically avoid obstacles. If pose is specified, and there is no target in the roadmap as that pose, the robot will leave the roadmap to reach the actual pose. The off-roadmap portion will be collision checked, and will use the interpolation type specified (or joint interpolation by default).
A planning move calculates a path for the robot at runtime to reach the goal. This is primarily used to put a robot on the roadmap in the beginning of a task. When called, the requested robot must not be executing any current requests, otherwise it will immediately return an error. If any other robots are currently executing requests when this request is called, the other robots will pause their executions, allowing the given robot to plan and move, before automatically continuing their motion afterwards. If no collision free path to the hub can be found, the server will return an error by the end of the given timeout period.

Caution: There are risks involved with mixing RTR moves with non -RTR moves(for example, native moves from a robot teach pendant program). The user must make sure that a RTR move has completed successfully if the completion of that move is necessary for the next non-RTR move to be collision-free.

Caution: There are collision risks involved with stopping a robot from a robot teach pendant program when multi-robot moves are controlled by a RapidPlan controller. The user must make sure that all RTR move commands and stop signals from a different command source are programed and processed in a coordinated fashion, for collision-free operations in a multi-robot workcell.

Caution: When a roadmap move is issued, how far the robot can be away from the roadmap is defined as the distance tolerance to the roadmap node, offroad_tcp_tol. This parameter, in meters, is saved in ApplianceGraphSearchConfig.xml under /var/lib/rtr_appliance_app/appliance_data/<Project Name>/. The default value is 5.0 meters. This parameter can be modified by a user and will take effect after the xml file is saved and after the project is reloaded.

  • If a roadmap move to target command is issued when the robot is off the roadmap, and if the TCP distance between the current robot config and the closest node in the roadmap is greater than offroad_tcp_tol, then the roadmap move to target will return failure.

  • If a roadmap move to pose command is issued when the pose is off the roadmap, and if the distance between the goal pose and the closest node in the roadmap is greater than offroad_tcp_tol, then the roadmap move to pose will return failure.

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 MoveResult message along with a response code to indicate when the move completes. The name of the robot that the move was for, and the unique sequence ID for that move will be returned in the message. If the move is interrupted, the delayed response will contain an appropriate error code.

or, for a trigger a feedback response will be sent to indicate that trigger output is activated to on, or off. The trigger feedback responses will include the same seq as the Move it is a part of.

Example Request

Example YAML Responses

Example CSV Responses

CombinedMove

Structure

Argument Description

robot_name: The robot that this combined move is for. A combined move, can only included motions for one robot, and therefor the robot_name key from the individual move commands can be omitted. If the robot_name is included in the individual Move commands, it will be ignored.

moves: An array of up to 10 Move commands to be concatenated together. The move commands can only be direct or roadmap move types, and must adhere to the Move command specification. However, redundant keys from the Move command can optionally be omitted, since they are arguments of the CombinedMove.

preset_name:optional This optional argument specifies which preset the robot should switch to before executing the combined move. All moves will then execute using this preset. Including this argument acts exactly like calling SetRobotPreset before the combined move. Note: if this argument is not included, then each move in the move array must specify the preset that should be used for it. Each move can use a different preset provided the TCP or number of controlled axes do not change.

Function Description

CombinedMove allows multiple move commands to be executed as if it was one motion, and the individual segments can optionally be blended together to maintain a higher velocity.

The smoothing argument of each individual move command will specify if it will blend into the next move in the list, and at what distance from the end of the current move.

In the event a CombinedMove is interrupted, an error will be returned in the delayed response. In order to resume the CombinedMove from its current position, it is expected that the user maintains a list of the completed individual moves and then send a new CombinedMove with the moves that didn’t complete.

If move queuing is being used, a CombinedMove can be added to the queue just like any other move.

Response Details

This command will return an initial response to indicate that the command has been processed and a collision free path has been found for all moves, smoothing included. A unique sequence number will be included to identify the CombinedMove responses. When a move in the sequence is completed, a Feedback response will be returned, and upon completion of the full move sequence, additionally a DelayedResponse will be send.

Delayed Response Details

For every Move in the CombinedMove a feedback response will be sent to indicate that segment has completed. The feedback responses will include the same seq as the CombinedMove they are a part of, as well as a zero index index key to identify which segment the move result is for.

If a trigger output is specified for a move segment, a feedback message will be sent as soon as the trigger output is activated to on or off. Different segments of the same CombinedMove command are allowed to re-use the same trigger name, if the same trigger needs to be updated for each move segment. The feedback message contains the seq value but no index value.

Example Request

Note: the new line (\n) and tab (\t) characters have been added for readability, the actual request format does not include them.

Example YAML Responses

Example CSV Responses

CancelMove

Structure

Argument Description

robot_name: The name of the robot who’s move is being canceled.

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.
This command is only accepted when the RTR Controller is in OPERATION mode.

If a series of Move commands are queued for the robot in question, they will all be canceled simultaneously. The delayed responses of these commands are not guaranteed to be in queue order.|

If CancelMove is called before planning is finished for a Move command, robot preset of the canceled move should still be applied because the preset had changed before planning started.

If a move is canceled mid-motion after a Move command which also set the robot preset, the robot preset should be maintained.

The ramp-down speed of CancelMove is at a fixed 80%.

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

CreateTarget

Structure

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

Example YAML Responses

Example CSV Responses

UpdateTarget

Structure

Argument Description

target_name: Specifies which target will have its position updated.

robot_name: This specifies which robots TCP will be used at the new target location.

retrigger_autoconnect: optional This boolean argument specifies if the auto-connect should be regenerated when updating the targets position. If the target is not part of an auto-connect, then this argument will have no effect. The default value is False.

Function Description

This command updates the specified targets position to be at the specified robots TCP location in it’s current preset. The target’s new position will be used for all assigned robots.
The target is created using the robot’s current joint angles which means the controller must be in CONFIG mode and the robot state must be connected.

A target’s position will only be updated, if all of it’s connections remain valid, otherwise the command fails and returns an error code EDGE_INVALIDATED. This could result from the new position being unreachable, the new position being in collision, or one of the motions to the new position resulting in a collision.

Only one target can be updated at a time. While a target is updating, any subsequent UpdateTarget commands will be rejected.

With the retrigger_autoconnect argument set to true, the targets position will be updated, and then the autoconnect will be re-run using the same parameters as set in RPC. With retrigger_autoconnect set to false, just the target’s position will change, and all via point locations will remain the same. The edges leading to the new target location will be validated against the constraints of the autoconnect, and the UpdateTarget command will fail if all constraints are not met.

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

 

RenameTarget

Structure

Argument Description

target_name: Specifies the name of the target to be renamed.

new_target_name: Specifies the new name of the target.

Function Description

This command renames a target. To rename a target, the Realtime Controller must be in CONFIG mode.

RapidPlan Create naming conventions must be followed. Duplicate names are not allowed. Any invalid names will be rejected by the command.

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

 

RemoveTarget

Structure

Argument Description

target_name: Specifies the name of the target to be removed.

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 CONFIG mode.

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

robot_name: Specifies which robot to add the connection to.

preset: optional The name of the robot preset to add connections to. If empty, the active preset is used.

targets: A list of targets to connect. At least 2 targets must be included. If the type is joint or cartesian then only 2 targets are allowed.

type: Specifies the type of connection to create. Acceptable values are joint (0), cartesian (1), or auto (2).

autoconnect_name: optional If type is set to auto (2), autoconnect_name can be specified by the user. If unspecified, a default autoconnect name will be assigned.

validation: <