ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Although on the tutorial Writing a Simple Publisher and Subscriber (Python) doesn't answer your question, we can see that our executable only can public after call rospy.init_node, as you can see:

  • The next line, rospy.init_node(NAME, ...), is very important as it tells rospy the name of your node -- until rospy has this information, it cannot start communicating with the ROS Master.

When we try to public without calling rospy.init_node, the following exception is raised:

  • rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?

Although on the tutorial Writing a Simple Publisher and Subscriber (Python) doesn't answer your question, we can see that our executable only can public publish after call rospy.init_node, as you can see:

  • The next line, rospy.init_node(NAME, ...), is very important as it tells rospy the name of your node -- until rospy has this information, it cannot start communicating with the ROS Master.

When we try to public without calling rospy.init_node, the following exception is raised:

  • rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?

Although on the tutorial Writing a Simple Publisher and Subscriber (Python) doesn't answer your question, we can see that our executable only can publish after call rospy.init_node, as you can see:

  • The next line, rospy.init_node(NAME, ...), is very important as it tells rospy the name of your node -- until rospy has this information, it cannot start communicating with the ROS Master.

When we try to public publish without calling rospy.init_node, the following exception is raised:

  • rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?