Error when creating a new message or a new service message

I’m begginer in coding ROS and I’m taking the " ROS Basics in 5 Days (Python) Noetic" course.
In the courses 4 and 6, I don’t understand how to use a message or a service message that I just created.
I’ve followed the correction and when I launch the file which use the mesasge, I get this error :

ModuleNotFoundError: No module named ‘my_custom_srv_msg_pkg’

So I 've launched next command to see if it has been correctly created, and it does :

user:~$ rossrv list | grep MyCustomServiceMessage

Have you any idea about my problem ?


1 Like


Remember that acter compiling you have to source. This allows the ROS system to find those packages:

cd /home/user/catkin_ws
source devel/setup.bash
rospack profile
1 Like

I have the same error, did you solve it?