def mouthcallback(self, data): am = Angle() an = Angle() am.angle = self.distToMouthAngle(data.Distance) an.angle = self.angleToNeckAngle(data.Angle) print "Mouth:", am.angle, " | Neck :", an.angle self.mouthpub.publish(am) self.neckpub.publish(an)
def neckcallback(self, data): a = Angle() a.angle = (-1*data.data)/2+50 print "Neck: ", a.angle