Chapter 4: RTDEControlInterface

About This Chapter

This chapter explains the motion-control APIs provided by RTDEControlInterface in SDU Robotics’ ur_rtde library.

This is the class most frequently used when controlling a UR robot from Python.

By the end of this chapter, you will understand the differences among:

  • moveJ

  • moveL

  • moveP

  • speedJ

  • speedL

  • servoJ

  • servoL

  • Stop commands


4.1 What Is RTDEControlInterface?

RTDEControlInterface is a PC-side motion-control interface provided by SDU Robotics’ ur_rtde. It is not a motion API belonging to Universal Robots’ native RTDE protocol.

For example, when you call:

rtde_c.moveJ(...)

The PC-side RTDEControlInterface uses registers in Universal Robots’ official RTDE interface to pass commands and parameters to the controller. On the robot side, SDU’s control URScript reads these values and executes the corresponding URScript motion command, such as movej. URControl executes that command and connects it to actual robot control.

Thus, RTDEControlInterface does not directly invoke the Servo Controller through the official RTDE protocol.

RTDEReceiveInterface handles state acquisition.


4.2 Categories of Motion Commands

Representative RTDEControl commands can be classified as follows.

Category

API

Purpose

Joint interpolation

moveJ

Most common motion

Linear interpolation

moveL

Processing and measurement

Circular interpolation

moveC

Circular trajectories

Combined interpolation

moveP

Trajectories using blending

Velocity control

speedJ

Joint velocity

Velocity control

speedL

TCP velocity

Servo control

servoJ

Real-time control

Servo control

servoL

Real-time control

Understanding moveJ and moveL first is particularly important.


4.3 moveJ

moveJ means Joint Move.

The robot moves toward specified joint angles.

Initial configuration

↓

All joints rotate simultaneously

↓

Target configuration

The intermediate TCP trajectory is not guaranteed.


Arguments

moveJ(
    q,
    speed,
    acceleration,
    asynchronous
)

Example:

q = [
    0.0,
    -1.57,
    1.57,
    0.0,
    1.57,
    0.0,
]

rtde_c.moveJ(q)

Advantages

  • Fast

  • Does not require inverse kinematics

  • Most stable

  • Suitable for moving between taught positions


Disadvantages

The TCP follows a curved trajectory.

It is not suitable for machining operations.


4.4 moveL

moveL means Linear Move.

The TCP moves along a straight line.

A

────────────

B

The TCP path is guaranteed.


Applications:

  • Machining

  • Dispensing

  • Laser processing

  • Measurement

  • Pick and place


Arguments

pose =

[x,y,z,rx,ry,rz]
rtde_c.moveL(pose)

Orientation is represented using a Rodrigues vector.


4.5 Difference Between moveJ and moveL

moveJ

TCP

○

╲

╱

○


moveL

TCP

○────────○

moveJ performs joint interpolation.

moveL performs TCP interpolation.


4.6 moveP

moveP means Process Move.

It smoothly connects multiple points using blending.

○────○────○

↓

Smooth trajectory

Use it when you want to reduce the time spent stopping at intermediate points.


4.7 Acceleration

Both moveJ and moveL allow you to specify:

acceleration

Units are:

rad/s²

or

m/s²

The units depend on the API.


4.8 Speed

speed

specifies the target speed.

Even if you specify a large value, the controller automatically applies limits based on factors such as:

  • Safety restrictions

  • Payload

  • Joint limits


4.9 Asynchronous Execution

When you specify:

moveJ(..., asynchronous=True)

the function returns immediately without waiting for the motion to finish.

moveJ()

↓

Returns immediately

↓

Robot continues moving

With synchronous execution:

moveJ()

↓

Motion completes

↓

Returns

4.10 Stop Commands

Representative stop commands include:

stopJ()

Stops joint motion.

stopL()

Stops TCP motion.

These commands perform a decelerated stop, not an abrupt stop.

They are different from an Emergency Stop.


4.11 Return Values

Commands such as moveJ and moveL normally return:

True

or:

False

False can indicate:

  • Communication failure

  • Control failure

However, conditions such as a Protective Stop may also raise an exception.

Therefore, you must handle exceptions as well as check return values.



4.13 Usage in ur_ctrl.py

In this library, calls are automatically dispatched as follows:

move()

↓

moveJ()

or

moveL()

Users do not need to work with RTDEControlInterface directly.


Summary

RTDEControlInterface is the class that sends motion commands to the robot.

The most important commands are:

  • moveJ

  • moveL

Understanding these two commands is enough to build most applications.

The next chapter explains RTDEReceiveInterface.