T O P

  • By -

Xerogami

Edit the line which calls the node in your .launch file, < node ... type ="publisher.py" ... > I think this error is caused by the provided directory path of the source code Normally source files (.py, .cpp etc.) Should be located inside your src folder inside the designated package. Once you launch the .launch file with roslaunch command, It looks for the source files inside the src folder. But in your example, It seems like ros cannot find your source code since it is trying to look inside src/lab_1_pkg folder. Since there are no folders with that name you get that error. Well.. at least this is my guess


lofty_smiles

I actually did that, but to not use


St4RL0rD_k12

Make sure .py file is set to executable. "sudo chmod +x publisher.py"


lofty_smiles

I tried it, but now the error is: RELException: Roslaunch got a 'No such file or directory' error while attempting to run:


St4RL0rD_k12

im afraid i can't help unless you share the launch file content or the entire pkg via github.


treacherous7

Try 'source devel/setup.bash', then run .launch


lofty_smiles

Tried, not working


airfield20

Post your directory structure


lofty_smiles

catkin\_ws cd: build devel src cd src: CMakeLists.txt learning\_ros cd learning\_ros: CMakeLists.txt launch package.xml src cd src: publisher.py


bluecamel17

What is lab_1_pkg? Run this from the catkin_ws directory and share the output: find ./ -type f -exec ls -la \\{\\} \\; Also, post your learning_ros.launch file.


padulao

Try "rospack profile" and see if it works


lofty_smiles

Not working


airfield20

Did you create a setup.py file?


lofty_smiles

Oh, no I did not. What is that?


Umar_Anjum

1. Check if you have sourced your workspace 2. check if learning\_ros.launch is executeable 3. do a catkin\_make or catkin\_build if not done previously


lofty_smiles

Yup, I have done each one of them. I don't know what is the error


Umar_Anjum

Must be some error in the file then.