Skip to content

Commit ab0e818

Browse files
committed
Merge pull request #120 from personalrobotics/bugfix/tsr_planner_gil
IK GIL release.
2 parents 40f7894 + 3e9abfa commit ab0e818

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

src/prpy/planning/ik.py

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

6870
if ik_solutions.shape[0] == 0:
6971
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
@@ -88,7 +88,10 @@ def PlanToEndEffectorPose(self, robot, goal_pose, **kw_args):
8888
manipulator = robot.GetActiveManipulator()
8989
current_config = robot.GetDOFValues(manipulator.GetArmIndices())
9090
ik_param = openravepy.IkParameterization(goal_pose, ikp.Transform6D)
91-
ik_solution = manipulator.FindIKSolution(ik_param, ikfo.CheckEnvCollisions)
91+
ik_solution = manipulator.FindIKSolution(
92+
ik_param, ikfo.CheckEnvCollisions,
93+
ikreturn=False, releasegil=True
94+
)
9295

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

src/prpy/planning/tsr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ def PlanToTSR(self, robot, tsrchains, tsr_timeout=2.0,
119119
ik_param = IkParameterization(
120120
tsrchain.sample(), IkParameterizationType.Transform6D)
121121
ik_solution = manipulator.FindIKSolutions(
122-
ik_param, IkFilterOptions.CheckEnvCollisions)
122+
ik_param, IkFilterOptions.CheckEnvCollisions,
123+
ikreturn=False, releasegil=True
124+
)
123125
if ik_solution.shape[0] > 0:
124126
ik_solutions.append(ik_solution)
125127

src/prpy/planning/workspace.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ def PlanWorkspacePath(self, robot, traj, timelimit=5.0,
185185
qcurr = robot.GetActiveDOFValues() # Configuration at t.
186186
qnew = manip.FindIKSolution(
187187
openravepy.matrixFromPose(traj.Sample(t+dt)[0:7]),
188-
ik_options
188+
ik_options,
189+
ikreturn=False,
190+
releasegil=True
189191
)
190192

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

0 commit comments

Comments
 (0)