[Bug] Gradebot unable to find /distance_as action

This is an error report.


Screenshot of the error


Error details

Greetings, I've submitted my actions_quiz package twice and in both those times the gradebot was unable to find /distance_as action. I've tried `ros2 action list | grep distance_as` as per the error message and it shows up on the terminal. Please let me know how I can proceed.

Looking into this, brb.

The gradebot could not find your the /distance_as action, when it:

  • compiles just two packages, actions_quiz and actions_quiz_msg
  • launches the actions quiz server: ros2 launch actions_quiz actions_quiz_server.launch.py

Please take note that:

  • actions_quiz_msg must not depend on any other package in your workspace
  • actions_quiz must depend on actions_quiz_msg an no other package in your workspace.

Possible errors:

  • you are using external packages
  • your action servers is not using this custom action message properly (or the server is not starting correctly)

To troubleshoot further, please run the following command and show us the output (the same commands the grader runs):

cd ~/ros2_ws
rm -rf build/ install/ log/ # remove all compile application
colcon build --packages-select actiions_quiz_msg actions_quiz
source install/setup.bash
ros2 launch actions_quiz actions_quiz_server.launch.py 

Run this in another terminal, 15 seconds after launching the action server:

cd ~/ros2_ws
source install/setup.bash
ros2 action list | grep distance_as

Hello,
I can confirm that actions_quiz depend on actions_quiz_msg and none of them depend on any other packages in the workspace.

The dependencies for actions_quiz_msg are:

  • rclcpp
  • std_msgs
  • action_msgs
  • rosidl_default_generators

The dependencies for actions_quiz are:

  • rclpy
  • rclpy.action
  • actions_quiz_msg
  • std_msgs
  • nav_msgs

Given below is the output after performing the clean and build:

