Ejemplo n.º 1
0
class EuropaIMU(Output):
  def __init__(self, client = None, sensor = None, message = "", **kargs):
    super(EuropaIMU, self).__init__(**kargs)

    self.client = client
    self.sensor = sensor
    self.message = message

    self.publisher = CEuropaIMU("CEuropaIMU", self.client.client, self.message)
    self.publisher.reparentTo(self)

#-------------------------------------------------------------------------------

  def outputData(self, time):
    self.publisher.publish(time, self.sensor.timestamp,
      panda.Vec3(*self.sensor.globalOrientation),
      panda.Vec3(*self.sensor.translationalAcceleration))
Ejemplo n.º 2
0
  def __init__(self, client = None, sensor = None, message = "", **kargs):
    super(EuropaIMU, self).__init__(**kargs)

    self.client = client
    self.sensor = sensor
    self.message = message

    self.publisher = CEuropaIMU("CEuropaIMU", self.client.client, self.message)
    self.publisher.reparentTo(self)