ROS2 Foxy: No rule to make target at colcon build
Hi, everyone. I need your help.
I want to create custom msg and srv files, according to the documentation of foxy. https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Custom-ROS2-Interfaces.html
When my package was built in my friend's ubuntu with foxy, it built succesfully. But when it comes to my ubuntu20:04, I get the error:
--- stderr: tutorial_interfaces
make[1]: ** No rule to make target 'utorial_interfaces__py/CMakeFiles/tutorial_interfaces__py.dir/all',needed by ' leddar/CMakeFiles/tutorial_interfaces__python.dir/all' . Stop.
make[1]: *** Waiting for unfinished jobs....
make: ** [Makefile:146:all] Error 2
I proceeded step by step according to the docs and I was confused as to how this happened. I didn't have any problems during writing, except for this in the package.xml:
After I pasted this code block into the package.xml
<depend>geometry_msgs</depend> <build_depend>rosidl_default_generators</build_depend> <exec_depend>rosidl_default_runtime</exec_depend> <member_of_group>rosidl_interface_packages</member_of_group>
The code block that originally existed in the file reported an error. It is:
``` <test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
```
So in order to eliminate the error, I deleted this 'error' code block that originally existed.
I tried recompiling after removing the build, log, and install folders, I tried reinstalling ros2, but all failed.
Why does the abbreviation name of Python 'py' appear in the error report of this package whose build type is ament_cmake? How did this bug arise and how do I solve it?
I will greatly appreciate your help. Thank you so much.
My bug package in GitHub. https://github.com/Zepher5/bug
FINAL Possible cause: ‘pip’ instructions entered by the terminal once modified the environment Solution: reinstall Ubuntu and Foxy