Skip to content

Commit 3e9abfa

Browse files
committed
Added releasegil flags to every FindIKSolution(s) call in prpy.
1 parent 98bb11c commit 3e9abfa

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/prpy/planning/ik.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def PlanToIK(self, robot, goal_pose, ranker=ik_ranking.JointLimitAvoidance,
6262
ik_param = IkParameterization(
6363
goal_pose, IkParameterizationType.Transform6D)
6464
ik_solutions = manipulator.FindIKSolutions(
65-
ik_param, IkFilterOptions.CheckEnvCollisions)
65+
ik_param, IkFilterOptions.CheckEnvCollisions,
66+
ikreturn=False, releasegil=True
67+
)
6668

6769
if ik_solutions.shape[0] == 0:
6870
raise PlanningError('There is no IK solution at the goal pose.')

src/prpy/planning/snap.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ def PlanToEndEffectorPose(self, robot, goal_pose, **kw_args):
8787
manipulator = robot.GetActiveManipulator()
8888
current_config = robot.GetDOFValues(manipulator.GetArmIndices())
8989
ik_param = openravepy.IkParameterization(goal_pose, ikp.Transform6D)
90-
ik_solution = manipulator.FindIKSolution(ik_param, ikfo.CheckEnvCollisions)
90+
ik_solution = manipulator.FindIKSolution(
91+
ik_param, ikfo.CheckEnvCollisions,
92+
ikreturn=False, releasegil=True
93+
)
9194

9295
if ik_solution is None:
9396
raise PlanningError('There is no IK solution at the goal pose.')

src/prpy/planning/workspace.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def PlanWorkspacePath(self, robot, traj, timelimit=5.0,
182182
qcurr = robot.GetActiveDOFValues() # Configuration at t.
183183
qnew = manip.FindIKSolution(
184184
openravepy.matrixFromPose(traj.Sample(t+dt)[0:7]),
185-
ik_options
185+
ik_options,
186+
ikreturn=False,
187+
releasegil=True
186188
)
187189

188190
# Check if the step was within joint DOF resolution.

0 commit comments

Comments
 (0)