Control Modes

The robot can be put into different control modes to execute various types of commands. Depending on network conditions and programming language used, Flexiv RDK provides users the flexibility to choose between real-time (RT) control modes and non-real-time (NRT) control modes. The enumeration of all control modes is defined by flexiv::rdk::Mode in header file flexiv/rdk/mode.hpp.

Important

Most command-transmission functions require the robot to be switched into the corresponding control mode before the commands can be transmitted.

Real-time (RT) modes

Under RT control modes, user commands and robot states are exchanged between the workstation PC and the robot at 1kHz with less than 1ms latency, enabling the users to gain low-level controls of the robot. The available real-time controls are:

  • Joint-space motion and torque controls

  • Cartesian-space motion and force controls

Note

All controls above include compensation for nonlinear dynamics, including gravitational, frictional, centrifugal, and Coriolis force or torque.

Detailed description of each RT control mode is listed below.

RT joint torque control mode (Mode::RT_JOINT_TORQUE)

The robot receives joint torque commands streamed at 1kHz, and execute them immediately using a built-in joint torque controller. Gravity, friction, and other nonlinear dynamics are compensated. The command-transmission function of this mode is Robot::StreamJointTorque().

RT joint impedance control mode (Mode::RT_JOINT_IMPEDANCE)

The robot receives joint position commands streamed at 1kHz, and execute them immediately using a built-in joint impedance controller. Gravity, friction, and other nonlinear dynamics are compensated. The command-transmission function of this mode is Robot::StreamJointPosition().

RT joint position control mode (Mode::RT_JOINT_POSITION)

Same as RT joint impedance control mode, except that the commands are executed using a joint position controller instead, which is much less compliant. The command-transmission function of this mode is also Robot::StreamJointPosition().

RT Cartesian motion-force control mode (Mode::RT_CARTESIAN_MOTION_FORCE)

The robot receives Cartesian motion and/or force commands streamed at 1kHz, and execute them immediately using a built-in unified motion-force controller. Gravity, friction, and other nonlinear dynamics are compensated. The command-transmission function of this mode is Robot::StreamCartesianMotionForce().

Non-real-time (NRT) modes

Under NRT control modes, users can send high-level operation instructions like plans and primitives pool, or discrete motion commands that are automatically interpolated and smoothened by the robot’s internal motion generator. In such case, all real-time computations are done by the robot, thus the requirements on network latency and the workstation PC’s performance can be relaxed. The available non-real-time controls are:

  • Discrete joint-space motion controls

  • Discrete Cartesian-space motion and force controls

  • Plan execution

  • Primitive execution

Note

The above joint and Cartesian controls include internal motion generation plus compensation for nonlinear dynamics.

Detailed description of each NRT control mode is listed below.

NRT joint impedance control mode (Mode::NRT_JOINT_IMPEDANCE)

The robot receives joint position commands in a one-shot or slow-periodic manner. A built-in motion generator will produce smooth joint-space trajectories based on the discrete commands, then the trajectories are executed using a built-in joint impedance controller. Gravity, friction, and other nonlinear dynamics are compensated. The command-transmission function of this mode is Robot::SendJointPosition().

NRT joint position control mode (Mode::NRT_JOINT_POSITION)

Same as NRT joint impedance control mode, except that the commands are executed using a joint position controller instead, which is much less compliant. The command-transmission function of this mode is also Robot::SendJointPosition().

NRT Cartesian motion-force control mode (Mode::NRT_CARTESIAN_MOTION_FORCE)

The robot receives Cartesian motion and/or force commands in a one-shot or slow-periodic manner. A built-in motion generator will produce smooth Cartesian-space trajectories based on the discrete commands, then the trajectories are executed using a built-in Cartesian unified motion-force controller. Gravity, friction, and other nonlinear dynamics are compensated. The command-transmission function of this mode is Robot::SendCartesianMotionForce().

Primitive execution mode (Mode::NRT_PRIMITIVE_EXECUTION)

The robot receives and executes primitives specified by the user. The command-transmission function of this mode is Robot::ExecutePrimitive(). Current states of the running primitive can be obtained via Robot::primitive_states().

Note

Primitives are unit skills and actions that the robot already knows. They can be used collectively to form complex operations. The full documentation for all available primitives can be found in Flexiv Primitives Manual.

Plan execution mode (Mode::NRT_PLAN_EXECUTION)

The robot receives and executes plans specified by the user. A list of all available plans can be obtained via Robot::plan_list(). The command-transmission function of this mode is Robot::ExecutePlan().

Idle mode (Mode::IDLE)

Idle is when the robot is not in any of the control modes listed above. It will hold its current position and wait for new user commands. The robot will transit to idle mode when Robot::Stop() is called.

Switch control modes

To switch to a certain control mode, simply call Robot::SwitchMode(). If the robot is still moving when this function is called, it will automatically decelerate to a complete stop first, then make the mode transition.