In section 2.6.1 of Ros 2 basic course, I have followed and copied all the steps to verify that the node is running but it does not. How am i supposed to solve this issue?
The While loop seems not running (why?) and therefore the node doesn’t appear on terminal 2
Furthermore I have notice that executing the program with command “python3 heartbeat.py” directly into the folder where the file is located, the node runs. The problem could be the setup.py file, why? I copied it from the courselecture
Hey @Davide-Bros if you can go directly to the folder where the file is located and run it, but can’t from anywhere else this implies either of two things to me
The ros workspace that this project was created was not sourced since a new terminal was opened, the files was created/saved, or even in the cases of interfaces a code change was made.
The directory structure was not setup which can easily happen a number of different ways.
While copying the file exactly can correctly create the node the things that are easy to miss are the steps that have to be followed carefully when using ROS to ensure that it can do what it does best. So like what @bayodesegun said, it would likely be good to step back through the tutorial. Keep any eye our for steps that might have been forgotten.