rospy.Time.now() returns 0
#! /usr/bin/env python
import rospy
rospy.init_node('h')
print(rospy.Time.now()) => 0
Prints zero? Here is the context
- Kinetic
rosparam get /use_sim_time -> true
$ rostopic info /clock Type: rosgraph_msgs/Clock
Publishers:
- /gazebo ( http://10.0.0.95:36787/ )
Subscribers:
- /rosout ( http://10.0.0.95:45435/ )
- /gazebo ( http://10.0.0.95:36787/ )
- /gazebo_gui ( http://10.0.0.95:43597/ )
Is Gazebo paused?
No, it’s up. Also when I rostopic echo /clock I see the messages go by. Also when I set /use_sim_time to False the same code works.
Anyone? I am stumped. Thinking that I had corrupted something in my install, i see the same behavior on a different computer altogether.