roslaunch cannot find node executable
I have an ROS node called bag_player_controller
inside a package which is also called bag_player_controller
. In another ROS package within the same catkin workspace, I have the following lines:
<node name="bag_player_controller" pkg="bag_player_controller" type="bag_player_controller" output="screen" required="false">
<!-- name of the bag player node to control -->
<param type="str" name="player_name" value="bag_player"/>
</node>
But when I run the launch file, I get this error:
OSError: [Errno 2] No such file or directory: '/home.net/aa17gil/work/mapper/src/bag_player_controller/bag_player_controller'
For some reason, ROS is searching for the executable inside the src
directory. But when I do rosrun bag_player_controller bag_player_controller
, it runs fine. Also, when I run catkin_find bag_player_controller bag_player_controller
, it gives the correct path to the executable inside devel/RelWithDebInfo/lib/bag_player_controller/bag_player_controller
, so I don't think there's a problem with my CMakeLists.txt, or my environment.
Any ideas?
This is strange, because your node clearly is assigned to your package. Can you try only typing <node name="bag_player_controller" pkg="bag_player_controller" type="bag_player_controller"/> just to test if that works? I'm fairly new to ROS, but I launch all my executables that way.