MOVE_JOINT
Linearly move the robot's tool to an absolute Cartesian position. Params: ip_address : String The IP address of the robot arm. x : float The x coordinate of the position to move to y : float The y coordinate of the position to move to z : float The z coordinate of the position to move to alpha : float The alpha coordinate (rotation in radians about the x axis) of the position to move to. beta : float The beta coordinate (rotation in radians about the y axis) of the position to move to. gamma : float The gamma coordinate (rotation in radians about the z axis) of the position to move to. Returns: out : String The IP address of the robot arm.
Python Code
from typing import Optional
from flojoy import flojoy, String
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle
from PYTHON.utils.mecademic_state.mecademic_helpers import safe_robot_operation
@safe_robot_operation
@flojoy(deps={"mecademicpy": "1.4.0"})
def MOVE_JOINT(
ip_address: String,
x: float,
y: float,
z: float,
alpha: Optional[float] = 0,
beta: Optional[float] = 0,
gamma: Optional[float] = 0,
) -> String:
"""
Linearly move the robot's tool to an absolute Cartesian position.
Parameters
----------
ip_address: String
The IP address of the robot arm.
x : float
The x coordinate of the position to move to
y : float
The y coordinate of the position to move to
z : float
The z coordinate of the position to move to
alpha : float, optional
The alpha coordinate (rotation in radians about the x axis) of the position to move to.
beta : float, optional
The beta coordinate (rotation in radians about the y axis) of the position to move to.
gamma : float, optional
The gamma coordinate (rotation in radians about the z axis) of the position to move to.
Returns
-------
String
The IP address of the robot arm.
"""
robot = query_for_handle(ip_address)
robot.MoveJoints(x, y, z, alpha, beta, gamma)
robot.WaitIdle()
return ip_address
Example
Having problems with this example app? Join our Discord community and we will help you out!
In this example, the MOVE_JOINT
node moves the robot arm to a specified Cartesian position.
The node takes in the x, y, and z coordinates, along with optional alpha, beta, and gamma rotations in radians.
After initiating the movement, the node waits for the robot arm to become idle, indicating that the movement is complete.
The MOVE_JOINT
node is commonly used in workflows where precise positioning of the robot arm is required, such as picking up an object or performing a specific task.