Robot.orientation_constraint_from_frame

Robot.orientation_constraint_from_frame(frame_WCF, tolerances_axes, group=None)[source]

Returns an orientation constraint on the group’s end-effector link.

Parameters
  • frame_WCF (compas.geometry.Frame) – The frame from which we create the orientation constraint.

  • tolerances_axes (list of float) – Error tolerances ti for each of the frame’s axes in radians. If only one value is passed it will be uses for all 3 axes.

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

Examples

>>> frame = Frame([0.4, 0.3, 0.4], [0, 1, 0], [0, 0, 1])
>>> tolerances_axes = [math.radians(1)] * 3
>>> group = robot.main_group_name
>>> robot.orientation_constraint_from_frame(frame, tolerances_axes, group=group)
OrientationConstraint('ee_link', [0.5, 0.5, 0.5, 0.5], [0.017453292519943295, 0.017453292519943295, 0.017453292519943295], 1.0)

Notes

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.