Main Content

followJointWaypoints

Command robot to move along the desired joint space waypoints

Since R2024a

Description

followJointWaypoints(ur, jointWaypoints) commands the Universal Robots cobot connected through RTDE interface to follow the desired set of joints for the trajectory.

example

followJointWaypoints(ur, jointWaypoints, Name=Value) commands the Universal Robots cobot connected through RTDE interface to follow the desired set of joints for the trajectory, and sets the position, velocity, acceleration, and time sample properties using one or more optional name-value arguments

example

Examples

collapse all

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

ur = urRTDEClient('172.19.98.176');

Command the cobot by providing the desired joint waypoints. To provide Nx6 input to the followJointWaypoints function, use the transpose of jointWaypoints.

jointWaypoints = [-20 -85 110 150 -70 0;
                  -10 -70  80 200 -70 0;
                    0 -40  90 270 -70 0;
                  -10 -70  80 200 -70 0;
                  -20 -85 110 150 -70 0;]*pi/180;
waypointtimes = [0 2 4 6 8];

%% Option 1 - Pass the planned trajectory from jointWaypoints
samplePoints = 10;
[q,~,~,~,~,~,~] = minjerkpolytraj(jointWaypoints',waypointtimes,samplePoints);
followJointWaypoints(ur,q,BlendRadius = 0.02)

%% Option 2 - Pass the jointWaypoints directly as transpose
followJointWaypoints(ur,jointWaypoints',BlendRadius = 0.02)

Input Arguments

collapse all

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

Desired position of joints in the trajectory at a given time sample, represented as a N-by-6 matrix, where N is the dimension of the trajectory.

Data Types: array

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: followJointWaypoints(ur,jointWaypoints,EndTime=endTime)

Absolute time (time from start) for each waypoint segment to complete the motion, represented as a 1-by-N numeric vector, specified in seconds.

Example: followJointWaypoints(ur,jointWaypoints,waypointTimes=waypointtimes)

Data Types: double

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

Example: followJointWaypoints(ur,jointWaypoints,"Acceleration",acceleration)

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

Example: followJointWaypoints(ur,jointWaypoints,"Velocity",velocity)

Blend radius for waypoints to pass through, when the cobot does not need to stop, specified as a numeric scalar.

Example: followJointWaypoints(ur,jointWaypoints,"BlendRadius",blendRadius)

Version History

Introduced in R2024a

See Also