Dear everybody,
I have done all the steps in exercise 4.1 correctly, including:
- Create a new package named topic_publisher_pkg.
- Inside the src folder of the package, create a new file named simple_topic_publisher.cpp.
- Create a launch file for launching this code.
- Do the necessary modifications to your CMakeLists.txt file, and compile the package.
- Execute the launch file to run your executable.
After execute:
source ~/ros2_ws/install/setup.bash
And after the execution of:
ros2 pkg list | grep 'topic_publisher_pkg'
The package appear correctly:
user:~/ros2_ws$ ros2 pkg list | grep 'topic_publisher_pkg'
**topic_publisher_pkg**
user:~/ros2_ws$
The problem comes when I want to continue with the exercise by running:
ros2 topic list | grep '/counter'
Question:
Unfortunately the topic “/counter” does not appear. The truth is that I don’t understand how to continue because the “topic” that it should list doesn’t appear.
Will I have any errors in the code? Do I need to take any steps to make this happen?
Thanks so much for the help that you can provide to me.
Best regards,
Seba.