Cannot launch my package - Rosject

Hello All
I am stuckk
I have made the py file for the wall following (it is working). but I cannot run the package that I created in the src folder in ros2_ws.
it is not finding the files to run the package. Where did I go wrong?

Hi @mayasleiman ,

Welcome to this Community!

Could you please post the complete error output as text? That way I can see what the problem is, and then help you out appropriately.

Regards,
Girish

Hello @grishkumar.kannan
Thank you for your reply
this is the error output:

ros2 launch wall_follower start_wall_following.launch

error:
file ‘start_wall_following.launch’ was not found in the share directory of package ‘wall_follower’ which is at ‘/home/user/ros2_ws/install/wall_follower/share/wall_follower’

Basically the file is not found but shouldn’t it be generated in the directories automatically?
should I copy and paste it by hand?

Thanks a lot for the help

Hi @mayasleiman ,

I have quite some questions to ask you…

  1. Why have you not mentioned the course name? Are you doing ROS2 with Python or C++? It seems to me that you are using C++ (ament_cmake).
  2. When you started the course, have you not realized that launch files are python files that end with <filename>.launch.py? You seem to be using <filename>.launch.
  3. Why do you not post the full / complete / entire / whole error output from the terminal? Is copy-pasting text very hard to do? I asked you to post the entire output, not just the error line alone.

Files will not be automatically generated. You need to specify the files that need to be copied to the install directory in the CMakeLists.txt file (if using ament_cmake) or in the setup.py file (if using ament_python).

Please answer my above questions. Only then we can help you out better.

Regards,
Girish

Hi, thanks for your valuable comment!
I am new to the website! new to ROS and trying to learn

In my confusion, I missed telling you that I was taking ros2 with Python

I really want to thank you (genuinely) for trying to help but you did not need to tell me how smart you are as you can copy and paste!

PS: The problem was solved! the package missed a dependency apparently. Once I recreated the pkg again it worked

ciao

Hi @mayasleiman ,

Glad to know that you have fixed your problem yourself!

If you missed a dependency, you can just add to the corresponding dependency to package.xml. You don’t have to re-create the package from scratch again. You will learn that in the later chapters.

Happy Learning!

Regards,
Girish

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.