Actions quiz grader problem

The grader gives this message : Action distance not publishing feedback.

Used manually here is the provided result as expected ? Note that with the grader the robot is not moving ( is the motion expected to be provided by the action server? )
ros2 action send_goal -f /distance_as actions_quiz_msg/action/Distance “{seconds: 20}”
Waiting for an action server to become available…
Sending goal:
seconds: 20

Feedback:
current_dist: 0.0

Goal accepted with ID: ddacc8f3d29c4280b1bc12258a6273c9

Feedback:
current_dist: 0.003839005035340137

Feedback:
current_dist: 0.0062069782790680605

Feedback:
current_dist: 0.007787622331243589

Feedback:
current_dist: 0.010608702802801987

Feedback:
current_dist: 0.019308901453624516

Feedback:
current_dist: 0.026114798096747077

Feedback:
current_dist: 0.028457424490750435

Feedback:
current_dist: 0.028962950283157415

Feedback:
current_dist: 0.031272239501026644

Feedback:
current_dist: 0.0342546432644161

Feedback:
current_dist: 0.04079429831763067

Feedback:
current_dist: 0.04626027809775543

Feedback:
current_dist: 0.04914220058079972

Feedback:
current_dist: 0.05051223887574463

Feedback:
current_dist: 0.05235155932022551

Feedback:
current_dist: 0.05579285545521684

Feedback:
current_dist: 0.05708747914271362

Feedback:
current_dist: 0.058223302104042585

Feedback:
current_dist: 0.0609033687827148

Result:
status: true
total_dist: 0.0609033687827148

Goal finished with status: SUCCEEDED

ros2 launch actions_quiz actions_quiz_client.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2024-12-18-03-03-48-999875-1_xterm-732
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [actions_quiz_client_node-1]: process started with pid [737]
[actions_quiz_client_node-1] [INFO] [1734491029.637748826] [my_action_client]: Sending goal
[actions_quiz_client_node-1] [INFO] [1734491029.638445365] [my_action_client]: Goal accepted by server, waiting for result
[actions_quiz_client_node-1] [INFO] [1734491029.638622969] [my_action_client]: Feedback received current_dist: 0.000000
[actions_quiz_client_node-1] [INFO] [1734491030.638734769] [my_action_client]: Feedback received current_dist: 0.241288
[actions_quiz_client_node-1] [INFO] [1734491031.638746576] [my_action_client]: Feedback received current_dist: 0.482569
[actions_quiz_client_node-1] [INFO] [1734491032.638705739] [my_action_client]: Feedback received current_dist: 0.723849
[actions_quiz_client_node-1] [INFO] [1734491033.638755454] [my_action_client]: Feedback received current_dist: 0.965129
[actions_quiz_client_node-1] [INFO] [1734491034.638738912] [my_action_client]: Feedback received current_dist: 1.206410
[actions_quiz_client_node-1] [INFO] [1734491035.638693061] [my_action_client]: Feedback received current_dist: 1.447690
[actions_quiz_client_node-1] [INFO] [1734491036.638679525] [my_action_client]: Feedback received current_dist: 1.688971
[actions_quiz_client_node-1] [INFO] [1734491037.638700382] [my_action_client]: Feedback received current_dist: 1.930251
[actions_quiz_client_node-1] [INFO] [1734491038.638690771] [my_action_client]: Feedback received current_dist: 2.171531
[actions_quiz_client_node-1] [INFO] [1734491039.639347469] [my_action_client]: Feedback received current_dist: 2.412812
[actions_quiz_client_node-1] [INFO] [1734491040.638755494] [my_action_client]: Feedback received current_dist: 2.654092
[actions_quiz_client_node-1] [INFO] [1734491041.638704117] [my_action_client]: Feedback received current_dist: 2.895372
[actions_quiz_client_node-1] [INFO] [1734491042.639353827] [my_action_client]: Feedback received current_dist: 3.136653
[actions_quiz_client_node-1] [INFO] [1734491043.638693407] [my_action_client]: Feedback received current_dist: 3.377933
[actions_quiz_client_node-1] [INFO] [1734491044.638793168] [my_action_client]: Feedback received current_dist: 3.619213
[actions_quiz_client_node-1] [INFO] [1734491045.639333145] [my_action_client]: Feedback received current_dist: 3.860494
[actions_quiz_client_node-1] [INFO] [1734491046.638640814] [my_action_client]: Feedback received current_dist: 4.101774
[actions_quiz_client_node-1] [INFO] [1734491047.638731531] [my_action_client]: Feedback received current_dist: 4.343054
[actions_quiz_client_node-1] [INFO] [1734491048.639197209] [my_action_client]: Feedback received current_dist: 4.584335
[actions_quiz_client_node-1] [INFO] [1734491049.638716681] [my_action_client]: Result received: status = true, total_dist = 4.58
[actions_quiz_client_node-1] [INFO] [1734491049.638770482] [my_action_client]: Goal finished with status : SUCCEEDED
[INFO] [actions_quiz_client_node-1]: process has finished cleanly [pid 737]

