Main Content

followJointWaypoints

Command robot to move along the desired joint space waypoints

Since R2024a

Description

example

followJointWaypoints(ur,jointWaypoints,waypointTimes) commands the Universal Robots cobot connected through RTDE interface to follow the desired set of joints for the trajectory, based on position, velocity, acceleration, and time samples.

example

followJointWaypoints(ur,jointWaypoints,waypointTimes,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

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 waypoints.

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 a set of Joint Configurations
followJointWaypoints(ur,jointWaypoints,waypointTimes)

%% Option 2 - Get the smooth joint trajectory with 10 jointspace points
waypointTimesInterpolated = linspace(0.5,waypointTimes(end),10); 
jointWaypointsInterpolated = bsplinepolytraj(jointWayPoints,[0 waypointTimes(end)],waypointTimesInterpolated);

followJointWaypoints(ur,jointWaypointsInterpolated,waypointTimesInterpolated)

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

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

Data Types: double

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,jointconfig,EndTime=endTime)

Time for completing the trajectory based on the specified joint configuration.

Example: followJointWaypoints(ur,jointWaypoints,"EndTime",endTime)

Data Types: double

Acceleration to control trapezoidal speed profile of trajectory.

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

Note

If you specify 'EndTime' name-value argument, setting the 'Acceleration' value has no impact. This is because the time setting has priority over velocity and acceleration settings.

Velocity to control trapezoidal speed profile of trajectory.

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

Note

If you specify 'EndTime' name-value argument, setting the 'Velocity' value has no impact. This is because the time setting has priority over velocity and acceleration settings.

Blend radius for waypoints to pass through, when the cobot does not need to stop.

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

Version History

Introduced in R2024a