Source code for morse.middleware.pocolibs.actuators.platine
from morse.middleware.pocolibs_datastream import PocolibsDataStreamInput, poster_name
from pom.struct import *
from platine.struct import *
[docs]class PlatinePoster(PocolibsDataStreamInput):
_type_name = "POM_SE_POSTER"
_type_url = "http://trac.laas.fr/git/pom-genom/tree/pomStruct.h#n167"
[docs] def initialize(self):
PocolibsDataStreamInput.initialize(self, POM_SE_POSTER)
[docs] def default(self, component):
pos = self.read()
if pos:
euler = pos.seConfig.euler
self.data['pan'] = euler.yaw
self.data['tilt'] = euler.pitch
return pos
[docs]class PlatineAxisPoster(PocolibsDataStreamInput):
_type_name = "PLATINE_AXIS_STR"
_type_url = "http://trac.laas.fr/git/platine-genom/tree/platineStruct.h#n16"
[docs] def initialize(self):
PocolibsDataStreamInput.initialize(self, PLATINE_AXIS_STR)
[docs] def default(self, component):
pos = self.read()
if pos:
self.data['pan'] = pos.pan
self.data['tilt'] = pos.tilt
return pos