Main Content

sendSpeedJCommands

Send speedj commands

Since R2024a

Description

sendSpeedJCommands(ur, jointVelocities) sends speedj commands to control the joints of Universal Robots cobot through the RTDE interface based on the specified velocity for each joint.

example

sendSpeedJCommands(ur, jointVelocities, Name=Value) specifies options using a name-value argument in addition to the input arguments in previous syntaxes. You can use the name-value arguments to set the duration and acceleration.

example

Examples

collapse all

Connect to a physical or simulated cobot by using 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
        RigidBodyTree: [1×1 rigidBodyTree]

Command the cobot by providing the desired velocities for each joint and by specifying an acceleration of 1.2 rad/s2.

jointVelocities = [0.1, -0.1, 0.2, 0, -0.2, 0.1]; 
sendSpeedJCommands(ur, jointVelocities, Acceleration=1.2);

Input Arguments

collapse all

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

Desired velocity of each joint of the physical or simulated cobot, specified as a 1-by-6 numeric vector.

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: sendSpeedJCommands(ur, jointVelocities, Acceleration=1.2)

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

Example: sendSpeedJCommands(ur, jointVelocities, EndTime=3)

Data Types: double

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

Example: sendSpeedJCommands(ur, jointVelocities, 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

Version History

Introduced in R2024a

See Also