.. _manual_enable_alter_motion: enable_alter_motion (Manual Mode) ------------------------------------------ This section explains how to use :ref:`enable_alter_motion ` during **Manual (Teach)** operations. It activates alter motion mode, which lets you apply small trajectory corrections while a task-space motion command (for example ``movel``) is running. Joint-space motions such as ``movej`` cannot be altered; ``alter_motion`` calls during them are refused. This is especially useful for **fine-tuning approach paths**, adjusting tool orientation during contact, or visually correcting the TCP position under camera guidance. **Typical usage** - Enable before running a fine manual adjustment loop (using :ref:`alter_motion `). - Define movement limits for both **position** and **orientation** to ensure safe manual control. - Commonly used in precision teaching tasks such as welding start-point tuning or surface touch alignment. .. Note:: - Must be called in **user thread** before any alter commands. - It remains active until disable_alter_motion is called or the robot enters EMERGENCY_STOP, SAFE_OFF or SAFE_OFF2; after that, call enable_alter_motion again after servo on. - The set limits prevent excessive tool displacement or orientation changes. **Example: Enable Alter Motion with Safety Boundaries** .. code-block:: cpp // Step 1: Ensure robot is connected and in Manual Mode // (Assume servo ON and safe workspace conditions) // Step 2: Define safety limits for manual correction float fLimitDpos[2] = {5.0f, 3.0f}; // ±5 mm (position), ±3° (rotation) float fLimitDposPer[2] = {-10000.f, -10000.f}; // no per-cycle limit // Step 3: Enable alter motion to allow micro path correction drfl.enable_alter_motion(5, PATH_MODE_DPOS, COORDINATE_SYSTEM_BASE, fLimitDpos, fLimitDposPer); printf("Alter motion enabled. You can now apply small path adjustments.\n"); **Tips** - Ideal to call just before visual or tactile alignment. - The accumulated amount or the increment amount is not limited if both elements of ``fLimitDpos`` or ``fLimitDposPer`` are ``-10000``. - Once alignment is done, use :ref:`disable_alter_motion ` to finalize the pose.