I can run my code normally, but the Gradebot shows me an error related to the launchfile. I’ve already checked the name and location of the file, added the permission to execute, revised the code and everything works normally when I test it with the simulation.
The problem is that your actions_quiz
package is failing to compile, and gradebot is not detecting that.
While we work on the gradebot, could you fix the dependency problem with your package?
actions_quiz
should depend on actions_quiz_msg
, and you should be able to compile these packages together, excluding all other packages from the equation. When the dependency is properly set up, actions_quiz_msg
would be compiled first when you try to compile actions_quiz
.
Here is the error from the log:
[0.511s] ERROR:colcon.colcon_ros.task.ament_python.build:Failed to find the following files:
- /home/user/ros2_ws/install/actions_quiz_msg/share/actions_quiz_msg/package.sh
Check that the following packages have been built:
- actions_quiz_msg
Failed <<< actions_quiz [0.01s, exited with code 1]
e]0;colcon build [0/1 done] [1 ongoing]ae]0;colcon build [1/1 done] [0 ongoing]a
Summary: 0 packages finished [0.40s]
1 package failed: actions_quiz
To see the problem, run
cd ~/ros2_ws
rm -rf build/ install/ log/
colcon build --packages-select actions_quiz actions_quiz_msg
Thank you very much for your reply, @bayodesegun ! But my actions_quiz
package already depended on the actions_quiz_msg
package, and I can compile it perfectly using the command you gave me.
Hi @pedromm2406 ,
Welcome to this Community!
I have come across people mentioning the same issue that you have. The solution is simple but a bit tricky.
You need to remove your build
, install
and log
folders and compile only the actions_quiz_msg
package and then send it to gradebot. Grade bot will then compile again, but this time it will compile actions_quiz
only because actions_quiz_msg
has been already compiled (along with other packages).
Here are the steps:
cd ~/ros2_ws
rm -rf ./build ./install ./log
colcon build --packages-skip actions_quiz_msg actions_quiz
colcon build --packages-select actions_quiz_msg
source install/setup.bash
Notice that you are never compiling the actions_quiz
package.
At this point, you can start the gradebot and you should be evaluated properly.
Regards,
Girish
Hi @girishkumar.kannan, thanks for the reply! I tried to do what you asked, but when I sent it to the Grade bot, the same error occurred. I’m worried because I only have one more try.
Hi @pedromm2406 ,
I see that you already have the actions_quiz_server.launch.py
file.
If the gradebot says that the file cannot be found then it could mean that you have not added the launch
folder in your setup.py
file.
Do you have a line like this in your setup.py
file under data_files
?:
(os.path.join('share', package_name), glob('launch/*.launch.py'))
If not, add that line. Also have you added the executable entry point under entry_points
console_scripts
?
Then repeat the same steps that I mentioned above:
Since you have just one attempt left, I suggest that you check all the package details in each file and then submit it to the gradebot.
These steps should fix your issue. If it still fails, then please report to us with screenshots.
Regards,
Girish
Hi @girishkumar.kannan, thanks for the reply! I believe that setup.py
is not the problem, I can launch both the actions server and action client from the first time I submitted the quiz. Below is a print of my setup.py
and a terminal where I execute the commands you gave me, then compile actions_quiz
and launch it
Hi @pedromm2406, have you tried running all the commands in the terminals? also the localization and navigation launch files? So with that you can fully replicate what the gradebot is running. I can give you the detailed check list that the code of the gradebot is doing so you can check it before your attempt:
-
Checks the sourcing of the environment
-
Compilation of the packages:
- Removes build, install and log folders (it’s not necessary that you do this)
- Compiles
actions_quiz
andactions_quiz_msg
-
Reset world and check the launching files:
- First launch the localization and navigation packages (
ros2 launch leo_description loc_nav.launch.py
) - Then launch your package (
ros2 launch actions_quiz actions_quiz_server.launch.py
) - Then Check if the Action Server is running on
/distance_as
- Finally launch the action client (
ros2 launch actions_quiz actions_quiz_client.launch.py
)
- First launch the localization and navigation packages (
-
Finally check the robot pose after the navigation to check the final position
I hope it helps, we are also going to check if everything is working fine with the gradebot.
Thanks for the reply, @jpvaldivia7! As I said in the first post, I can compile and run the project perfectly. I can execute all the commands you mentioned and I am successful in navigating the robot. At no point do I get any errors.
Not to worry, I have restored your trials. Let’s take a closer look at this and get back to you with a definitive solution. Thank you for your patience.
Hi, @bayodesegun! I thank you for all the support! I eagerly await your reply.
@pedromm2406
We found some parts in the grading script that could cause false-positive failures and corrected them. It looks like everything should work fine now.
Could you please try again?
Working perfectly! Thank you all so much for all your attention and support!
You are welcome @pedromm2406! We appreciate your patience and readiness to provide further information.