Seeking clarity regarding the 'node' tag in launch files
I have added the following lines in the CMakeLists.txt
file -
add_executable(abcd src/main.cpp)
target_link_libraries( abcd ${catkin_LIBRARIES} )
The node
tag inside my launch
file looks like this -
<node pkg="my_explore_lite" type="explore_node" respawn="false" name="abcd_1" output="screen">
...
</node>
As per my understanding, the value of type
should be equal to abcd
because that's what I have defined in the CMakeLists.txt
. However, my launch file gets executed when I set the value of type
to either abcd
or explore_node
.
What am I missing?
Asked by skpro19 on 2021-06-07 12:49:34 UTC
Comments
Did you previously build the node with the
explore_node
name (ieadd_executable(explore_node src/main.cpp)
)? If so it still exists in your built executables even if you change the name in the CMakeLists.txt. Try deleting your build and devel folders, rebuild, and see if you can still launch with theexplore_node
name.Asked by djchopp on 2021-06-07 14:20:33 UTC
Yes. I did previously use
add_executable(explore_node src/main.cpp)
. Do you want me to delete thebuild
folder inside my package (~/catkin_ws/src/my_explore_lite/build
) or you do want me to delete thebuild
anddevel
folders at thecatkin
workspace root(~/catkin_ws/build
and~/catkin_ws/devel
)?Asked by skpro19 on 2021-06-07 14:34:52 UTC
You should only have
build
anddevel
fromcatkin_make
orcatkin build
in your workspace root. If thebuild
folder in your package came from catkin, then you may have ran it in the wrong directory. If you are sure thebuild
folder in your package came from catkin then delete it. Otherwise it may be part of a locally installed dependency and it should stay.Asked by djchopp on 2021-06-07 14:40:46 UTC
Okay. Thanks!
Asked by skpro19 on 2021-06-07 14:44:06 UTC