Lack of information regarding launch files leading to bad UX


Prior to ‘ROS2 Basics in 5 days humble (C++)’, I had zero experience with launch files in ROS2. So when I tried to run the topics quiz, I failed at specifying the ‘name’ parameter in the launch file because I didn’t know such a parameter existed. I tried changing the various other things until I eventually gave up and looked at the solution.

Correct me if I’m wrong, but I don’t think this parameter is mentioned anywhere before this quiz? It seems odd that this is the case given that it is something which is tested by the Gradebot?

Additionally, since I looked at the solution, I cannot ‘mark’ the topics unit as completed as this requires a succesful result from the Gradebot which is now locked.

Is this a bug? It seems like a very questionable design choice as it demotivates the user from moving on, when a unit is ‘incomplete’.

Hi @dimi

Actually, the name parameter is not needed in this case, so we should not have required it. Therefore, I have removed it from the quiz requirements.

I apologize for the confusion. That said, the next time you are stuck on anything, please ask for help instead of checking the solution. This kind of problem happens all the time, and knowing when to ask for help is a critical life skill.

The gradebot checks for you were failing for a different reason:

  • your ros2 node seems to be crashing randomly with a segmentation fault (code -11)
[ERROR] [topics_quiz_node-1]: process has died [pid 1521, exit code -11, cmd '/home/user/ros2_ws/install/topics_quiz/lib/topics_quiz/topics_quiz_node --ros-args']

Please have a look at what might be causing that in your code and try again.

I have enabled retrial and assigned 2 more trials for you. Please use them judiciously.


It’s not a bug. When you view the solution, you can no longer re-submit your code for grading. If you have not completed the unit by then, then it would remain incomplete. However, an incomplete unit does not prevent you from moving to the next unit.

@bayodesegun I have just tried running the quiz again. This time, however, I have run into the following problem:

:heavy_multiplication_x: [11:04:10] [assess] Could not launch topics_quiz package successfully. I wasn’t expecting that and cannot continue!
The launch command exited earlier than expected.

  • Did you name the launch file correctly? It should be
  • Run ros2 launch topics_quiz and fix any errors that appears. (mark: 3.0)

But when I run the launch file in any terminal it just works? I have double checked the name of the launch file as well as the node and the package, but they seem to match.

Do you have any idea what the issue might be?

It’s the same random segmentation fault. If you submit again, it might fail in a different point entirely.

[ERROR] [topics_quiz_node-1]: process has died [pid 1206, exit code -11, cmd '/home/user/ros2_ws/install/topics_quiz/lib/topics_quiz/topics_quiz_node --ros-args -r __node:=topics_quiz_node'].

The problem is that it happens randomly, so you need to carefully check your C++ source to see what might be causing it.

Thank you, i’ll go through my code again

@bayodesegun New problem :((

:heavy_multiplication_x: [14:42:38] [assess] Not subscribed to /scan. I had big plans for this!

  • Did you create a subscriber correctly to the topic /scan in your source code?
  • Did you name your node correctly in the C++ source? It should be topics_quiz_node (mark: 4.0)

I have gone through the source code, first myself, and afterwards I asked chatGPT to find anything that might have caused a random segmentation error. Is the stated error still caused by a segmentation problem?

While running the launch file manually in a terminal, I have checked which nodes subscribe to the /scan topic. My node is subscribed, so i cannot seem to figure out the issue here…

Is it possible for you to simply mark the unit as completed for me? As I feel like I have run against a wall with this one, which works for me but not the gradebot…

Okay, this time it wasn’t the segmentation fault. Your node was named topics_quiz instead of topics_quiz_node.

Hopefully, the segmentation fault will not happen again. C++ is a hard language, and segmentation faults are tricky to detect (sorry, ChatGPT is not a catch-all!). You can paste your C++ node so our experts can weigh in on what could be causing a segmentation fault.

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