Exercise 4.2 - model not responding

Hi @adamSB ,

I faced the exact same issue when I was learning that course.

The solution is to add rospy.sleep(1.0) after initializing the publisher.

rospy.init_node(‘holonomic_controller’, anonymous=True)
pub = rospy.Publisher(‘wheel_speed’, Float32MultiArray, queue_size=10)
rospy.sleep(1.0)  # add the line here <<<----------

The above is a quick solution only. The proper solution (best-practice) is to wait for at least one connection to the publisher as explained in this post: How to publish once (only one message) into a topic and get it to work

I remember asking the exact same question. Here is the link to actual solution provided by @albertoezquerro : [SOLVED] Holonomic Robot Not Moving - #2 by albertoezquerro

This should definitely fix the problem you are having.


1 Like