Skip to content

Jointed

This module provides the base class for jointed robot arms.

CLASS DESCRIPTION
RobotArm

RobotArm provides methods to control a robot arm

Documentation last updated: 2025-02-22

RobotArm

RobotArm(
    *args,
    home_waypoints: Sequence[Position] | None = None,
    joint_limits: Sequence[Sequence[float]] | None = None,
    **kwargs,
)

Bases: Mover

RobotArm provides methods to control a robot arm

ATTRIBUTE DESCRIPTION
home_waypoints

home waypoints for the robot

TYPE: list[Position]

joint_limits

joint limits for the robot

TYPE: ndarray

joint_position

current joint angles

TYPE: ndarray

connection_details

connection details for the device

TYPE: dict

device

device object that communicates with physical tool

TYPE: Device

flags

flags for the class

TYPE: SimpleNamespace[str, bool]

is_busy

whether the device is busy

TYPE: bool

is_connected

whether the device is connected

TYPE: bool

verbose

verbosity of class

TYPE: bool

deck

Deck object for workspace

TYPE: Deck

workspace

workspace bounding box

TYPE: BoundingVolume

safe_height

safe height in terms of robot coordinate system

TYPE: float

saved_positions

dictionary of saved positions

TYPE: dict

current_zone_waypoints

current zone entry waypoints

TYPE: tuple[str, list[Position]]

speed

travel speed of robot

TYPE: float

speed_factor

fraction of maximum travel speed of robot

TYPE: float

speed_max

maximum speed of robot in mm/min

TYPE: float

robot_position

current position of the robot

TYPE: Position

home_position

home position of the robot in terms of robot coordinate system

TYPE: Position

tool_offset

tool offset from robot to end effector

TYPE: Position

calibrated_offset

calibrated offset from robot to work position

TYPE: Position

scale

factor to scale the basis vectors by

TYPE: float

tool_position

robot position of the tool end effector

TYPE: Position

work_position

work position of the robot

TYPE: Position

worktool_position

work position of the tool end effector

TYPE: Position

position

work position of the tool end effector; alias for worktool_position

TYPE: Position

METHOD DESCRIPTION
isFeasibleJoint

checks and returns whether the target joint angles are feasible

jointMoveBy

move the robot by target joint angles

jointMoveTo

move the robot to target joint position

updateJointPosition

update the joint position based on relative or absolute movement

connect

connect to the device

disconnect

disconnect from the device

resetFlags

reset all flags to class attribute _default_flags

shutdown

shutdown procedure for tool

enterZone

enter a zone on the deck

exitZone

exit the current zone on the deck

halt

halt robot movement

home

make the robot go home

isFeasible

checks and returns whether the target coordinates is feasible

loadDeck

load Deck layout object to mover

loadDeckFromDict

load Deck layout object from dictionary

loadDeckFromFile

load Deck layout object from file

move

move the robot in a specific axis by a specific value

moveBy

move the robot by target direction

moveTo

move the robot to target position

moveToSafeHeight

move the robot to safe height

moveRobotTo

move the robot to target position

moveToolTo

move the tool end effector to target position

reset

reset the robot

rotate

rotate the robot in a specific axis by a specific value

rotateBy

rotate the robot by target rotation

rotateTo

rotate the robot to target orientation

rotateRobotTo

rotate the robot to target orientation

rotateToolTo

rotate the tool end effector to target orientation

safeMoveTo

safe version of moveTo by moving to safe height first

setSafeHeight

set safe height for robot

setSpeedFactor

set the speed factor of the robot

setToolOffset

set the tool offset of the robot

showWorkspace

show the workspace of the robot

updateRobotPosition

update the robot position

transformRobotToTool

transform robot coordinates to tool coordinates

transformRobotToWork

transform robot coordinates to work coordinates

transformToolToRobot

transform tool coordinates to robot coordinates

transformWorkToRobot

transform work coordinates to robot coordinates

calibrate

calibrate the internal and external coordinate systems

Initialize RobotArm class

PARAMETER DESCRIPTION
home_waypoints

home waypoints for the robot. Defaults to list().

TYPE: Sequence[Position] DEFAULT: None

joint_limits

