ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Your code is not doing this correctly. Please look at section 2 of http://wiki.ros.org/rospy/Overview/Time for the proper way to construct a while/Rate loop in python.
while not R.is_shutdown:
print(t_o)
pub.publish(t_o)
R.Rate(10) # <- wrong
R.spin() # <- wrong
2 | No.2 Revision |
Your code is not doing this correctly. Please look at section 2 of http://wiki.ros.org/rospy/Overview/Time for the proper way to construct a while/Rate loop in python.
while not R.is_shutdown:
R.is_shutdown: # <- wrong
print(t_o)
pub.publish(t_o)
R.Rate(10) # <- wrong
R.spin() # <- wrong