Skip to content

MOVE_POSE

Move the robot to a specified pose in space.Params:ip_address : TextBlobThe IP address of the robot arm.x : floatThe x coordinate of the position to move toy : floatThe y coordinate of the position to move toz : floatThe z coordinate of the position to move toalpha : floatThe alpha coordinate (rotation in radians about the x axis) of the position to move to.beta : floatThe beta coordinate (rotation in radians about the y axis) of the position to move to.gamma : floatThe gamma coordinate (rotation in radians about the z axis) of the position to move to.Returns:ip_address : TextBlobThe IP address of the robot arm.
Python Code
from typing import Optional

from flojoy import TextBlob, flojoy
from PYTHON.utils.mecademic_state.mecademic_state import query_for_handle


@flojoy(deps={"mecademicpy": "1.4.0"})
def MOVE_POSE(
    ip_address: TextBlob,
    x: float,
    y: float,
    z: float,
    alpha: Optional[float] = 0,
    beta: Optional[float] = 0,
    gamma: Optional[float] = 0,
) -> TextBlob:
    """
    Move the robot to a specified pose in space.


    Parameters
    ----------
    ip_address : TextBlob
        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
    -------
    ip_address : TextBlob
        The IP address of the robot arm.

    """
    robot = query_for_handle(ip_address)
    robot.MovePose(x=x, y=y, z=z, alpha=alpha, beta=beta, gamma=gamma)
    robot.WaitIdle()
    return ip_address

Find this Flojoy Block on GitHub

Example

Having problems with this example app? Join our Discord community and we will help you out!
React Flow mini map

In this example, the MOVE_POSE node moves the robot arm to a specified Cartesian position while also considering the orientation of the tool.

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_POSE node is particularly useful in workflows where both the position and orientation of the robot arm are crucial, such as aligning the arm with an object before picking it up.