joint limits for the robot. Defaults to None.

TYPE: Sequence[Sequence[float]] DEFAULT: None

joint_position property writable

joint_position: ndarray

Current joint angles

home

home(axis: str | None = None) -> bool

Make the robot go home

PARAMETER DESCRIPTION
axis

axis to home. Defaults to None.

TYPE: str DEFAULT: None

RETURNS DESCRIPTION
bool

whether the robot successfully homed

TYPE: bool

isFeasibleJoint

isFeasibleJoint(
    joint_position: Sequence[float] | ndarray,
) -> bool

Checks and returns whether the target joint angles are feasible

PARAMETER DESCRIPTION
joint_position

target joint angles

TYPE: Sequence[float] | ndarray

RETURNS DESCRIPTION
bool

whether the target coordinates are feasible

TYPE: bool

jointMoveBy

jointMoveBy(
    by: Sequence[float] | ndarray,
    speed_factor: float | None = None,
    *,
    jog: bool = False,
    rapid: bool = False,
    robot: bool = True,
) -> ndarray

Move the robot by target joint angles

PARAMETER DESCRIPTION
by

target joint angles to move by

TYPE: Sequence[float] | ndarray

speed_factor

fraction of maximum speed to travel at. Defaults to None.

TYPE: float DEFAULT: None

jog

whether to jog the robot. Defaults to False.

TYPE: bool DEFAULT: False

rapid

whether to move rapidly. Defaults to False.

TYPE: bool DEFAULT: False

robot

whether to move the robot. Defaults to True.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
ndarray

np.ndarray: new robot joint position

jointMoveTo

jointMoveTo(
    to: Sequence[float] | ndarray,
    speed_factor: float | None = None,
    *,
    jog: bool = False,
    rapid: bool = False,
    robot: bool = True,
) -> Position

Move the robot to target joint position

PARAMETER DESCRIPTION
to

target joint positions

TYPE: Sequence[float] | ndarray

speed_factor

fraction of maximum speed to travel at. Defaults to None.

TYPE: float DEFAULT: None

jog

whether to jog the robot. Defaults to False.

TYPE: bool DEFAULT: False

rapid

whether to move rapidly. Defaults to False.

TYPE: bool DEFAULT: False

robot

whether to move the robot. Defaults to True.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
Position

np.ndarray: new robot joint position

rotateBy

rotateBy(
    by: Sequence[float] | Rotation | ndarray,
    speed_factor: float | None = None,
    *,
    jog: bool = False,
    robot: bool = True,
) -> Rotation

Rotate the robot by target rotation

PARAMETER DESCRIPTION
by

target rotation

TYPE: Sequence[float] | Rotation | ndarray

speed_factor

fraction of maximum speed to rotate at. Defaults to None.

TYPE: float DEFAULT: None

jog

whether to jog the robot. Defaults to False.

TYPE: bool DEFAULT: False

robot

whether to rotate the robot. Defaults to False.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
Rotation

new tool/robot orientation

TYPE: Rotation

rotateTo

rotateTo(
    to: Sequence[float] | Rotation | ndarray,
    speed_factor: float | None = None,
    *,
    jog: bool = False,
    robot: bool = False,
) -> Rotation

Rotate the robot to target orientation

PARAMETER DESCRIPTION
to

target orientation

TYPE: Sequence[float] | Rotation | ndarray

speed_factor

fraction of maximum speed to rotate at. Defaults to None.

TYPE: float DEFAULT: None

jog

whether to jog the robot. Defaults to False.

TYPE: bool DEFAULT: False

robot

whether to rotate the robot. Defaults to False.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Rotation

new tool/robot orientation

TYPE: Rotation

updateJointPosition

updateJointPosition(
    by: Sequence[float] | Rotation | ndarray | None = None,
    to: Sequence[float] | Rotation | ndarray | None = None,
)

Update the joint position based on relative or absolute movement

PARAMETER DESCRIPTION
by

relative movement. Defaults to None.

TYPE: Sequence[float] | Rotation | ndarray | None DEFAULT: None

to

absolute movement. Defaults to None.

TYPE: Sequence[float] | Rotation | ndarray | None DEFAULT: None