EGM (Externally Guided Motion)
abb_robot_client.egm
- class abb_robot_client.egm.EGM(port=6510)
ABB EGM (Externally Guided Motion) client. EGM provides a real-time streaming connection to the robot using UDP, typically at a rate of 250 Hz. The robot controller initiates the connection. The IP address and port of the client must be configured on the robot controller side. The EGM client will send commands to the port it receives packets from.
- Parameters:
port (
int) – The port to receive UDP packets. Defaults to 6510
- close()
Close the connection to the robot.
- receive_from_robot(timeout=0)
Receive feedback from the robot. Specify an optional timeout. Returns a tuple with success and the current robot state.
- Parameters:
timeout (
float) – Timeout in seconds. May be zero to immediately return if there is no new data.- Return type:
Tuple[bool,EGMRobotState]- Returns:
Success and robot state as a tuple
- send_to_robot(joint_angles, speed_ref=None, external_joints=None, external_joints_speed=None, rapid_to_robot=None)
Send a joint command to robot. Returns False if no data has been received from the robot yet. The EGM operation must have been started with EGMActJoint and EGMRunJoint.
- Parameters:
joint_angles (
array) – Joint angle command in degrees- Return type:
bool- Returns:
True if successful, False if no data received from robot yet
- send_to_robot_cart(pos, orient, speed_ref=None, external_joints=None, external_joints_speed=None, rapid_to_robot=None)
Send a cartesian command to robot. Returns False if no data has been received from the robot yet. The pose is relative to the tool, workobject, and frame specified when the EGM operation is initialized. The EGM operation must have been started with EGMActPose and EGMRunPose.
- Parameters:
pos (
ndarray) – The position of the TCP in millimeters [x,y,z]orient (
ndarray) – The orientation of the TCP in quaternions [w,x,y,z]
- Returns:
True if successful, False if no data received from robot yet
- send_to_robot_path_corr(pos, age=1)
Send a path correction command. Returns False if no data has been received from the robot yet. The path correction is a displacement [x,y,z] in millimeters in path coordinates. The displacement uses “path coordinates”, which relate the direction of movement of the end effector. See CorrConn command in Technical reference manual RAPID Instructions, Functions and Data types for a detailed description of path coordinates. The EGM operation must have been started with EGMActMove, and use EGMMoveL and EGMMoveC commands.
- Parameters:
pos (
ndarray) – The displacement in path coordinates in millimeters [x,y,z]- Returns:
True if successful, False if no data received from robot yet
- class abb_robot_client.egm.EGMRobotState(joint_angles: array, rapid_running: bool, motors_on: bool, robot_message: Any, cartesian: Tuple[array, array], joint_angles_planned: array, cartesian_planned: Tuple[array, array], external_axes: array, external_axes_planned: array, measured_force: array, move_index: int, rapid_from_robot: array)
State information returned from robot through EGM
-
cartesian:
Tuple[array,array] Cartesian position of robot, in ([x,y,z],[w,x,y,z]) format
-
cartesian_planned:
Tuple[array,array] Planned (commanded) cartesian position of robot, in ([x,y,z],[w,x,y,z]) format
-
external_axes:
array External axes in degrees
-
external_axes_planned:
array Planned (commanded) external axes in degrees
-
joint_angles:
array Joint angles of robot in degrees. Length is 6 or 7 depending on robot
-
joint_angles_planned:
array Planned (commanded) joint angles of robot in degrees. Length is 6 or 7 depending on robot
-
measured_force:
array Measured force wrench in Nm and N
-
motors_on:
bool True if motors are on
-
move_index:
int Move index of current motion
-
rapid_from_robot:
array RAPID variables from robot
-
rapid_running:
bool True if RAPID program is running on controller
-
robot_message:
Any Full message returned from robot
-
cartesian: