I've been looking into ros2 a little bit, and I was curious about a couple of things regarding building and managing packages.First a brief aside, I'm very pleased with the decision to use an existing middleware solution. While my personal experience with OpenSplice has overall been negative due to the complexity of setup, bugs encountered, and lack of documentation, it may have improved since I was using it intimately in ~2011-2014. Plus, since it is open source it can be improved. Despite these experiences, it is great that ros2 isn't being started from scratch!catkin/amant/package managmentMuch like the middleware, couldn't package management be handled by existing tools made elsewhere in the same manner as the choice of DDS? If not, why not?
From my perspective, choosing an existing tool could substantially reduce the need for such work during ros2 development and into the future. It would also prevent platform specific gotchas that come with a smaller user base. Plus, this space is much different today when compared to how it was 2009.
Existing full stack build toolsFor example, there are cross platform and language build tools already available that scale to massive size:
- buck build (facebook) c++, java, D, python, rust, lua (many more)...
- bazel build (google) c++/java primarily
- pants build (twitter/foursquare)
Combining existing federated build and package tools
Alternately, adopting an existing package manager such as homebrew+linuxbrew or 0install.net for applications in combination with existing package managers that work well with their own language if needed. Particularly with the recent release of Ubuntu for Windows, *brew could be a powerful tool!
- tight focus on making it easy to create installers for your own package
- possible to provide full top to bottom versioning of packages and dependencies (avoid cross-os differences!)
- federated build/install system
- developer tools
- "bottles" which are prepackaged binaries
- automatic dependency installation
- flags to customize the build configuration
- continuous integration support
- integration with many many languages (i.e. installing and setting them up)
- OSRF already uses homebrew on OS X!
Of course this isn't the whole solution because the build tools matter. Fortunately, most languages have good existing options ros2 could integrate with and provide corresponding examples of how to use it with ros2. Here are some possible options for various languages:C++
- Standalone CMake (which has improved a lot now around 3.5 with namespaces and separate build/install configs, cpack, packageconfighelpers etc)
- CMake + an existing convenience tool such as:
- https://github.com/conan-io/conan (successor to biicode)
- https://github.com/ruslo/hunter
- https://github.com/iauns/cpm
- https://github.com/schuhschuh/cmake-basis (I worked on this in 2014)
Java
- maven
- gradle
- ant
Python - pip/pip3
Ruby - RubyGemslua - luarocks
ConclusionUltimately, couldn't either one of the full stack build tools, or a federated setup (perhaps modifying existing tools when/if necessary) be sufficient compared to a ros specific toolset?
I've at least read:Thanks for your consideration!
--
You received this message because you are subscribed to the Google Groups "ROS SIG NG ROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-ng-ro...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I know our justifications exist largely in our (the ROS 2 team's) heads, and that sucks, but thankfully discussions like this can force us to put them into words. So thanks for getting the ball rolling on that point. I look forward to more nuanced discussions and proposals as we converge on a common understanding of the current state of things.
Existing full stack build toolsFor example, there are cross platform and language build tools already available that scale to massive size:
- buck build (facebook) c++, java, D, python, rust, lua (many more)...
- bazel build (google) c++/java primarily
- pants build (twitter/foursquare)
I've experimented with bazel more than the others, but all of these, in my opinion, don't address the federated model we have in ROS completely. They tend to be designed to accommodate a centralized, large repository with modular internal structure, and require everything to be written in or wrapped up in bazel (or the tool of choice). By comparison we're moving towards a set of build, install, and test conventions in ament, such that you don't even need cmake specifically.
On Fri, Apr 15, 2016 at 10:39 PM, William Woodall <wil...@osrfoundation.org> wrote:I know our justifications exist largely in our (the ROS 2 team's) heads, and that sucks, but thankfully discussions like this can force us to put them into words. So thanks for getting the ball rolling on that point. I look forward to more nuanced discussions and proposals as we converge on a common understanding of the current state of things.
+1 for Will's excellent summary of the rationale for creating and maintaining a ROS build system. His message all by itself is a good step towards a solid Rationale section for the ament design document.,
My initial impression of ROS back in 2009 was colored by the natural skepticism of any experienced open-source programmer towards any project that creates its own build system. (Qmake was a well-known and annoying example at the time.) It was only after several months using ROS that I came to understand how much the build system enables our federated development goals.
I love Homebrew, and I think it's a really nice tool, but I think they lean towards bleeding edge developers. It lacks some of the rigor of other distribution systems like apt-get, especially in terms of controlling versions of packages you can install. It does a nice job of keeping old versions installed side-by-side, but shy's away from complex versioned dependencies (which I think is understandable given their users and how the tool is used typically). |
| class Opencv < Formula desc "Open source computer vision library" | |
| homepage "http://opencv.org/" | |
| url "https://github.com/Itseez/opencv/archive/2.4.12.tar.gz" | |
| sha256 "8989f946a66fa3fc2764d637b1c866caf28d074ece187f86baba66544054eefc" | |
| head "https://github.com/Itseez/opencv.git", :branch => "2.4" | |
| revision 2 | |
| bottle do | |
| sha256 "3e584f97f377b8ac0f7e55efa494bdb0fb108930212f5fb8a03cecc18f9b1d43" => :el_capitan | |
| sha256 "c60dc79ecf71499e91945726f4e0fd3f7abaf2dac92e4a8d081c4be48d39dcac" => :yosemite | |
| sha256 "f4e3fdf22515e9847f70fcd71ef96eef06e68077f054e0178417fe073594fd83" => :mavericks | |
| end | |
| option "32-bit" | |
| option "with-java", "Build with Java support" | |
| option "with-qt", "Build the Qt4 backend to HighGUI" | |
| option "with-tbb", "Enable parallel code in OpenCV using Intel TBB" | |
| option "without-tests", "Build without accuracy & performance tests" | |
| option "without-opencl", "Disable GPU code in OpenCV using OpenCL" | |
| option "with-cuda", "Build with CUDA support" | |
| option "with-quicktime", "Use QuickTime for Video I/O instead of QTKit" | |
| option "with-opengl", "Build with OpenGL support" | |
| option "with-ximea", "Build with XIMEA support" | |
| option "without-numpy", "Use a numpy you've installed yourself instead of a Homebrew-packaged numpy" | |
| option "without-python", "Build without Python support" |
brew uninstall opencv
brew tap ahundt/science
brew install ahundt/science/opencv
brew install https://raw.githubusercontent.com/ahundt/homebrew-science/vtk6/pcl.rb
Much like the middleware, couldn't package management be handled by existing tools made elsewhere in the same manner as the choice of DDS? If not, why not?
For example, there are cross platform and language build tools already available that scale to massive size:
- buck build (facebook) c++, java, D, python, rust, lua (many more)...
- bazel build (google) c++/java primarily
- pants build (twitter/foursquare)
Ultimately, couldn't either one of the full stack build tools, or a federated setup (perhaps modifying existing tools when/if necessary) be sufficient compared to a ros specific toolset?
...
It is indeed very easy to set up your own homebrew tap to host your own custom packages. It's harder, though, to put version constraints on dependencies (for example requiring an older version of boost). The current state-of-the-art is to create a duplicate formula (such as boost155) typically hosted in homebrew/duplicates. I don't consider this a very elegant approach.It is true that they allow customizable builds (such as --double-precision for bullet), and you can declare these options in your dependencies (gazebo requests that double-precision option from bullet). Using that example, if you install gazebo and bullet is not installed, it will install bullet with the requested options. If bullet is already installed, however, it won't check whether it has the desired configuration, it will just use it.Don't get me wrong, I love homebrew very much. I just think it's not trying to do everything that debian does, so it's important to keep that in mind.Steve
This seems to have died out while I've been traveling. Any chance you might have a moment for my questions from April 17 below?I've also thought of another problem I've encountered. As an LTS gets older some of the tools I use must be updated, which means compiling and patching from source, sometimes supplying later versions of items in /usr/lib in /usr/local/lib, sometimes for bugfixes there isn't another way to avoid. Can Ament do anything to make life easier in this situation?
Brew, upon disc. So I don't think it willussion seems to have not found an easier to use (their top priority) way of dealing with versions other than files like github.com/username/homebrew-tap/boost155.rb instead of github.com/username/homebrew-tap/boost.rb. The one thing they may add is explicit versioned file support and aliasing for the latest version.
Brew does seem to be looking into linux support for 1.0. A nice plus will be support for distros that don't have debian... maybe it will eventually prove easy enough to manually port the OS X ros install scripts back to linux, then I can at least utilize the package version/bugfix flexibility and easy to use scripts on linux too. Perhaps it really is just as easy to do for non-experts on linux/ubuntu as well and I'm just not familiar with the process?
Thanks, I'm just trying to understand the perspective from which your post was written!
--
Steven, thank you for your reply. I'm running into some confusion between this reply and how things work with ROS. Could you clarify? Hopefully the following questions illustrate what I'm missing:Does Ubuntu currently manage all your debian packaging of ROS releases for you from top to bottom? It is true the homebrew guys won't manage a ROS release for you, but could you describe how that's different from what you do already?Could ROS resolve this by cloning its own "LTS" branch of the necessary taps (or their own super tap) into a ROS managed repo for each release and freeze things that way?Additionally, how does the stability of debian versions help ROS releases on other platforms where ROS is used but debian is not?These things are doable, but the main thing is is that we don't want to be maintaining the core OS and all it's dependencies in addition to the ROS distribution. We take advantage of the great work of the maintainers in the Debian and Ubuntu communities and use their releases as stable bases upon which to build our ROS packages. Leveraging that, on any given day we always expect ROS to install on our supported platforms.Comparatively OSX support based on homebrew is only known to work at a given point in time when tested. However after that time when upstream moves a major dependency we don't know when or if it will break our software. We could fork the entire system however to do so would incur the cost of maintaining every dependency. We regularly get reports of software previously tested as working is no longer working due to changed dependencies.We are working hard to keep the dependency tree smaller for ROS2 as can be seen by our small mostly self contained binary installations for our Alphas. However as a generic deployment mechanism when we start building up the community based stack I think we want to stick to the native packages managers on most platforms.
7. repeat step (5) and (6) to go back to depending on upstream version, but things still need to be manually compiled until a new ROS release updates the dependency, which is often quite a while.
--
> When considering the above, perhaps it will make sense why my first instinct was suggesting the mechanisms in brew to streamline this process.Andrew, the example you gave is definitely something that happens all the time, but it seems like this use case has more to do with the management of forks of repos than it does with the distribution of "official" releases. Really there's nothing in ROS or ROS2 preventing this functionality other than a convenient place in the community for users to put forks.rosdistro [1] doesn't have the model to capture forks, but if it did, it would probably take a day to write a script that uses something like vcstool to all of the appropriate dependencies into a source workspace. ROSIndex [3] does model forks of repos, and again, it wouldn't be hard to add a script to that website which generates a YAML file that vcstool can use to clone a bunch of packages into a workspace.Then you could just share a list of your variants, pipe it into a program, and get all of the code you need to run that variant.-j
--
At ROSCon last October, Mark Shuttleworth proposed "snap" as a secure, cross-platform packaging designed for the Internet of Things. I notice that Ubuntu 16.04 Xenial supports it.Does anyone here have experience with snap they'd like to share?
Is it a potential packaging option for ROS 2?
--
You received this message because you are subscribed to the Google Groups "ROS SIG NG ROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-ng-ro...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.