Discussion - Making your First Package (Getting Ready for ROS Pt 5)

Blog Post

This is the discussion topic for the video and blog post linked above. Please keep all replies relevant to the content, otherwise create a new topic.

I made it though almost the entire tutorial but when I go to try out the talker I get this response

logan@logan-Ubunto:~/dev_ws$ source install/setup.bash
logan@logan-Ubunto:~/dev_ws$ ros2 launch my_package talker.launch.py
file ‘talker.launch.py’ was not found in the share directory of package ‘my_package’ which is at ‘/home/logan/dev_ws/install/my_package/share/my_package’

when i go look at the my_package directory this is the contents

logan@logan-Ubunto:~/dev_ws/install/my_package/share/my_package$ ls
cmake local_setup.bash local_setup.zsh package.ps1 package.zsh
environment local_setup.dsv package.bash package.sh
hook local_setup.sh package.dsv package.xml

i don’t really understand what is the issues here so any advice or thoughts would be much appreciated

I have the same problem, please let me know if you find a solution.

I am using ROS 2 Humble on Ubuntu 22.04 though

Hmm I just ran through the tutorial myself on humble and it seems to work ok.
Some things to double check:

  • You added the new files in the correct location
  • You added the install() function to CMakeLists.txt
  • You rebuild with colcon from the root of the workspace

If you check those and are still stuck, post your commands from colcon onwards :slight_smile:

Yeah, I messed up the directories, it works now.