-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: speed up setup.sh for non-merged devel spaces #28
Comments
I just started experimenting with this fine tool. Even after reading the doc fairly carefully, I am still unclear about what setup.bash to source. |
I currently always run with |
@jack-oquin I don't understand what you mean, could you explain your workflow a little and at which point it is not clear to you which setup file should be sourced? |
I was trying to follow the directions in the docs: I created a new workspace for experimentation:
Then I built one package, followed by the rest (~100):
That all worked fine, but now I need to source something to add all those packages to my ROS environment. It looks like there is a separate devel/setup.bash for every package I built, but no top-level one that gathers them all together. So, what is the next step? How do I run unit tests? How do I launch ROS nodes? |
@jbohren: that UPDATE: I found it under |
That works fine, mostly as I had guessed. My $ROS_PACKAGE_PATH is over 5KB long, but it seems functional. Based only on this brief, naive experience, I agree with Jon's suggestion that --merge-devel be made the default. While I feel sure there must be good use cases for "unmerged" devel spaces, perhaps they mostly appeal to more-experienced users. I realize that the alias mechanism would allow me to change that default, but beginners are unlikely to do that right off. Personally, I avoid using custom tool aliases, because they make it hard to work on uncustomized lab or robot systems. |
I agree that it should probably be the default too. I just haven't gotten around to changing it. This ticket is meant to address performance concerns related to sourcing the non-merged devel spaces. |
Yeah, Orocos also complains about the LD_LIBRARY_PATH being too long when using an isolated develspace.
I created a new ticket to track this here: #44 |
I understand that merging involves more variables than just $ROS_PACKAGE_PATH, but that one is particularly crucial when doing anything with ROS. After working with Since $ROS_PACKAGE_PATH descends the file tree correctly, in most cases all I would need to prepend is Should catkin build add a |
Currently those values are set by each package, and It might be possible to have the setup file for I have some hesitations about this though. For example, I'm not sure how this works with respect to symlink'ed folders in the source space. Also, I regard this as more magic which has to be done. I can think of one workaround which might be possible, you could set the RPP to your source space in the terminals before source'ing the setup files, that way it is always on the RPP. For emacs, I'm not sure why it needs the RPP in the first place, but if it is using the RPP, then maybe it should have a command to re-source the setup file. I don't have time to work on this right now, but if you can come up with a reliable way of doing this, I'll help implement/merge this where I can. |
It's for rosemacs, which can find files in packages, etc. Very useful with catkin_make. |
Correct me if I am wrong, aren't the values from devel/.catkin used for generation of the RPP? So only that file would need to be sanitized. |
I'd have to look at the code which sets the RPP, but that may be the case. |
Currently the
setup.sh
file which is generated bycatkin build
is very slow because it must executesetup.sh --extend
for each leaf package and each of those leaf package's run depends recursively (excluding overlap from build depends). On a large workspace, like hydro-desktop_full, 250 packages means sourcing ~188 setup files.Because of the way the devel space is created we can theoretically create a faster single setup.sh which builds the combined devel space in one invocation.
Related: #24
The text was updated successfully, but these errors were encountered: