Main Content

sendJointConfigurationAndWait

Command robot to move to joint configuration and wait for the motion to complete

Since R2024a

Description

[result,state] = sendJointConfigurationAndWait(ur,jointconfig) commands the Universal Robots cobot connected through RTDE interface and waits for the robot to complete the motion, based on the specified joint configuration.

[result,state] = sendJointConfigurationAndWait(ur, jointconfig, Name=Value) commands the Universal Robots cobot connected through RTDE interface and waits for the robot to complete the motion, based on the specified joint configuration, and sets a maximum duration, velocity, and acceleration properties using one or more optional name-value arguments.

Examples

collapse all

Connect to a physical or simulated cobot, using urRTDEClient object.

ur = urRTDEClient('172.19.98.176');

Command the cobot to by providing the desired joint configuration and by specifying the optional parameters - time to reach the configuration , velocity, and acceleration.

jointWaypoints = [0 -90 0 -90 0 0]*pi/180;
[result,state] = sendJointConfigurationAndWait(ur,jointWaypoints,EndTime=7);
result = 
   1
state = 'succeeded'

Input Arguments

collapse all

Connection to physical or simulated cobot from Universal Robots, specified as a urRTDEClient object.

Desired joint configuration of the physical or simulated cobot, represented as a 1-by-6 numeric vector, in the range [-pi,pi].

Data Types: char

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: sendJointConfiguration(ur,jointWaypoints, EndTime=0,Acceleration=1.2,Velocity=1.0)

Maximum duration (in seconds) by which the physical or simulated cobot must try to complete the motion to reach the desired joint configuration, specified as a numeric scalar.

Data Types: double

Acceleration (in rad/s2) to control trapezoidal speed profile of trajectory, specified as a numeric scalar.

Example: sendJointConfiguration(ur,jointWaypoints, 'Acceleration', 1.2)

Note

If 'EndTime' is a non-zero value, 'Acceleration' is ignored because time takes precedence. To use 'Acceleration', set 'EndTime' to 0.

Data Types: double

Velocity (in rad/s) to control trapezoidal speed profile of trajectory, specified as a numeric scalar.

Example: sendJointConfiguration(ur,jointWaypoints, 'Velocity', 1.0);

Note

If 'EndTime' is a non-zero value, 'Velocity' is ignored because time takes precedence. To use 'Velocity', set 'EndTime' to 0.

Data Types: double

Output Arguments

collapse all

Motion status of physical or simulated cobot from Universal Robots, specified as a logical scalar. result is 1 if state is succeeded.

Data Types: logical

Final goal state of the physical or simulated cobot.

The state is returned as one of the following:

  • 'Succeeded' — Goal executed successfully.

  • 'Executing' — Goal currently being executed on the cobot.

  • 'Not executing' — Goal is yet to be received by the controller.

Data Types: char

Version History

Introduced in R2024a