Problems in compiling actions quiz

Hi!
I completed the actions quiz and it works, but when I submit the quiz I have strange errors:
image
This is really strange, because before submitting the quiz everything works well and I can compile with colcon build. After having submitted, if I try again, I have this



It seems a bug with colcon build.
If I recompile with these lines:

cd ~/ros2_ws
rm -rf build/ install/ log/
colcon build
source install/setup.bash

colcon build does not work. If I compile with the --packages-select option and in the correct order (for instance, actions_quiz_msg and then actions_quiz) everything is ok.
What is the problem? Can you help me?
Thanks in advance

That error makes sense, because actions_quiz depends on actions_quiz_msg, so the latter has to be compiled before the former.

What seems to be missing here are some entries in CMakeLists.txt and/or package.xml, telling colcon build what package must be built first.

How did you create actions_quiz? Did you pass actions_quiz_msg as a dependency when creating the package?

Hi @bayodesegun,
thanks for your response.
No, I did not add actions_quiz_msg as a dependency. I first created and compiled actions_quiz, then actions_quiz_msg and finally I modified the CmakeLists of actions_quiz by adding find_packages and the right dependencies.

I suspect that you didn’t add all the necessary entries, or there is some bug. Manually adding entries is prone to errors. Here is what you can do to debug:

Create a new test package, say actions_quiz_test and add actions_quiz_msg as dependency during creation. Then compare the entries in the CMakeLists.txt and package.xml of this test package to what you have in the same files in actions_quiz. Make necessary corrections and let’s know how it goes.

Thank you @bayodesegun, I missed < depend>actions_quiz_msg< /depend> in package.xml
Thank you for your support

1 Like

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