Main Content

sendServoJCommands

Send Servoj commands

Since R2024a

Description

example

sendServoJCommands(ur,jointConfig) sends Servoj commands to control the joint positions of Universal Robots cobot through the RTDE interface based on the specified joint configuration.

example

sendServoJCommands(ur,jointConfig,Name=Value) specifies options using one or more name-value arguments in addition to the input arguments in previous syntaxes. You can use the name-value arguments to set the maximum duration, velocity, acceleration, look-ahead time, and parameter gain.

Examples

collapse all

Connect to a physical or simulated cobot by using the urRTDEClient object.

ur = urRTDEClient('172.19.98.176');
ur = 
  urRTDEClient with properties:

            CobotName: 'universalUR5e'
       URControllerIP: '172.19.98.176'
    ControllerVersion: '5.11.1.0'
        RTDEFrequency: 125
    ConnectionTimeOut: 10

Send Servoj commands to control joint positions of the cobot by specifying maximum duration, velocity, acceleration, look-ahead time, and parameter gain.

jointWaypoints = [0.0,1.57,-1.57,0,0,3.14];  
sendServoJCommands(ur, jointWaypoints, EndTime=0.008, Acceleration=0.1, Velocity=0.1, LookAheadTime=0.1, PGain=300);

Input Arguments

collapse all

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

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

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: sendServoJCommands(ur, jointWaypoints, Acceleration=0.1)

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

Data Types: double

Acceleration to control trapezoidal speed profile of the trajectory, specified as a numeric scalar.

Example: sendServoJCommands(ur, jointWaypoints,Acceleration=1.2)

Note

If you specify 'EndTime' argument, the 'Acceleration' argument value has no impact because the 'EndTime' argument has priority over the velocity and acceleration settings.

Velocity to control trapezoidal speed profile of trajectory.

Example: sendServoJCommands(ur, jointWaypoints,Velocity=1.0)

Note

If you specify 'EndTime' argument, the 'Velocity' argument value has no impact because the 'EndTime' argument has priority over the velocity and acceleration settings.

Look-ahead time (in seconds) for joint transition from current position to the next based on the current velocity, specified as a numeric scalar. This option is useful for error calculation and to smoothen the trajectory. A low value gives a fast reaction, and a high value prevents overshoot.

Example: sendServoJCommands(ur, jointWaypoints, Velocity=1, LookAheadTime=0.15)

Proportional gain to modify the magnitude of error between actual and desired positions, specified as a numeric scalar. The function uses this value to adjust the position of cobot. This value is similar to the proportional gain of a PID controller.

Example: sendServoJCommands(ur, jointWaypoints,PGain=500)

Version History

Introduced in R2024a

See Also