Grade-bot says I didn't subscribe to "/scan"

course ROS2 Basics in 5 Days Humble (C++)
unit Understanding ROS2 Topics

Screenshot of the error

Error details

The grade-bot says I didn’t subscribe to “/scan” while I definitely have a subscription to the /scan topic within my quiz bot class. In addition it says I didn’t name the node correctly in my launch file while I have it as “topics_quiz_node” as the executable which is exactly what it is asking for.


I see two things different here:

  1. The subscriber declaration is using a lambda function instead of a std::bind(...) expression. Probably, that is why gradebot cannot recognize the callback messages from subscriber.

  2. The node name is specified in the QuizRobot() : Node("<this_is_the_node_name>"), and I believe that in the launch file, the name parameter must be the same node name. The executable parameter can have a different name.

Hope this helps.

– Girish

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