4.9 Services-Quiz

The quiz grading bot stops at step 10, although the command “ros2 launch services_quiz services_quiz_client.launch.py” runs without errors if I start it manually from a terminal.

The robot turns an everythings seems fine…

It says:…
[18:42:20] [assess] Could not launch services_quiz service client successfully. Can you believe that?
The launch command exited earlier than expected. What could be wrong?

  • Does your service client node exit in 10 seconds or less? Did it complete the expected movement?
  • Did you name the launch file correctly? It should be services_quiz_client.launch.py
  • Are you also calling the service from the services_quiz_server.launch.py file? Please don’t.
  • Start the service server and then run ros2 launch services_quiz services_quiz_client.launch.py and fix any errors that appears. (mark: 6.0)

Hi @proftronic, this is an issue with how the grading bot work I suppose. May you please try adding a delay so that the node is kept spinning for longer than 10 seconds and see if it changes anything.

Hi @takavarasha, the problem was that I used a timer and a timer-callback-function to stop the movement after 10s. But the “sucess”-response was sent in the service-callback-function after starting the timer, therefore a lot earlier than 10s.

So the advise here should be: Don’t use a timer function/callback and do all the waiting etc. in the server-callback.

Thanks

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.