本文整理汇总了Python中dynamic_graph.sot.core.Task.signal方法的典型用法代码示例。如果您正苦于以下问题:Python Task.signal方法的具体用法?Python Task.signal怎么用?Python Task.signal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dynamic_graph.sot.core.Task
的用法示例。
在下文中一共展示了Task.signal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setupJointLimitTask
# 需要导入模块: from dynamic_graph.sot.core import Task [as 别名]
# 或者: from dynamic_graph.sot.core.Task import signal [as 别名]
def setupJointLimitTask():
featureJl = FeatureJointLimits('featureJl')
featureJl.actuate()
dyn = robot.dynamic
plug(dyn.signal('position'), featureJl.signal('joint'))
plug(dyn.signal('upperJl'), featureJl.signal('upperJl'))
plug(dyn.signal('lowerJl'), featureJl.signal('lowerJl'))
taskJl = Task('taskJl')
taskJl.add('featureJl')
taskJl.signal('controlGain').value = .1
示例2: Nao
# 需要导入模块: from dynamic_graph.sot.core import Task [as 别名]
# 或者: from dynamic_graph.sot.core.Task import signal [as 别名]
class Nao(AbstractHumanoidRobot):
"""
This class instanciates a Nao robot as a humanoid robot
"""
halfSitting = tuple([0.,0.,.31,0.,0.,0.] + halfSitting)
def __init__(self, name, filename):
AbstractHumanoidRobot.__init__(self, name)
self.OperationalPoints.append('waist')
p = Parser(self.name + '_dynamic', filename)
self.dynamic = p.parse()
self.dimension = self.dynamic.getDimension()
if self.dimension != len(self.halfSitting):
raise RuntimeError("invalid half-sitting pose")
self.initializeRobot()
self.compoundDrive = CompoundDrive(self.name + '_compoundDrive',
self.device)
self.compoundDriveTask = Task(self.name + '_compoundDriveTask')
self.compoundDriveTask.add(self.name + '_compoundDrive')
self.compoundDriveTask.signal('controlGain').value = 1.