Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service /fsds/reset gets stuck after calling it a random amount of times. #267

Open
Joppe-Leers opened this issue Mar 23, 2021 · 0 comments

Comments

@Joppe-Leers
Copy link

Since we are trying to make the autonomous system with reinforcement learning, we call the reset service very often. It seems that after a random amount of time calling this service, it gets stuck at the same place. Random because I have seen it get stuck after calling it for 100 times up to 50000 times. After ctrl-c you see that the program stops at the same line every time like shown in the screenshot below.

image

If you want, you can reproduce this problem by executing this code.

import rospy
import time
from fs_msgs.srv import Reset

def callReset():
    rospy.wait_for_service('/fsds/reset')
    try:
        reset = rospy.ServiceProxy('/fsds/reset', Reset)
        reset(True)
    except rospy.ServiceException as e:
        print("Service call failed: %s"%e)

if __name__ == '__main__':
    rospy.init_node('FEB_autonomous_system', anonymous=True, disable_signals=True)
    count = 0
    while True:        
        count += 1
        callReset()
        print(count)
        #time.sleep(0.1)

We also have implemented a pause service and same thing happens there. I am not sure if this problem is with our code or something else. Did anyone already encountered this problem?

@Joppe-Leers Joppe-Leers changed the title Service /fsds/reset gets stuck after calling it random amount of time. Service /fsds/reset gets stuck after calling it a random amount of times. Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant