I am not sure why grading is failing. The node name seems correct.
The error says:
[14:41:56] [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 and the launch file? It should be topics_quiz_node - Did you use the right node name in the launch file? It should be topics_quiz_node (mark: 4.0)
Here is my launch file:
from launch import LaunchDescription
from launch_ros.actions import Node
def generate_launch_description():
return LaunchDescription([
Node(
package='topics_quiz',
executable='topics_quiz_node',
output='screen'),
])
And here is my node code class definition with the subscription to the scan topic:
Same thing just happened to me. I don’t have anything running in the terminals and I reset the simulation before submitting the quiz.
To me it’s working when I execute:
source /opt/ros/humble/setup.bash
cd ~/ros2_ws
colcon build
source install/setup.bash
ros2 launch topics_quiz topics_quiz.launch.py
Thanks Bayode for answering!
I finally made it work, The executable was named “topics_quiz_node”, but the node name was “topics_quiz”. Stupid mistake.
In case anyone has the same problem, you can check the node name by issuing a “ros2 node list” when the node is running