ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 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.