Topics Quiz being failed but code is working when run. Please help

Hi,

@ralves I fail the grader for the quiz to evade the wall. However: My robot turns as shown in the video and evades the wall when I trial my code. It is hard to debug if my own simulation shows success and the grader fails.

In detail the feedback from the grader is:

  • no publishing on cmd_vel: However I can actually make it turn so I should have published on it
  • not subscribed to laserscan: However I turn before I hit the wall
  • tobot did not avoid obstace: I see it turn and drive away

What could I do? I already used two of my five trials for this and I would like to understand what I am doing wrong

Thank you,
Elmar

Hi Elmar,

Thanks for the feedback. Welcome to the Community!

Please let’s look into this and get back to you.


PS: I moved this question to a new post to keep things tidy. The former question is still linked.

Hello @elmar.rothenhoefer,

I just checked your code and found the error. You have 2 launch files in your package (topics_quiz.launch). The one inside the launch folder is correct, but you have another one (which is empty) outside the launch folder aswell. In fact, if you try to run the code with the launch file, you are going to see the following error:

multiple files named [topics_quiz.launch] in package [topics_quiz]:
- /home/user/catkin_ws/src/topics_quiz/topics_quiz.launch
- /home/user/catkin_ws/src/topics_quiz/launch/topics_quiz.launch

I guess you didn’t see this error because you were testing your code without using the launch file?

In any case, if you remove the empty launch file, the grader will work correctly since it uses the launch file to run the code.

Best,