user:~$ ros2 topic echo /total_distance
data: 0.0

data: 0.2412883906114998

data: 0.48256873980914994

data: 0.7238490929725664

data: 0.9651294460743676

data: 1.2064097992379468

data: 1.4476901523392964

data: 1.688970505503664

data: 1.9302508586045761

data: 2.1715312117696985

data: 2.4128115648701907

data: 2.65409191803603

data: 2.8953722711361207

data: 3.13665262430264

data: 3.3779329774023448

data: 3.619213330569506

data: 3.8604936836688504

data: 4.101774036836612

data: 4.343054389935605

data: 4.58433474310392

data: 0.0

data: 0.003839005035340137

data: 0.0062069782790680605

data: 0.007787622331243589

data: 0.010608702802801987

data: 0.019308901453624516

data: 0.026114798096747077

data: 0.028457424490750435

data: 0.028962950283157415

data: 0.031272239501026644

data: 0.0342546432644161

data: 0.04079429831763067

data: 0.04626027809775543

data: 0.04914220058079972

data: 0.05051223887574463

data: 0.05235155932022551

data: 0.05579285545521684

data: 0.05708747914271362

data: 0.058223302104042585

data: 0.0609033687827148

It looks like something is wrong with your setup. Your action server is stopping at some point. Note that it must keep running forever (even after finishing a goal) until you stop it.

The expected setup is:

  1. Start the action server. Note that your action server must keep running.
  2. Send a goal to the action server
# In one terminal
ros2 launch actions_quiz actions_quiz_server.launch.py

# In another terminal
timeout 90s ros2 action send_goal -f /distance_as actions_quiz_msg/action/Distance '{seconds: 10}'

I do not understand why you say that my action severs stops. Maybe from the ros2 topic echo /total_distance where you have a zero in the midle, but it is not the case it is the proof that the action server keeps working properly for 2 action request sent one after another.

ros2 launch actions_quiz actions_quiz_client.launch.py
then
ros2 action send_goal -f /distance_as actions_quiz_msg/action/Distance “{seconds: 20}”

It’s because I found this in the logs

Traceback (most recent call last):
  File "/opt/ros/humble/bin/ros2", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.18.3', 'console_scripts', 'ros2')())
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2cli/cli.py", line 89, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2action/command/action.py", line 37, in main
    return extension.main(args=args)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2action/verb/send_goal.py", line 54, in main
    return send_goal(args.action_name, args.action_type, args.goal, feedback_callback)
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2action/verb/send_goal.py", line 109, in send_goal
    rclpy.spin_until_future_complete(node, goal_future)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/__init__.py", line 248, in spin_until_future_complete
    executor.spin_until_future_complete(future, timeout_sec)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 288, in spin_until_future_complete
    self.spin_once_until_future_complete(future, timeout_sec)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 715, in spin_once_until_future_complete
    self.spin_once(timeout_sec)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 704, in spin_once
    handler, entity, node = self.wait_for_ready_callbacks(timeout_sec=timeout_sec)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 690, in wait_for_ready_callbacks
    return next(self._cb_iter)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 592, in _wait_for_ready_callbacks
    raise ExternalShutdownException()
rclpy.executors.ExternalShutdownException

Perhaps the server is not responding within 90 seconds. Please try using the commands I specified above to see if you can reproduce the problem. I have added two more trials for you.

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