本文整理汇总了Python中pid.PID.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python PID.__init__方法的具体用法?Python PID.__init__怎么用?Python PID.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pid.PID
的用法示例。
在下文中一共展示了PID.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pid import PID [as 别名]
# 或者: from pid.PID import __init__ [as 别名]
def __init__(self, P=2.0, I=0.0, D=1.0, Derivator=0, Integrator=0, \
Integrator_max=500, Integrator_min=-500, set_point=10):
print "in pid44: ", P,I,D
self.current=[0, 0, 0, 0, 0]
self.data_number=0
PID.__init__(self, P, I, D, Derivator=0, Integrator=0, \
Integrator_max=500, Integrator_min=-500)
PID.setPoint(self, set_point)
示例2: __init__
# 需要导入模块: from pid import PID [as 别名]
# 或者: from pid.PID import __init__ [as 别名]
def __init__(self):
PID.__init__(self)
self.setKp(0.05)
self.setKi(0.003)
self.setKd(0.00075)
self.setPoint(0)
self.theta = 0
self.thetaA = 0
self.thetaG = 0
self.lwEffort = 0
self.rwEffort = 0
self.Effort = 0
self.yawEffort = 0
self.lwEffortPublisher = rospy.Publisher('selbie/selbie_lj_effort_controller/command', Float64, queue_size=10)
self.rwEffortPublisher = rospy.Publisher('selbie/selbie_rj_effort_controller/command', Float64, queue_size=10)
示例3: __init__
# 需要导入模块: from pid import PID [as 别名]
# 或者: from pid.PID import __init__ [as 别名]
def __init__(self):
PID.__init__(self)
invpen.__init__(self)
self.handles()
self.setKp(4) #self.setKp(1.75) #Always do PID tuning by ziegler nicols method 38.2 because it works
self.setKi(0) #self.setKi(0.16)
self.setKd(0) #self.setKd(0.048)
self.setPoint(0)
self.theta = 0
self.thetaA = 0
self.thetaG = 0
self.velocity = 0
self.lwVelocity = 0
self.rwVelocity = 0
self.yawVelocity = 0
self.getSensorReadings()
self.enableSubscibers()
self.velocityPublisherJ1 = rospy.Publisher('vrep/targetVelocityJ1', Float64, queue_size=10)
self.velocityPublisherJ2 = rospy.Publisher('vrep/targetVelocityJ2', Float64, queue_size=10)
示例4: __init__
# 需要导入模块: from pid import PID [as 别名]
# 或者: from pid.PID import __init__ [as 别名]
def __init__(self, gains):
PID.__init__(self, gains, derivator=0, integrator=0, integrator_max=500, integrator_min=-500)