Skip to content

Commit 791a751

Browse files
committed
Added env lock around robot DOF getters.
1 parent 4c9af43 commit 791a751

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/prpy/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,9 @@ def IsAtTrajectoryStart(robot, trajectory):
717717
trajectory.GetWaypoint(0), robot, dof_indices)
718718

719719
# Get current configuration of robot for used indices.
720-
robot_values = robot.GetDOFValues(dof_indices)
721-
dof_resolutions = robot.GetDOFResolutions(dof_indices)
720+
with robot.GetEnv():
721+
robot_values = robot.GetDOFValues(dof_indices)
722+
dof_resolutions = robot.GetDOFResolutions(dof_indices)
722723

723724
# Check deviation in each DOF, using OpenRAVE's SubtractValue function.
724725
dof_infos = zip(dof_indices, traj_values, robot_values, dof_resolutions)

0 commit comments

Comments
 (0)