Hello, I ran quiz code 2 times just to be sure but both times I failed on this step:
Action /distance_as is not publishing feedback. Didn’t you know that feedback is a gift? Kindly look into this matter:
- Are you publishing feedback in your action server node?
- Call your action with ros2 action send_goal -f and check that you get feedback from the server.
When I run it from the command line all is well.
Client Output
$ ros2 launch actions_quiz actions_quiz_client.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2024-12-26-02-22-08-273351-2_xterm-6910
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [action_client_node-1]: process started with pid [6911]
[action_client_node-1] [INFO] [1735179730.372461166] [my_action_client]: Sending goal, seconds: 20
[action_client_node-1] [INFO] [1735179730.373047815] [my_action_client]: Goal accepted by server, waiting for result
[action_client_node-1] [INFO] [1735179730.373311804] [my_action_client]: Feedback, current_dist: 0.100000
[action_client_node-1] [INFO] [1735179731.373421830] [my_action_client]: Feedback, current_dist: 0.200000
[action_client_node-1] [INFO] [1735179732.373703683] [my_action_client]: Feedback, current_dist: 0.300000
…
[action_client_node-1] [INFO] [1735179744.373384052] [my_action_client]: Feedback, current_dist: 1.500000
[action_client_node-1] [INFO] [1735179745.373387633] [my_action_client]: Feedback, current_dist: 1.600000
[action_client_node-1] [INFO] [1735179746.373430207] [my_action_client]: Feedback, current_dist: 1.700000
[action_client_node-1] [INFO] [1735179747.373382900] [my_action_client]: Feedback, current_dist: 1.800000
[action_client_node-1] [INFO] [1735179748.373387615] [my_action_client]: Feedback, current_dist: 1.900000
[action_client_node-1] [INFO] [1735179749.373768370] [my_action_client]: Feedback, current_dist: 2.000000
[action_client_node-1] [ERROR] [1735179750.373436076] [my_action_client]: Result, status: true, total_dist: 2.000000
[action_client_node-1] [INFO] [1735179750.373490773] [my_action_client]: Goal finished with status: SUCCEEDED
[INFO] [action_client_node-1]: process has finished cleanly [pid 6911]
Server Output
$ ros2 launch actions_quiz actions_quiz_server.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2024-12-26-02-21-57-695175-2_xterm-6874
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [action_server_node-1]: process started with pid [6875]
[action_server_node-1] [INFO] [1735179730.372793511] [my_action_server]: Received goal request with seconds 20
[action_server_node-1] [INFO] [1735179730.373052432] [my_action_server]: Executing goal
[action_server_node-1] [INFO] [1735179730.373252521] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179731.373350198] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179732.373651075] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179733.373361532] [my_action_server]: Publish feedback
…
[action_server_node-1] [INFO] [1735179744.373330728] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179745.373326171] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179746.373359821] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179747.373326694] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179748.373326101] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179749.373333882] [my_action_server]: Publish feedback
[action_server_node-1] [INFO] [1735179750.373415607] [my_action_server]: Goal succeeded
Published data to topic /total_distance
$ ros2 topic echo /total_distance
data: 0.10000000149011612
data: 0.20000000298023224
data: 0.30000001192092896
data: 0.4000000059604645
data: 0.5
data: 0.6000000238418579
data: 0.7000000476837158
…
data: 1.700000286102295
data: 1.8000003099441528
data: 1.9000003337860107
data: 2.000000238418579
Thank you for your help.
Ivan