def setUp(self):
     rospy.init_node(NAME)
     
     self.fixture_curr = None
     self.test_curr = None
     
     rospy.Subscriber('composite_in', Composite, self.cb_from_fixture)
     rospy.Subscriber('composite_out', Composite, self.cb_from_test)
 def setUp(self):
     rospy.init_node(NAME)
     
     self.fixture_curr = None
     self.test_curr = None
     
     rospy.Subscriber('test_header_in', TestHeader, self.cb_from_fixture)
     rospy.Subscriber('test_header_out', TestHeader, self.cb_from_test)
def publisher():
  rospy.init_node('string_publisher')
  pub = rospy.Publisher('string_in', std_msgs.msg.String)
  m = std_msgs.msg.String(rospy.get_name())
  r = rospy.Rate(10)
  while not rospy.is_shutdown():
    pub.publish(m)
    r.sleep()
 def setUp(self):
     rospy.init_node(NAME)
     
     # keep track of Nth and (N-1)th message
     self.fixture_prev = self.fixture_curr = None
     self.test_prev = self.test_curr = None
     
     rospy.Subscriber('int64_in', Int64, self.cb_from_fixture)
     rospy.Subscriber('int64_out', Int64, self.cb_from_test)
def publisher():
  rospy.init_node('testheader_publisher')
  pub = rospy.Publisher('test_header_in', rosjava_test_msgs.msg.TestHeader)
  r = rospy.Rate(10)
  m = rosjava_test_msgs.msg.TestHeader()
  m.caller_id = rospy.get_name()
  m.header.stamp = rospy.get_rostime()
  while not rospy.is_shutdown():
    pub.publish(m)
    r.sleep()
def publisher():
  rospy.init_node('int64_publisher')
  pub = rospy.Publisher('int64_in', std_msgs.msg.Int64)
  i = 0
  r = rospy.Rate(10)
  m = std_msgs.msg.Int64(i)
  while not rospy.is_shutdown():
    pub.publish(m)
    i += 1
    m.data = i
    r.sleep()
 def setUp(self):
     rospy.init_node(NAME)
     self.nodes = ['/node%s'%(i) for i in xrange(10)]
     self.nodes_set = set(self.nodes)
     
     # keep track of nodes that have done callbacks
     self.fixture_nodes_cb = set()
     self.test_nodes_cb = set()
     
     rospy.Subscriber('string_in', String, self.cb_from_fixture)
     rospy.Subscriber('string_out', String, self.cb_from_test)
    def setUp(self):
        rospy.init_node(NAME)

        rospy.Subscriber('tilde', String, self.tilde_cb)
        rospy.Subscriber('string', String, self.string_cb)
        rospy.Subscriber('bool', Bool, self.bool_cb)
        rospy.Subscriber('list', TestArrays, self.list_cb)
        rospy.Subscriber('int', Int64, self.int_cb)
        rospy.Subscriber('float', Float64, self.float_cb)
        rospy.Subscriber('composite', Composite, self.composite_cb)
        
        self.list_msg = self.tilde_msg = self.string_msg = \
                        self.bool_msg = self.int_msg = self.float_msg = \
                        self.composite_msg = None
        self.tests = ['string', 'int', 'bool', 'float', 'composite', 'list']
def publisher():
  rospy.init_node('composite_publisher')
  pub = rospy.Publisher('composite_in', test_ros.msg.Composite)
  r = rospy.Rate(10)
  m = test_ros.msg.Composite()
  m.a.x = random.random() * 10000.
  m.a.y = random.random() * 10000.
  m.a.z = random.random() * 10000.
  m.a.w = m.a.x + m.a.y + m.a.z
  
  m.b.x = m.a.x
  m.b.y = m.a.y
  m.b.z = m.a.z
  
  while not rospy.is_shutdown():
    pub.publish(m)
    r.sleep()