user:~$ cd ~/ros2_ws/
user:~/ros2_ws$ rm -rf build/ install/ log/
user:~/ros2_ws$ colcon build --packages-select actions_quiz_msg actions_quiz
[1.898s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/home/user/ros2_ws/install/actions_quiz' in the environment variable AMENT_PREFIX_PATH doesn't exist
[1.898s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/home/user/ros2_ws/install/actions_quiz_msg'in the environment variable AMENT_PREFIX_PATH doesn'texist
[1.898s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path '/home/user/ros2_ws/install/actions_quiz_msg' in the environment variable CMAKE_PREFIX_PATH doesn't exist
Starting >>> actions_quiz_msg
[17.5s] [0/2 complete] [actions_quiz_msg:build 25% - 1
[17.6s] [0/2 complete] [actions_quiz_msg:build 25% - 1
[17.7s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[17.8s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[17.9s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[18.0s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[18.1s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[18.2s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[18.3s] [0/2 complete] [actions_quiz_msg:build 29% - 1
[18.4s] [0/2 complete] [actions_quiz_msg:build 32% - 1
[18.5s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[18.6s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[18.7s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[18.8s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[18.9s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[19.0s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[19.1s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[19.2s] [0/2 complete] [actions_quiz_msg:build 35% - 1
[19.3s] [0/2 complete] [actions_quiz_msg:build 38% - 1
[19.4s] [0/2 complete] [actions_quiz_msg:build 38% - 1
[19.5s] [0/2 complete] [actions_quiz_msg:build 38% - 1
[19.6s] [0/2 complete] [actions_quiz_msg:build 38% - 1
[19.7s] [0/2 complete] [actions_quiz_msg:build 38% - 1
[19.8s] [0/2 complete] [actions_quiz_msg:build 41% - 1
[19.9s] [0/2 complete] [actions_quiz_msg:build 45% - 1
[20.0s] [0/2 complete] [actions_quiz_msg:build 45% - 1
[20.1s] [0/2 complete] [actions_quiz_msg:build 45% - 1
[20.2s] [0/2 complete] [actions_quiz_msg:build 45% - 1
[20.3s] [0/2 complete] [actions_quiz_msg:build 45% - 1
[20.4s] [0/2 complete] [actions_quiz_msg:build 45% - 1
[20.5s] [0/2 complete] [actions_quiz_msg:build 48% - 1
[20.6s] [0/2 complete] [actions_quiz_msg:build 48% - 1
[20.7s] [0/2 complete] [actions_quiz_msg:build 48% - 1
[20.8s] [0/2 complete] [actions_quiz_msg:build 48% - 1
[20.9s] [0/2 complete] [actions_quiz_msg:build 48% - 1
[21.0s] [0/2 complete] [actions_quiz_msg:build 48% - 2
[21.1s] [0/2 complete] [actions_quiz_msg:build 51% - 2
[21.2s] [0/2 complete] [actions_quiz_msg:build 51% - 2
[21.3s] [0/2 complete] [actions_quiz_msg:build 54% - 2
[21.4s] [0/2 complete] [actions_quiz_msg:build 54% - 2
[21.5s] [0/2 complete] [actions_quiz_msg:build 54% - 2
[21.6s] [0/2 complete] [actions_quiz_msg:build 54% - 2
[21.7s] [0/2 complete] [actions_quiz_msg:build 54% - 2
[21.9s] [0/2 complete] [actions_quiz_msg:build 58% - 2
[22.0s] [0/2 complete] [actions_quiz_msg:build 61% - 2
[22.1s] [0/2 complete] [actions_quiz_msg:build 64% - 2
[22.2s] [0/2 complete] [actions_quiz_msg:build 64% - 2
[22.3s] [0/2 complete] [actions_quiz_msg:build 64% - 2
[22.4s] [0/2 complete] [actions_quiz_msg:build 64% - 2
[22.5s] [0/2 complete] [actions_quiz_msg:build 64% - 2
[22.6s] [0/2 complete] [actions_quiz_msg:build 64% - 2
[22.7s] [0/2 complete] [actions_quiz_msg:build 67% - 2
[22.8s] [0/2 complete] [actions_quiz_msg:build 70% - 2
[22.9s] [0/2 complete] [actions_quiz_msg:build 70% - 2
[23.0s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.1s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.2s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.3s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.4s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.5s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.6s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.7s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.8s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[23.9s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[24.0s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[24.1s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[24.2s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[24.3s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[24.4s] [0/2 complete] [actions_quiz_msg:build 74% - 2
[24.5s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[24.6s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[24.7s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[24.8s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[24.9s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.0s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.1s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.2s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.3s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.4s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.5s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.6s] [0/2 complete] [actions_quiz_msg:build 77% - 2
[25.7s] [0/2 complete] [actions_quiz_msg:build 80% - 2
[25.8s] [0/2 complete] [actions_quiz_msg:build 83% - 2
[25.9s] [0/2 complete] [actions_quiz_msg:build 83% - 2
[26.0s] [0/2 complete] [actions_quiz_msg:build 87% - 2
[26.1s] [0/2 complete] [actions_quiz_msg:build 87% - 2
[26.2s] [0/2 complete] [actions_quiz_msg:build 90% - 2
[26.3s] [0/2 complete] [actions_quiz_msg:build 90% - 2
[26.4s] [0/2 complete] [actions_quiz_msg:build 93% - 2
[26.5s] [0/2 complete] [actions_quiz_msg:build 96% - 2
[26.6s] [0/2 complete] [actions_quiz_msg:build 96% - 2
[26.7s] [0/2 complete] [actions_quiz_msg:build 100% - 2
[26.8s] [0/2 complete] [actions_quiz_msg:build 100% -
[26.9s] [0/2 complete] [actions_quiz_msg:build 100% -
[27.0s] [0/2 complete] [actions_quiz_msg:build 100% -
[27.1s] [0/2 complete] [actions_quiz_msg:install - 26.[27.2s] [0/2 complete] [actions_quiz_msg:install - 26.[27.3s] [0/2 complete] [actions_quiz_msg:install - 26.[27.4s] [0/2 complete] [actions_quiz_msg:install - 26.Finished <<< actions_quiz_msg [26.4s]
Starting >>> actions_quiz
Finished <<< actions_quiz [1.85s]

Summary: 2 packages finished [29.3s]


user:~/ros2_ws$ source install/setup.bash
user:~/ros2_ws$ ros2 launch actions_quiz actions_quiz_server.launch.py


[INFO] [launch]: All log files can be found below /home/user/.ros/log/2024-07-08-08-23-47-545298-2_xterm-1875
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [actions_quiz_server-1]: process started with pid [1876]

After starting the actions_quiz_server, given below is the output from a second terminal.

user:~$ cd ~/ros2_ws/user:~/ros2_ws$ source install/setup.bash
user:~/ros2_ws$ ros2 action list | grep distance_as
/distance_as
user:~/ros2_ws$

It looks like the action server can be found.

Shall I try submitting the test again?

Let me take a look at this and get back to you.

Perhaps something has changed in your package, and we need to change something in the Gradebot.

I don’t see anything missing in the Gradebot, but I found I subtle difference in the order of the package passed to colcon build…could you please repeat the previous steps, but with

colcon build --packages-select actions_quiz_msg actions_quiz

changed to

colcon build --packages-select actions_quiz actions_quiz_msg 

The latter would expose any error in including the actions_quiz_msg package, while the former might overlook it.

If you are able to successfully see the message after this, then you can submit again, and it should pass that stage.

Sounds good, I’ll give it a go now.

I’ve completed a clean and build, and this time used the command colcon build --packages-select actions_quiz actions_quiz_msg.

Given below is the output after running the command:

user:~$ cd ~/ros2_ws/
user:~/ros2_ws$ rm -rf build/ install/ log/
user:~/ros2_ws$ colcon build --packages-select actions_quiz actions_quiz_msg
[1.850s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/home/user/ros2_ws/install/logs_test' in the environment variable AMENT_PREFIX_PATH doesn'texist
[1.850s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/home/user/ros2_ws/install/actions_quiz' in the environment variable AMENT_PREFIX_PATH doesn't exist
[1.850s] WARNING:colcon.colcon_ros.prefix_path.ament:The path '/home/user/ros2_ws/install/actions_quiz_msg' in the environment variable AMENT_PREFIX_PATH doesn't exist
[1.850s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path '/home/user/ros2_ws/install/actions_quiz_msg' in the environment variable CMAKE_PREFIX_PATHdoesn't exist
Starting >>> actions_quiz_msg
Finished <<< actions_quiz_msg [20.5s]
Starting >>> actions_quiz
Finished <<< actions_quiz [3.19s]

Other than the warnings, I didn’t come across any other errors.

In a new terminal, I also checked to see whether /distance_as shows up.
Given below is the output:

Everything seems to be fine, I’ll try submitting again.

Yay!
The Gradebot was able to detect /distance_as

Seems like doing a clean build using the following commands helped?

cd ~/ros2_ws
rm -rf build/ install/ log/ # remove all compile application
colcon build --packages-select actions_quiz actions_quiz_msg
source install/setup.bash

Great, I’m glad you got it working! Good job with the perfect grade :+1:.

Probably not, because the Gradebot automatically does this “clean build” every time.

If you did not modify the packages after creating this post, perhaps it’s “one of those things” that usually happen when computers report a problem that’s not there :wink:.

Thank you!!

That makes sense. I didn’t make any changes to any of the packages, this time it was indeed “one of those things” :joy:

Thank you so much for your time and assistance. I really appreatiate it!

1 Like

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