You're reading the documentation for an older, but still supported version (1.33.4).
For information on the latest version, please have a look at 1.33.5.

set_velx_rt

This function sets the global task-space velocity limit used in real-time servo motion control. It defines both the linear and rotational velocity bounds applied to task-level commands such as servol_rt or speedl_rt.

Definition
DRFLEx.h within class CDRFLEx, public section

bool set_velx_rt(float fTransVel, float fRotationVel = -10000) {
    return _set_velx_rt(_rbtCtrlUDP, fTransVel, fRotationVel);
};

Parameter

Parameter Name

Data Type

Default Value

Description

fTransVel

float

Task linear velocity limit [mm/s].

fRotationVel

float

-10000

Task rotational velocity limit [deg/s].
If set to -10000, it is automatically calculated based on the linear velocity limit.

Note

  • The controller applies this value only while real-time control is started with start_rt_control. A command sent before start_rt_control is ignored.

  • If the servo motion velocity exceeds the global task-space limit, an Info message is generated by the controller.

  • The system continues motion, but logs this event for diagnostic purposes.

  • The default rotational velocity (if unspecified) is derived from the translational velocity to maintain proportional motion scaling.

Return

Value

Description

1

The command was sent. This does not confirm that the controller received or applied it.

0

The command datagram could not be sent.

Note

This function is asynchronous. It returns without waiting for the controller to accept or reject the command, so a return value of 1 does not confirm that the robot acted on it. Rejected commands and motion warnings and errors are reported through set_on_log_alarm. set_on_rt_log_alarm reports only RT session messages, so register both callbacks.

Example

drfl.connect_rt_control("192.168.137.100", 12347);

// The controller applies this value only while real-time control is started.
// Input period 0: no input watchdog, because this example sends a single command.
std::string version = "v1.0";
drfl.set_rt_control_input(version, 0.0f, 4);
drfl.set_rt_control_output(version, 0.001f, 4);
drfl.start_rt_control();

// Define task-space velocity limits
float fTransVel = 100.0f;     // Linear velocity [mm/s]
float fRotationVel = 60.0f;   // Rotational velocity [deg/s]

// Apply task-space velocity limits for real-time servo motion
if (drfl.set_velx_rt(fTransVel, fRotationVel))
    printf("Global task velocity limits set successfully.\n");
else
    printf("Failed to set task velocity limits.\n");

drfl.disconnect_rt_control();

This example defines a maximum task-space velocity of 100 mm/s for translation and 60 deg/s for rotation to ensure stable and safe real-time motion execution.

Tips

  • Recommended for use with speedl_rt or servol_rt functions.

  • If only translational motion is required, set fRotationVel = -10000 to auto-scale it.

  • Adjust limits based on application safety requirements or workspace constraints.