Code that is expected to loop does not work properly. basic C++ 1.8

Hello, I am currently doing ROS Basic in 5Days (C++).

I am currently working on a task to execute the following sample code on a 1.8 ROS Node and check the ”rosnode list”.
In this sample code, INFO is supposed to loop infinitely, but it does not loop and is displayed only once.
The code is exactly the same as in the sample. The launch command is also the same.

Any advice would be appreciated.

1 Like

Hi, welcome to the community! If the example is the same, then maybe you have to recompile and check your additions to CMakeLists.txt and package.xml:

cd ~/catkin_ws/
rm -rf build/ devel/
catkin_make
source devel/setup.bash
rospack profile
1 Like

Thank you very much! I was able to run my own program.

1 Like