Whenever i try to call '/move_bb8_in_square_custom' in bb8 services project for second time it gives error?

service executes fine when I call the first time. However, if I again call the service during second-time service execute successfully followed by this error.
success: True
Unhandled exception in thread started by
sys.excepthook is missing
lost sys.stderr

Hi @vasank1958,

It’s possible that your service server code is not exiting properly. Could you check that you are closing the service call properly, as shown in the example?

One more thing: can you call the service the third time?

yes sir i can keep calling n number of times . however one peculiar thing i noticed is that this error occurs only when i reset the simulation after every service call. if i dont reset the simulation and keep calling the service it works fine :slight_smile:

1 Like

Huh, that could probably happen because the reset is confusing the program in some way because the position of the robot suddenly changes. Are you resetting in the middle of a call?

What I would recommend in this case is that you ensure that, if not already, the robot has a clean exit once it has finished a call. Such ‘clean exit’ might be that you stop the robot and any publisher publishing into it so that it would have a clean start at the next call.