Ros2 Basics in 5 Days - Action quiz - Topics thought

Hello,
In Action quiz, we ask to publish data to /total_distance topic. This topic doesn’t exist. Should I build it?
How do I build a new topic? Till now we used some known topic like “/cmd_vel”.

Thanks,
Omer

Hi,

Unit 3 explains how you can create a topic with a publisher. You can create it and make it publish the total distance (remember to specify the correct message type)

Hi,
In unit 3 we created a publisher node that publish to /cmd_vel topic.
Also we created a subscriber node that subscribed to /scan topic.
But I can’t find where we learned how to create a new topic as cmd_vel or scan.

You can create a new topic by creating a publisher for it, just like you did for cmd_vel. You have to change the type as well.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.