31 import roslib; roslib.load_manifest(
'test_nodelet')
33 from std_msgs.msg
import Float64
39 def __init__(self, topic_in, topic_out, delta):
40 self.
pub = rospy.Publisher(topic_in, Float64)
41 self.
sub = rospy.Subscriber(topic_out, Float64, self.
callback)
48 def run(self, cycles = 10):
49 for i
in range(1, cycles):
58 rospy.loginfo(rospy.get_name()+
" I heard %s which was a change of %f",data.data, data.data-self.
send_value)
66 self.assertTrue(pb.run())
70 self.assertTrue(pb.run())
74 self.assertTrue(pb.run())
77 pb =
PlusTester(
"plus_remap/in",
"remapped_output", 2.1)
78 self.assertTrue(pb.run())
82 self.assertTrue(pb.run())
84 if __name__ ==
'__main__':
85 rospy.init_node(
'plus_local')
86 rostest.unitrun(
'test_nodelet',
'test_plus', TestPlus)
def test_standalone(self)
def test_default_param(self)
def __init__(self, topic_in, topic_out, delta)