コード例 #1
0
ファイル: ros_pose_stamped.py プロジェクト: kralf/morsel-ros
class ROSPoseStamped(ROSOutput):
  def __init__(self, node, name = "ROSPoseStamped", topic = "pose", **kargs):
    ROSOutput.__init__(self, node, name = name, topic = topic, **kargs)

    self.publisher = CROSPoseStamped(name, self.node.node, self.topic,
      self.queueSize)
    self.publisher.reparentTo(self)

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

  def outputData(self, time):
    parentNode, parentFrame = self.frameParent

    if self.frame != parentFrame:
      translation = self.getPos(parentNode)
      rotation = self.getQuat(parentNode)

      self.publish(time, parentFrame, translation, rotation)
コード例 #2
0
class ROSPoseStamped(ROSOutput):
    def __init__(self, node, name="ROSPoseStamped", topic="pose", **kargs):
        ROSOutput.__init__(self, node, name=name, topic=topic, **kargs)

        self.publisher = CROSPoseStamped(name, self.node.node, self.topic,
                                         self.queueSize)
        self.publisher.reparentTo(self)


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

    def outputData(self, time):
        parentNode, parentFrame = self.frameParent

        if self.frame != parentFrame:
            translation = self.getPos(parentNode)
            rotation = self.getQuat(parentNode)

            self.publish(time, parentFrame, translation, rotation)
コード例 #3
0
ファイル: ros_pose_stamped.py プロジェクト: kralf/morsel-ros
  def __init__(self, node, name = "ROSPoseStamped", topic = "pose", **kargs):
    ROSOutput.__init__(self, node, name = name, topic = topic, **kargs)

    self.publisher = CROSPoseStamped(name, self.node.node, self.topic,
      self.queueSize)
    self.publisher.reparentTo(self)
コード例 #4
0
    def __init__(self, node, name="ROSPoseStamped", topic="pose", **kargs):
        ROSOutput.__init__(self, node, name=name, topic=topic, **kargs)

        self.publisher = CROSPoseStamped(name, self.node.node, self.topic,
                                         self.queueSize)
        self.publisher.reparentTo(self)