ROS2 Basics in 5 Days (Python), Part 4 Services, quiz

hello,

I am trying to perform the quiz in section 4

(as I do it in baby steps I took the liberty to copy from movement_pkg, altering the names where needed and run the command with the new names)

I get the following error

Please advise how can I overcome this error.

Thank you

Did you modify the setup.py to include the path to the launch file?

If you have not, you can check how to modify the file in previous examples, but in short it boils down to:

  1. import glob as glob
  2. import os
  3. Modify the data_files appending (os.path.join( 'share', package_name), glob('launch/*.launch.py'))to it.
  4. Adding the entry points to your scripts e.g. entry_points={ 'console_scripts': [f'service_server={package_name}.service_server:main', f'service_client={package_name}.service_client:main' ], },
2 Likes

Hello

THANK YOU VERY MUCH.

Indeed it was setup.py file with the main problem but after that bunch of typos (annoying and frustrating typos) but nevertheless now it works.

What a catharsis!

Now all I need to do is make work with my msg (and not copied from movement_pkg) and also with three input arguments.

Probably more questions to come

Thank you once again, much appreciated

I’m glad I could be of help! We are doing the same course so I think we can help each other equally.

Don’t forget to mark the post as solution so that the question can be closed!

Cheers.