# Motion API ## MotionMode ```python MotionMode.PTP MotionMode.LINE MotionMode.CIRCLE MotionMode.SPLINE ``` Integer values are also accepted. | Integer | Mode | |---:|---| | 1 | PTP | | 2 | LINE | | 3 | CIRCLE | | 4 | SPLINE | ## move() ```python robot.move( target, motion_mode=None, coord_type=None, offset=None, speed=None, accel=None, is_async=True, ) ``` Perform a single-target move. ### P String ```python robot.move("P1") robot.move("@P P1") robot.move("@0 P1") robot.move("P1+(0,0,10)") ``` For a single-target `move()`, `@P` and `@0` do not affect blending. ### Numeric P Coordinates ```python robot.move( [300, 0, 200, 0, 180, 0], motion_mode=MotionMode.LINE, coord_type="P", ) ``` ### Numeric J Coordinates ```python robot.move( [0, -90, 90, 0, 90, 0], coord_type="J", ) ``` ## Internal Mapping | Input | Internal API | |---|---| | `coord_type="J"` | `moveJ()` | | P + `PTP` | `moveJ_IK()` | | P + `LINE` | `moveL()` | | Single-target `CIRCLE` / `SPLINE` | Unsupported | ## move_path() ```python robot.move_path( ["P1", "P2", "P3"], motion_mode=MotionMode.LINE, speed=20, accel=20, blend=None, is_async=True, ) ``` Perform a multi-target move. `blend` is measured in meters. If omitted, blending follows `path_blend`. - `@0`: blend = 0 - `@P`: `UR_DEFAULT_BLEND_RADIUS` ## dev() ```python target = robot.dev("P1", [0, 0, 10, 0, 0, 0]) ``` Add six components directly, similar to COBOTTA-style `P1+(...)`. ## pose_trans() ```python target = robot.pose_trans("P1", [0, 0, 10, 0, 0, 0]) ``` Compose poses in the same manner as URScript `pose_trans()`. ## p2j() / j2p() ```python j = robot.p2j([300, 0, 200, 0, 180, 0]) p = robot.j2p([0, -90, 90, 0, 90, 0]) ``` Perform inverse/forward kinematics. ## drive() ```python robot.drive((1, 5), relative=True) ``` Move the specified joint axis, numbered 1 through 6. ## stop() ```python robot.stop() ``` Call `stopL()` if the last motion mode was LINE; otherwise call `stopJ()`. `halt()`, `task_stop()`, and `hand_stop()` are aliases of `stop()`.