Hello,
I am doing ros in 5 days course, i created my own custom message in newsubscriber_package and then compiled using catkin_make but when i launch the file it is showing
No module named newsubscriber_package.msg
Hello,
I am doing ros in 5 days course, i created my own custom message in newsubscriber_package and then compiled using catkin_make but when i launch the file it is showing
No module named newsubscriber_package.msg
Hi @abhinavabhi742,
Did you also run
source ~/catkin_ws/devel/setup.bash
on every terminal after that?
By the way, welcome to the community!
Hi @abhinavabhi742, did you type
source ~/catkin_ws/devel/setup.bash
or just
~/catkin_ws/devel/setup.bash
You need to include the command source
, that is, use the former.
Hi,
The same problem occured. No module named newsubscriber_package.msg
Hi,
newsubscriber_package
?catkin_make
and then the source command?The error is saying that it cannot find the custom message you’re trying to load in the given location.
This is strange. On this same shell, can you run the following and try again?
source devel/setup.bash
PS; no need to put ~/catkin_ws/
since you’re already in that directory.
Whew, something is definitely missing . Can you send the packages giving you problems to baderinola@theconstructsim.com? I’ll take a look later in the day and let you know.
Just download each package by right-clicking on the package folder in the IDE and choosing Download.
HI,
I have sent the packages to the above mentioned id.
Hi @abhinavabhi742,
I did not find any problem with this package itself. Just that catkin_make
did not complete at first because of the custom_service
package, which was preventing catkin_make
from completing.
I suggest you fix the custom_service
package (as hinted on the thread for it), remove build and devel and compile again:
cd ~/catkin_ws/
rm -rf build devel
catkin_make
source devel/setup.bash # run this on every terminal
Hi @bayodesegun,
Everything works fine now. Thanks for the help. Could you explain me the importance of queue_size=1 while creating Publisher because without this the program doesnt run ?
Hi @abhinavabhi742,
You’re welcome! Glad to hear that you have everything working.
Read about queue_size
here: