ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I fixed it. The problem was that controller takes some time to subscribe to simulator topic and viceversa. So I put this in my code:
con_rate=rospy.Rate(rate)
while pub.get_num_connections() == 0:
con_rate.sleep()