Cannot locate launch node of type + Can't locate node
Hi,
I'm trying to create a node using this code in order to obtain the turtlebot coordinates in the map reference frame.
I've tried adding the node in an existing package, but I wasn't successful.
Therefore, I've created a new package (following this, this and this tutorials). In the last tutorial, instead of using the publisher and subscriber codes, I used the one I mentioned above.
I've used xy_pos as the package name and turtlebot_coordinates as the node name.
I'm able to use rosrun xy_pos turtlebot_coordinates
, it works fine.
However, when I try to use the node via a launch file, I've got the following error:
ERROR: cannot launch node of type [xy_pos/turtlebot_coordinates.cpp]: can't locate node [turtlebot_coordinates.cpp] in package [xy_pos].
The part of the launch file related to this node is:
<node name="turtlebot_coordinates" pkg="xy_pos" type="turtlebot_coordinates.cpp" output="screen">
</node>
It's not a problem with ROS_PACKAGE_PATH ( roscd xy_pos
works fine)
I've tried the solution for this question but it didn't work.
Does someone have any suggestion?
P.S: I don't know if this influences in something, but my launch file is inside an existing package. So while the new package is inside catkin/src/
, the launch file is in a package inside opt/ros/hydro/share/
. Is it a problem?
Thanks!
hello, I have the same problem with you. Did you solve this problem? Could you tell me how?
Yes. Just remove the
.cpp
from thetype
argument as stated in ahendrix's answer below.