4.13 Robot Teaching Motion
Overview
The Jogging module provides jog-control interfaces for the robot in teach mode, supporting single-axis stepping, continuous jogging, multi-axis coordinated motion, and emergency stop.
Using the jogging API you can remotely perform manual adjustments from the host PC that are identical to those on the teach pendant—ideal for debugging, teaching, or fine-tuning positions.
4.13.1 Robot Jogging Step Move
| Method Name | jogging.step_move( aj_num : int, step_length : float = 0, step_angle : float = 0) -> StatusCodeEnum |
|---|---|
| Description | Perform single-axis step jogging based on the configured step size. |
| Request Parameters | aj_num : int Values 1–6 correspond to axes in the current coordinate system. In Cartesian coordinates, x, y, z, rx, ry, rz map to 1–6. The sign indicates motion direction. step_length : float Linear step size in mm; omitted to keep the current step size. step_angle : float Rotational step size in degrees; omitted to keep the current rotation step. |
| Return Value | StatusCodeEnum: Function execution result |
| Compatible robot software version | Collaborative (Copper): v7.5.0.0+ Industrial (Bronze): v7.5.0.0+ |
Example Code
py
#!python
"""
Copyright © 2016 Agilebot Robotics Ltd. All rights reserved.
Instruction: 示教运动功能-步进关节点动运动使用示例 / Teaching motion function - Joint step motion usage example
"""
from Agilebot import Arm, StatusCodeEnum
# [ZH] 初始化Arm类
# [EN] Initialize the Arm class
arm = Arm()
# [ZH] 连接控制器
# [EN] Connect to the controller
ret = arm.connect("10.27.1.254")
if ret == StatusCodeEnum.OK:
print("机器人连接成功 / Robot connected successfully")
else:
print(f"机器人连接失败,错误代码 / Robot connection failed, error code: {ret.errmsg}")
arm.disconnect()
exit(1)
# [ZH] 仅支持手动模式下进行jogging
# [EN] Only manual mode is supported for jogging
# [ZH] 点动关节坐标系下的关节1
# [EN] Jog joint 1 under the joint coordinate system
ret = arm.jogging.step_move(1, 2, 2)
if ret == StatusCodeEnum.OK:
print("点动运动开始成功 / Jogging movement started successfully")
else:
print(f"点动运动开始失败,错误代码 / Jogging movement start failed, error code: {ret.errmsg}")
arm.disconnect()
exit(1)
# [ZH] 断开捷勃特机器人连接
# [EN] Disconnect from the robot
arm.disconnect()
print("机器人断开连接成功 / Robot disconnected successfully")4.13.2 Robot Jogging Continuous Move
| Method Name | jogging.continuous_move( aj_num : int) -> StatusCodeEnum |
|---|---|
| Description | Perform single-axis continuous jogging. |
| Request Parameters | aj_num : int Values 1–6 correspond to axes in the current coordinate system. In Cartesian coordinates, x, y, z, rx, ry, rz map to 1–6. The sign indicates motion direction. |
| Return Value | StatusCodeEnum: Function execution result |
| Compatible robot software version | Collaborative (Copper): v7.5.0.0+ Industrial (Bronze): v7.5.0.0+ |
Example Code
py
#!python
"""
Copyright © 2016 Agilebot Robotics Ltd. All rights reserved.
Instruction: 示教运动功能-单关节点动运动使用示例 / Example of Teaching motion function - Single-joint motion usage
"""
import time
from Agilebot import Arm, StatusCodeEnum
# [ZH] 初始化Arm类
# [EN] Initialize the Arm class
arm = Arm()
# [ZH] 连接控制器
# [EN] Connect to the controller
ret = arm.connect("10.27.1.254")
if ret == StatusCodeEnum.OK:
print("机器人连接成功 / Robot connected successfully")
else:
print(f"机器人连接失败,错误代码 / Robot connection failed, error code: {ret.errmsg}")
arm.disconnect()
exit(1)
# [ZH] 仅支持手动模式下进行jogging
# [EN] Only manual mode is supported for jogging
# [ZH] 点动关节坐标系下的关节1
# [EN] Jog joint 1 under the joint coordinate system
ret = arm.jogging.continuous_move(1)
if ret == StatusCodeEnum.OK:
print("点动运动开始成功 / Jogging movement started successfully")
else:
print(f"点动运动开始失败,错误代码 / Jogging movement start failed, error code: {ret.errmsg}")
arm.disconnect()
exit(1)
# [ZH] 运动3s
# [EN] Move for 3 seconds
time.sleep(3)
# [ZH] 停止
# [EN] Stop
arm.jogging.stop()
# [ZH] 断开捷勃特机器人连接
# [EN] Disconnect from the robot
arm.disconnect()
print("机器人断开连接成功 / Robot disconnected successfully")4.13.3 Robot Multi-axis Jogging Continuous Move
| Method Name | jogging.multi_move( aj_num : List[int]) -> StatusCodeEnum |
|---|---|
| Description | Perform multi-axis continuous jogging. |
| Request Parameters | aj_num : List[int] Values 1–6 correspond to axes in the current coordinate system; list only the axes to move. In Cartesian coordinates, x, y, z, rx, ry, rz map to 1–6. The sign of each value indicates motion direction. |
| Return Value | StatusCodeEnum: Function execution result |
| Compatible robot software version | Collaborative (Copper): v7.5.0.0+ Industrial (Bronze): v7.5.0.0+ |
Example Code
py
#!python
"""
Copyright © 2016 Agilebot Robotics Ltd. All rights reserved.
Instruction: 示教运动功能-多关节点动运动使用示例 / / Teaching motion function - Multi-joint motion usage example
"""
import time
from Agilebot import Arm, StatusCodeEnum
# [ZH] 初始化Arm类
# [EN] Initialize the Arm class
arm = Arm()
# [ZH] 连接控制器
# [EN] Connect to the controller
ret = arm.connect("10.27.1.254")
if ret == StatusCodeEnum.OK:
print("机器人连接成功 / Robot connected successfully")
else:
print(f"机器人连接失败,错误代码 / Robot connection failed, error code: {ret.errmsg}")
arm.disconnect()
exit(1)
# [ZH] 仅支持手动模式下进行jogging
# [EN] Only manual mode is supported for jogging
# [ZH] 点动关节坐标系下的关节1,2,3
# [EN] Jog joint 1,2,3 under the joint coordinate system
ret = arm.jogging.multi_move([1, 2, 3])
if ret == StatusCodeEnum.OK:
print("点动运动开始成功 / Jogging movement started successfully")
else:
print(f"点动运动开始失败,错误代码 / Jogging movement start failed, error code: {ret.errmsg}")
arm.disconnect()
exit(1)
# [ZH] 运动3s
# [EN] Move for 3 seconds
time.sleep(3)
# [ZH] 停止
# [EN] Stop
arm.jogging.stop()
# [ZH] 断开捷勃特机器人连接
# [EN] Disconnect from the robot
arm.disconnect()
print("机器人断开连接成功 / Robot disconnected successfully")4.13.4 Stop the Robot Continuous Move
| Method Name | jogging.stop() |
|---|---|
| Description | Terminate the robot jog (JOG) motion. |
| Request Parameters | No parameters |
| Return Value | StatusCodeEnum: Function execution result |
| Compatible robot software version | Collaborative (Copper): v7.5.0.0+ Industrial (Bronze): v7.5.0.0+ |