ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Downsides to colcon's --symlink-install option in ROS2?

asked 2021-10-25 20:35:52 -0600

shonigmann gravatar image

updated 2021-11-02 11:32:41 -0600

Are there any downsides or pitfalls to using the --symlink-install option in when building a workspace with colcon in ROS2?

To me, it seems like a cross-the-board improvement; symbolic links instead of copies take less disk space, and make for faster development when using python, urdf, xacro, yaml, etc; and compiled language files are still handled as expected (to my knowledge). But I feel like I must be missing something, else I would expect colcon to enable --symlink-install by default if there weren't any downsides.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2021-11-03 01:11:40 -0600

BrettRD gravatar image

If you're just developing on your local machine, there's no down-side and I threw it into my colcon defaults file.

If you're cross-compiling and sending built software to a remote target, you don't need to transport the src, build or log. The workspace functions just fine with only the install folder as long as you didn't --symlink-install back to src when you built it.

I think it would cause a number of expensive headaches in CI/CD and production deployment if symlink was the default, so personally I think the user-side colcon defaults file is a reasonable compromise.

edit flag offensive delete link more

Comments

This is definitely a good point that I hadn't considered. I've been pretty focused on my own dev machine, but deployment and CI/CD are definitely important, thanks!

shonigmann gravatar image shonigmann  ( 2021-11-03 11:20:13 -0600 )edit
1

answered 2021-11-03 04:31:16 -0600

I think the default without symlinking is a more predictable workflow. You 'compile' everytime. Stuff works.

With symlinking, sometimes stuff works without compiling (Yeah!). But sometimes you rename a python file, and it doesn't work anymore. So you need to be very aware that adding files and modifying filenames do require recompilation. And modifying python and urdf files don't. But modifying cpp files does.

Perhaps not that trivial especially for new users who don't really have a clue yet about how this all works under-the-hood.

edit flag offensive delete link more

Comments

Yeah, I can definitely see the value in a more explicit compile strategy, especially for newer users. Thanks

shonigmann gravatar image shonigmann  ( 2021-11-03 11:20:55 -0600 )edit

Question Tools

4 followers

Stats

Asked: 2021-10-25 20:35:52 -0600

Seen: 1,523 times

Last updated: Nov 03 '21