ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
First, every time you receive a message (that is, when the imageCallback
method is executed), you are re-creating your publishers, etc. Clearly, that's not what you want to do: all that should happen in the callback (as you have it set up) is image message processing.
Start there...straightening that out may also take care of your ros.spinOnce
in the callback and ros.spin
in main
.