ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Solved the issue by having the callback function change a global variable which is checked by the main loop/thread as follows:
while not rospy.is_shutdown():
if run_test_img == True:
testImg()
rate.sleep()
A bit hacky but it does the job.