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

Revision history [back]

http://wiki.ros.org/rospy/Overview/Time#Timer

def update1(event):
    pub1.publish(msg1)

def update2(event):
    pub2.publish(msg2)

def update3(event):
    pub3.publish(msg3)
...

rospy.Timer(rospy.Duration(1.0 / rate1), update1)
rospy.Timer(rospy.Duration(1.0 / rate2), update2)
rospy.Timer(rospy.Duration(1.0 / rate3), update3)
...