"Have you called init_node()?"
hi everyone, when I'm trying to do the tutorial in http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28python%29 , I have a problem when I try to execute
rosrun beginner_tutorials talker.py
The error message is :
luigi@luigi-pc:~/ros_workspace/beginner_tutorials$ rosrun beginner_tutorials talker.py
Traceback (most recent call last):
File "/home/luigi/ros_workspace/beginner_tutorials/nodes/talker.py", line 11, in <module>
str = "hello world %s"%rospy.get_time()
File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/rostime.py", line 222, in get_time
return Time.now().to_sec()
File "/opt/ros/electric/stacks/ros_comm/clients/rospy/src/rospy/rostime.py", line 150, in now
raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?")
rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?
Anyone Can help me??
Thank you in advance
Luigi
Can you please post your python code? It at least differs somehow since the error comes in line 11 and not in line 9 which should be the str = ... line when you directly copy-pasted the code from the tutorial.
yes Lorenz, here it is :
https://sites.google.com/site/palmlster/home/code
in that page you can find the used code :)