6 from std_msgs.msg
import String
10 rospy.init_node(
'sample_node', anonymous=
True)
11 pub = rospy.Publisher(
'/test_plugin', String, queue_size=10)
12 param1 = rospy.get_param(
'~param1')
13 param2 = rospy.get_param(
'~param2')
14 success = rospy.get_param(
'~success',
False)
15 fail = rospy.get_param(
'~fail',
False)
16 rospy.loginfo(
'~A started.'.format(rospy.get_name()))
17 rospy.loginfo(
'param1: {}'.format(param1))
18 rospy.loginfo(
'param2: {}'.format(param2))
20 while not rospy.is_shutdown():
21 pub.publish(
"{{'param1': '{}', 'param2': '{}'}}".format(param1, param2))
28 if __name__ ==
'__main__':
31 except rospy.ROSInterruptException: