ros2 build from source - delete build files?
I have built ROS2 (Galactic) from source on an unsupported platform (Raspberry Pi OS), with (mostly) success. But, I'm annoyed that the directories used in that process now take up some 11GB of space, which seems like a lot. Is it possible to delete leftover build files to free up space on this limited-capacity system? If so, what can I delete? I have tried getting rid of the Build folder, and other variations like keeping all the Shell files, and the system is not happy with that. Any advice on what I can get rid of, if anything, would be appreciated.
Asked by pgadamczyk on 2022-09-08 03:41:57 UTC
Answers
Yup, you should only need the install
directory. You can even delete the src
directory if you didn't use symlink install.
Asked by stevemacenski on 2022-09-08 18:43:48 UTC
Comments
Alas, it doesn't work out that way. When I delete the "build" directory and then "source ~/ros2_galactic/install/setup.bash", the system issues a bunch of errors about missing references that prevent it from happily setting up the environment. I agree it should have worked but it doesn't (in this case).
Anyhow, I have left them there for now, but I'm quite curious as to what broke down that would still be referring to the "build" directory.
Asked by pgadamczyk on 2022-09-16 16:19:41 UTC
When you built ROS2 from source, did you use the option --merge-install
? Because I too built ROS2 (Foxy) recently on my Jetson Nano, and it worked fine.
Asked by sampreets3 on 2022-09-22 07:43:28 UTC
No, I just used
colcon build --symlink-install
is it the "--merge-install" option that makes it work without the build directory?
Asked by pgadamczyk on 2022-09-22 09:00:37 UTC
ah, that's why, symlink install will symlink (he he he..) the python/yaml files so you can't delete all the spaces because there is shared content
Asked by stevemacenski on 2022-09-22 13:06:21 UTC
Many thanks, I will try again without --symlink-install and hopefully that will make it better.
Asked by pgadamczyk on 2022-09-22 16:40:10 UTC
Comments