Robot.position_constraint_from_frame

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

Returns a position and orientation constraint 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) – 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])
>>> 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)

Notes

There are many other possibilities of how to create a position and orientation constraints. Checkout compas_fab.robots.PositionConstraint and compas_fab.robots.OrientationConstraint.