Main Content

sendCartesianPoseAndWait

Command robot to move to desired Cartesian pose and wait for the motion to complete

Since R2024a

Description

[result,state] = sendCartesianPoseAndWait(ur, pose) commands the Universal Robots cobot connected through RTDE interface, and waits for the robot to complete the motion, based on the specified Cartesian pose of the end-effector. The function returns the goal state and the result.

[result,state] = sendCartesianPoseandWait(ur, pose, Name=Value) commands the Universal Robots cobot connected through RTDE interface, and waits for the robot to complete the motion, based on the specified Cartesian pose of the end-effector, and sets 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 Cartesian pose, and by specifying the optional parameters – time to reach the pose, velocity, and acceleration. The sendCartesianPoseAndWait function internally uses minjerkpolytraj to interpolate the path between two waypoints.

pose = [-pi/2  0  -pi/2 0.5    0    0.8];
[result,state] = sendCartesianPoseAndWait(ur, pose,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 Cartesian pose of the simulated cobot, represented as a 1-by-6 numeric vector, in the form of [thetaz thetay thetax x y z]. The units are radians and seconds respectively for the three axes.

Data Types: numeric

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: [result,state] = sendCartesianPoseAndWait(ur,pose,EndTime=endtime)

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

Data Types: double

Acceleration (in rad/s2) to control trapezoidal speed profile of trajectory.

Example: sendCartesianPoseAndWait(ur,pose,'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: sendCartesianPoseAndWait(ur,pose,'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 simulated cobot from Universal Robots, specified as a logical scalar. result is 1 if state is succeeded.

Data Types: logical

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

See Also