[Bug] Gradebot mistake!

This is an error report.


Screenshot of the error


Error details

Gradebot show an error of non subscription for /odom topic but it's done in the code. When I did the second trial, Gradebot say that it was good and give me 8/10 notation. The simulation works very well.

This was not a gradebot mistake. It could be an error in our code or yours, but the gradebot is kinda perfect :wink:

That said, the first error here is that you should have contacted us after the 3rd trial max; now you have used up all 5 trials! :face_with_diagonal_mouth: I have assigned you two more trials; please use them judiciously.

The problem was that you introduced one or more errors in your code after the 2nd trial. You should re-test your code after every change to ensure it still works.

You should ensure you can launch this code for at least 30 seconds: it’s crashing with the following error:

ros2 launch topics_quiz topics_quiz.launch.py

Error:

[topics_quiz-1] Traceback (most recent call last):
[topics_quiz-1]   File "/home/user/ros2_ws/install/topics_quiz/lib/topics_quiz/topics_quiz", line 33, in <module>
[topics_quiz-1]     sys.exit(load_entry_point('topics-quiz==0.0.0', 'console_scripts', 'topics_quiz')())
[topics_quiz-1]   File "/home/user/ros2_ws/install/topics_quiz/lib/python3.10/site-packages/topics_quiz/topics_quiz.py", line 145, in main
[topics_quiz-1]     rclpy.spin(topics_quiz_node)
[topics_quiz-1]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/__init__.py", line 222, in spin
[topics_quiz-1]     executor.spin_once()
[topics_quiz-1]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 712, in spin_once
[topics_quiz-1]     raise handler.exception()
[topics_quiz-1]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in __call__
[topics_quiz-1]     self._handler.send(None)
[topics_quiz-1]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 418, in handler
[topics_quiz-1]     await call_coroutine(entity, arg)
[topics_quiz-1]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 332, in _execute_timer
[topics_quiz-1]     await await_or_execute(tmr.callback)
[topics_quiz-1]   File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 107, in await_or_execute
[topics_quiz-1]     return callback(*args)
[topics_quiz-1]   File "/home/user/ros2_ws/install/topics_quiz/lib/python3.10/site-packages/topics_quiz/topics_quiz.py", line 115, in motion
[topics_quiz-1]     if self.laser_left < 5:
[topics_quiz-1] AttributeError: 'Topics_quiz' object has no attribute 'laser_left'

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