can't locate node in package
HI everybody, I am having problems in building a large project. I'am trying to add some modularity to my .launch file. I built my launch file as follows
<launch>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find vtol_gazebo)/worlds/vtol.world"/>
</include>
<include file="$(find heterogeneous)/config/heterogeneous.xml"/>
</launch>
with the file included being
<launch>
<node pkg="heterogeneous" name="het" type="heterogeneous">
</node>
</launch>
the node in the heterogeneous package is (successfully) built with the following CMakeLists.txt file
cmake_minimum_required(VERSION 2.8.3)
project(heterogeneous)
find_package(catkin REQUIRED COMPONENTS
roscpp
)
set(ARMADILLO_INCLUDE /usr/local/include/)
set(ARMADILLO_LIBRARIES /usr/lib/libarmadillo.so)
include_directories(include/${PROJECT_NAME} ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} )
add_executable(heterogeneous src/Heterogeneous.cpp)
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} )
catkin_package(
DEPENDS
roscpp
)
The file si successfully compiled and the executable added to the project workspace. In fact, if I prompt from the catkin workspace
find -executable -name heterogeneous -type f
I obtain
./build/heterogeneous/heterogeneous
However when I launch the .launch file I get
ERROR: cannot launch node of type [heterogeneous/heterogeneous]: can't locate node [heterogeneous] in package [heterogeneous]
I really cannot figure out what the problem is. I am using ros hydro Any ideas? Thanks Andrea
EDIT: actually I cannot run the node with
rosrun heterogeneous heterogeneous
This doesn't work any more. I use the ros version kinetic, farid's method is useful for me.
I just had the same problem, but for me the problem was in the launch file. I created my node with catkin command, and then personalized the cmake and the launch file, but I did a mistake by switching name_node to name. I know it is a very specific mistake but maybe it will help the next guy!
True:
False: