Skip to content

Commit 37b34c8

Browse files
committed
Add support for WorldFixedOrientConstraint
1 parent d853847 commit 37b34c8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/python/director/pydrakeik.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@ def handleQuatConstraint(self, c, fields):
328328
qc = pydrakeik.WorldQuatConstraint(self.rigidBodyTree, bodyId, quat, tolerance, tspan)
329329
return qc
330330

331+
def handleWorldFixedOrientConstraint(self, c, fields):
332+
333+
bodyId = self.bodyNameToId[c.linkName]
334+
tspan = np.asarray(c.tspan, dtype=float)
335+
336+
wc = pydrakeik.WorldFixedOrientConstraint(self.rigidBodyTree, bodyId, tspan)
337+
return wc
338+
331339
def handleWorldGazeDirConstraint(self, c, fields):
332340

333341
bodyId = self.bodyNameToId[c.linkName]
@@ -408,6 +416,7 @@ def makeConstraints(self, fields):
408416
ikconstraints.PositionConstraint : self.handlePositionConstraint,
409417
ikconstraints.FixedLinkFromRobotPoseConstraint : self.handleFixedLinkFromRobotPoseConstraint,
410418
ikconstraints.QuatConstraint : self.handleQuatConstraint,
419+
ikconstraints.WorldFixedOrientConstraint : self.handleWorldFixedOrientConstraint,
411420
ikconstraints.WorldGazeDirConstraint : self.handleWorldGazeDirConstraint,
412421
ikconstraints.WorldGazeOrientConstraint : self.handleWorldGazeOrientConstraint,
413422
ikconstraints.PostureConstraint : self.handlePostureConstraint,

0 commit comments

Comments
 (0)