Robot.position_constraint_from_frame

Robot.position_constraint_from_frame(frame_WCF, tolerance_position, group=None)[source]

Create a position constraint from a frame on the group’s end-effector link.

Parameters:
  • frame_WCF (compas.geometry.Frame) – The frame from which we create position and orientation constraints.

  • tolerance_position (float) – The allowed tolerance to the frame’s position (defined in the robot’s units).

  • group (str, optional) – The planning group for which we specify the constraint. Defaults to the robot’s main planning group.

Returns:

PositionConstraint

Notes

The rotation tolerance for an axis is defined by the other vector component values for rotation around corresponding axis. If you specify the tolerances_axes vector with [0.01, 0.01, 6.3], it means that the frame’s x-axis and y-axis are allowed to rotate about the z-axis by an angle of 6.3 radians, whereas the z-axis would only rotate by 0.01.

Examples

>>> frame = Frame([0.4, 0.3, 0.4], [0, 1, 0], [0, 0, 1])
>>> tolerance_position = 0.001
>>> robot.position_constraint_from_frame(frame, tolerance_position)
PositionConstraint('ee_link', BoundingVolume(2, Sphere(Point(0.400, 0.300, 0.400), 0.001)), 1.0)