3 """ A dummy ROS node """ 4 from __future__
import absolute_import
14 if __name__ ==
'__main__':
16 args = rospy.myargv(argv=sys.argv)
17 node_name = args[1]
if len(args) > 1
else 'string_pubnot_node' 19 rospy.init_node(node_name)
20 rospy.loginfo(
'String Pub node started. [' + rospy.get_name() +
']')
22 topic_name = rospy.get_param(
"~topic_name",
"")
23 print 'Parameter {0!s} has value {1!s}'.format(rospy.resolve_name(
'~topic_name'), topic_name)
25 print "{0} parameter not found".format(rospy.resolve_name(
'~topic_name'))
27 test_message = rospy.get_param(
"~test_message",
"")
28 print 'Parameter {0!s} has value {1!s}'.format(rospy.resolve_name(
'~test_message'), test_message)
29 if test_message ==
"":
30 print "{0} parameter not found".format(rospy.resolve_name(
'~test_message'))
33 pub = rospy.Publisher(topic_name, std_msgs.msg.String, queue_size=1)
36 while not rospy.is_shutdown():
41 except rospy.ROSInterruptException: