Skip to content

Commit

Permalink
Add support for WorldFixedOrientConstraint
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-tri committed Mar 8, 2017
1 parent d853847 commit 37b34c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/python/director/pydrakeik.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ def handleQuatConstraint(self, c, fields):
qc = pydrakeik.WorldQuatConstraint(self.rigidBodyTree, bodyId, quat, tolerance, tspan)
return qc

def handleWorldFixedOrientConstraint(self, c, fields):

bodyId = self.bodyNameToId[c.linkName]
tspan = np.asarray(c.tspan, dtype=float)

wc = pydrakeik.WorldFixedOrientConstraint(self.rigidBodyTree, bodyId, tspan)
return wc

def handleWorldGazeDirConstraint(self, c, fields):

bodyId = self.bodyNameToId[c.linkName]
Expand Down Expand Up @@ -408,6 +416,7 @@ def makeConstraints(self, fields):
ikconstraints.PositionConstraint : self.handlePositionConstraint,
ikconstraints.FixedLinkFromRobotPoseConstraint : self.handleFixedLinkFromRobotPoseConstraint,
ikconstraints.QuatConstraint : self.handleQuatConstraint,
ikconstraints.WorldFixedOrientConstraint : self.handleWorldFixedOrientConstraint,
ikconstraints.WorldGazeDirConstraint : self.handleWorldGazeDirConstraint,
ikconstraints.WorldGazeOrientConstraint : self.handleWorldGazeOrientConstraint,
ikconstraints.PostureConstraint : self.handlePostureConstraint,
Expand Down

0 comments on commit 37b34c8

Please sign in to comment.