ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I think I got it :
There is 2 possible problem here :
You didn't close your subscriber : If you registered your subscriber (in your case : rosptopic echo /chatter) with a roscore, then you closed this roscore and open a new one, the subscriber will not receive any message from the new roscore. You can check it by :
Your publisher didn't have the time to send the message. Ros need some time to setup the publisher/Subscriber : https://github.com/ros/ros_comm/issues/176 or https://answers.ros.org/question/11167/how-do-i-publish-exactly-one-message/
Try to properly restart your roscore and subscriber and then try to add a little wait after your rospy.Publisher() to see if this works now.