Is it a good practice to force `RPATH` to be embedded in the installed targets?

Thanks @Martin_Guenther and @de-vri-es for your insights and comments.

@Martin_Guenther

I really liked the env-based method. I’ve never fully understood how env tag is deprecated but is still referenced in the documentation. Does your method work on Kinetic? I’ve seen the wrapper script method mentioned by @de-vri-es in other projects. I think I will go with that solution for now. The downside is running any node via rosrun CLI is going to be a hassle for end users.

In short, my view boils down to this: maintainers / developers shouldn’t mess with RPATHs, but users/packagers can have valid reasons. Of course you may be both at the same time, but you should still keep the separation in mind since other users/packagers may not want an RPATH in the installed targets.

Good point!