Skip to content

Commit 0341a99

Browse files
committed
Adding a check that the robot and trajectory environments match
1 parent 3175cb5 commit 0341a99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/prpy/util.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,9 @@ def IsAtTrajectoryStart(robot, trajectory):
723723
if needs_base and needs_joints:
724724
raise ValueError('Trajectories with affine and joint DOFs are not supported')
725725

726+
if trajectory.GetEnv() != robot.GetEnv():
727+
raise ValueError('The environment attached to the trajectory does not match the environment attached to the robot')
728+
726729
if needs_base:
727730
doft = openravepy.DOFAffine.X | openravepy.DOFAffine.Y | openravepy.DOFAffine.RotationAxis
728731
current_pose = openravepy.RaveGetAffineDOFValuesFromTransform(robot.GetTransform(), doft)

0 commit comments

Comments
 (0)