Skip to content

Commit 701b379

Browse files
committed
constraints_from_configuration tests
1 parent 0b97acb commit 701b379

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compas_fab/robots/robot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,9 +1370,10 @@ def plan_motion(self, goal_constraints, start_configuration=None,
13701370
1.0
13711371
>>> # Example with joint constraints (to the UP configuration)
13721372
>>> configuration = Configuration.from_revolute_values([0.0, -1.5707, 0.0, -1.5707, 0.0, 0.0])
1373-
>>> tolerances = [math.radians(5)] * 6
1373+
>>> tolerances_above = [math.radians(5)] * len(configuration.values)
1374+
>>> tolerances_below = [math.radians(5)] * len(configuration.values)
13741375
>>> group = robot.main_group_name
1375-
>>> goal_constraints = robot.constraints_from_configuration(configuration, tolerances, group)
1376+
>>> goal_constraints = robot.constraints_from_configuration(configuration, tolerances_above, tolerances_below, group)
13761377
>>> trajectory = robot.plan_motion(goal_constraints, start_configuration, group, planner_id='RRT')
13771378
>>> trajectory.fraction
13781379
1.0

0 commit comments

Comments
 (0)