Skip to main content

Errors and abnormal behavior

Motion start phase

Slight sag when motion starts

@control

Errors when starting motion

Errors during motion

How to catch motion errors

void funRTControl() {
try {
auto rtCon = robot.getRtMotionController().lock();
rtCon->startMove(RtControllerMode::jointPosition);
// Option A: blocking loop — errors throw during motion
rtCon->startLoop(true);
// Option B: non-blocking — errors throw at stopLoop
rtCon->startLoop(false);
rtCon->stopLoop();
} catch (const std::exception &e) {
std::cerr << e.what();
}
}

Causes and handling

Real-time mode defines 20 error types.

kInstabilityDetection

If this occurs often, raise the network tolerance with setRtNetworkTolerance while real-time mode is off; 60% or higher is recommended.

Velocity / acceleration over threshold

  • If it stops right after startMove, the start pose is usually not the current pose.
  • If it happens mid-motion, check host real-time behavior and network jitter.
  • For custom trajectories, adjacent commands are often too far apart — improve planning.
  • With switches or complex paths, try a direct cable first.

How to set the start pose correctly

For MoveJ(start_pos, target_pos, speed), obtain start_pos as follows:

  1. Recommended: read with posture() / jointPos().
std::array<double, 16> init_position{};
Utils::postureToTransArray(
robot.posture(rokae::CoordinateType::flangeInBase, ec),
init_position);
  1. Loop updateRobotState to drain stale frames and read the latest state.
while (robot.updateRobotState(chrono::steady_clock::duration::zero()));
  1. Read and update the start pose on the first callback frame.
std::function<CartesianPosition()> callback = [&, rtCon]() {
if (init) {
robot.getStateData(RtSupportedFields::tcpPose_m, init_pos);
init = false;
}
};
rtCon->setControlLoop(callback, 0, true);

Noise or jitter during position control

@control

What to do

  • When running SDK examples:
    • Enable filtering (setFilterFrequency, setFilterLimit).
    • Windows usually needs stronger filtering.
    • Prefer a direct link to reduce network jitter.
    • NIC choice affects real-time behavior (field feedback: Realtek often more stable).
  • For custom planning:
    • In addition to the above, check callback overrun (cycle longer than 1 ms).
    • If needed, verify the velocity profile is smooth.

For teach-pendant scope, callback timing, and follow lag, see Other usage and real-time topics.

How to view diagnostic data

@control