1. I'm worried that ROS 2 development will break my ROS 1 system.
To maintain the stability of existing ROS 1 code and avoid the risk of
regressions in ROS 1, we don't intend to backport anything significant
from ROS 2. That's not to say that it can't happen, but our default
position is that ROS 1, including catkin, should remain as is, with
incremental improvements and bug fixes.
3. Why did OSRF create a yet another build system, instead of improving catkin?
Hi Thibault,
my interpretation is that this is less about technical concerns but about effort for the (small) team at OSRF. The following is just my interpretation, of course.
Thanks Brian for giving the OSRF perspective.
It sill seems odd to me. Basically OSRF seems to be saying:
1. ament is *very* similar and close in source to catkin.
2. ament is vastly superior to catkin.
3. ROS1 users will not get ament, they are stuck with catkin until they migrate to ROS2. Tough luck.
That does not add up well. If ament is vastly superior yet similar to catkin, then it makes sense to allow building ROS1 packages with it as well.
The main question here is why ament was not build to still support ROS1 builds from the start.
From what I understand, of all improvements made to ament, the only crucial one
was the restructuring to allow ROS2 message generation. Everything else are "nice-to-have's",
that would by themselves never have motivated OSRF to invest time in the buildsystem.
Given that, the strategy could have been as follows:
1. Create a workspace with catkin on an experimental branch/fork catkin2.
2. Add ROS1 core packages and some example ROS1 packages
3. Add ROS2 core packages
4. change ROS2 packages and catkin2
5. check ROS1 still builds + works
6. if ROS2 goals not achieved or ROS1 breaks, goto 4
7. Done
This process would not have broken catkin or disturbed ROS1, and the changes
could have been kept outside the main catkin branch, or even in separate sources
like ament. Catkin as a name would have been more viable to keep around where
possible, sharing and reusing code would have been more viable. Early adopters
working on ROS1 could have started using ament/catkin2 and provide early feedback,
while working realistically with ROS1.
This process would also made it more obvious to keep single message definition packages.
As mentioned before:Message packages in ROS 1 and ROS 2 require different message generators.Those need to be listed as dependencies in the package.xml file.Sine they must be different a single package can obviously not satisfy both ROS versions.
On Thu, Jul 9, 2015 at 11:27 AM, Dirk Thomas <dth...@osrfoundation.org> wrote:As mentioned before:Message packages in ROS 1 and ROS 2 require different message generators.Those need to be listed as dependencies in the package.xml file.Sine they must be different a single package can obviously not satisfy both ROS versions.This is apparently much more obvious to you than to some of us.I can certainly imagine ways to deal with that problem. Perhaps you have already considered and rejected them all.
The first thing that comes to mind is adding a ROS version designation to package.xml. The default would be "1". I expect that will be useful, and perhaps even necessary, for many reasons.
But, wanting to maintain the same message package names is clearly of great benefit to users. So, you should seriously consider various means of resolving that limitation.
On Thu, Jul 9, 2015 at 12:20 PM, Jack O'Quin <jack....@gmail.com> wrote:The first thing that comes to mind is adding a ROS version designation to package.xml. The default would be "1". I expect that will be useful, and perhaps even necessary, for many reasons.I don't understand how this helps to make a single package work with both ROS version.How would annotating a ROS package with either a ROS 1 flag or a ROS 2 flag make a package work with both?
--
On Thu, Jul 9, 2015 at 3:31 AM, Thibault Kruse <tibo...@googlemail.com> wrote:Thanks Brian for giving the OSRF perspective.
It sill seems odd to me. Basically OSRF seems to be saying:
1. ament is *very* similar and close in source to catkin.
2. ament is vastly superior to catkin.
3. ROS1 users will not get ament, they are stuck with catkin until they migrate to ROS2. Tough luck.
That does not add up well. If ament is vastly superior yet similar to catkin, then it makes sense to allow building ROS1 packages with it as well.The main question here is why ament was not build to still support ROS1 builds from the start.
From what I understand, of all improvements made to ament, the only crucial one
was the restructuring to allow ROS2 message generation. Everything else are "nice-to-have's",
that would by themselves never have motivated OSRF to invest time in the buildsystem.You have brought up this concern multiple times in different threads in the last days.And I have replied to it repeatedly.Your misunderstanding is that ament is *not* only a restructuring to allow ROS message generation.As mentioned before ament also has the following changes (which is not a complete list):* it does not support the devel space anymore* it provide ament_cmake_auto to achieve what catkin_simple was never able to deliverThese changes *require* breaking changes.E.g. the function ament_package() has a different semantic meaning, has a different signature and is called in a different location every packages CMakeLists.txt file.Since this would require to update every ROS 1 package in order to work and our policy is to *not* disrupt ROS 1 in such a way the feature has *not* been deployed in ROS 1 but exclusively in ROS 2.
This process would also made it more obvious to keep single message definition packages.And again you repeat your argument without considering the previous feedback.As mentioned before:Message packages in ROS 1 and ROS 2 require different message generators.Those need to be listed as dependencies in the package.xml file.Sine they must be different a single package can obviously not satisfy both ROS versions.
This process would also made it more obvious to keep single message definition packages.And again you repeat your argument without considering the previous feedback.As mentioned before:Message packages in ROS 1 and ROS 2 require different message generators.Those need to be listed as dependencies in the package.xml file.Sine they must be different a single package can obviously not satisfy both ROS versions.
I can imagine a ROS1 package called foo1 requiring common_msgs, and a ROS2 package called foo2 also requiring common_msgs. A ROS2 package named common_msgs can depend on both ROS1 and ROS2 message generators, to produce bindings for both.
Both foo1 and foo2 can depend on this common_msgs within an ament workspace. This common_msgs can be a ROS2 fork of ROS1 common_msgs, meaning the ROS1 common_msgs fork remains unchanged causing no disruption to ROS1.
What am I missing?
We are mixing two different topics in this discussion:(1) it was requested that a single package with a single code base should be a ROS 1 as well as a ROS 2 package
(2) two message packages (one for ROS 1 and one for ROS 2) should be able to have the same name
Regarding (2):In short: finding two packages in CMake having the same name is not possible.In long: lets go through a simple example.We have an example package "foo_msgs" which exists in ROS 1 and ROS 2.In CMake each package individually can found using the function "find_package()" and signals through whatever mechanism its ROS version.The function will either use the CMAKE_PREFIX_PATH to search for the package or a custom provided list of locations.It would be possible to write a Python script which looks for *all* packages which have that name and return a mapping like this:* ROS 1 foo_msgs was found in: /op/ros/indigo/share/foo_msgs* ROS 2 foo_msgs was found in: /op/ros2/xxx/share/foo_msgsEven with that knowledge it is not possible in CMake to "find_package" both.The first invocation does what it is supposed to do:* find_package(foo_msgs PATHS known-path-for-ros1)But the second invocation does not:* find_package(foo_msgs PATHS known-path-for-ros2)This wont find the ROS 2 version of package because CMake will reuse the information of the previously defined ROS 1 package "foo_msgs".The order is arbitrary here - it is always the second find which fails.Resetting individual variable in the CMake cache before the second find call to retrigger a search is also not a viable option.It is unknown how many other packages "foo_msgs" has find_package()-ed recursively and what side effect it had.
--
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.
catkin_pkg as well as many other ROS 1 Python packages cannot be side-by-side installed for Python 2 and Python 3 at the same time."* I question the necessity for symlinking source files into install space.- It's another difference between ROS and what programmers generally expect.- It is merely a convenience: people soon remember to install after changing things.
* "ament_auto" looks wonderful.- what are its limitations?- will it work for almost everything?
* What does environment creation involve?- When and why would a package need to provide its own shell script for this?- How portable is that going to be?
* From Dirk's document: "catkin_pkgas well as many other ROS 1 Python packages cannot be side-by-side installed for Python 2 and Python 3 at the same time."
* Can a ROS 1 package be built using ament, if desired? (I anticipate a future of maintaining various drivers simultaneously for both ROS versions, probably for years.)
On Sat, Jul 11, 2015 at 2:46 PM, Jack O'Quin <jack....@gmail.com> wrote:* "ament_auto" looks wonderful.- what are its limitations?- will it work for almost everything?ament_auto uses the extension point system of ament which makes it very flexible.I don't know what the limitations are - until know it was always possible to extend it to new use cases.
* What does environment creation involve?- When and why would a package need to provide its own shell script for this?- How portable is that going to be?A package can provide a package-specific setup file to change the environment in any way necessary.Usually that involves setting environment variable like PATH or PYTHONPATH.That is necessary to find the executables or Python packages in the install space (if it is not /usr).But basically a package can set whatever it needs to in order to make it's install space fully usable.A package can provide whatever setup scripts it wants to - currently these are shell scripts and Windows batch files.The approach works currently well on Linux, OS X and Windows.
* Can a ROS 1 package be built using ament, if desired? (I anticipate a future of maintaining various drivers simultaneously for both ROS versions, probably for years.)Are you referring to build an existing ROS 1 package using the ament command line tool?ament_tools uses different environment and CMake variables.It also only supports the format 2 of the package.xml spec and many ROS 1 packages use format 1.Therefore I don't think the ament command line tool it is able to build ROS 1 packages but I have never tried it.
Or are you asking about using ament_cmake instead of catkin in the CMakeLists.txt files in ROS 1 packages?I haven't tried that because our goal is to not backport ROS 2 features to ROS 1.
On Sat, Jul 11, 2015 at 11:27 PM, Dirk Thomas <dth...@osrfoundation.org> wrote:On Sat, Jul 11, 2015 at 2:46 PM, Jack O'Quin <jack....@gmail.com> wrote:* "ament_auto" looks wonderful.- what are its limitations?- will it work for almost everything?ament_auto uses the extension point system of ament which makes it very flexible.I don't know what the limitations are - until know it was always possible to extend it to new use cases.What is the extension point system? Where can I find out more about it?
* What does environment creation involve?- When and why would a package need to provide its own shell script for this?- How portable is that going to be?A package can provide a package-specific setup file to change the environment in any way necessary.Usually that involves setting environment variable like PATH or PYTHONPATH.That is necessary to find the executables or Python packages in the install space (if it is not /usr).But basically a package can set whatever it needs to in order to make it's install space fully usable.A package can provide whatever setup scripts it wants to - currently these are shell scripts and Windows batch files.The approach works currently well on Linux, OS X and Windows.Does every package need to include shell scripts and Windows batch files?
Is there a link to some typical example?
Or are you asking about using ament_cmake instead of catkin in the CMakeLists.txt files in ROS 1 packages?I haven't tried that because our goal is to not backport ROS 2 features to ROS 1.That is really a goal of the project?How did that come to be a requirement?
On Sun, Jul 12, 2015 at 11:20 AM, Jack O'Quin <jack....@gmail.com> wrote:What is the extension point system? Where can I find out more about it?Extension points are a design pattern e.g. used heavily in Eclipse.In short:One code part declares an extension point and "invokes" it:Other code parts register a callback for an extension points which gets called when the extension point is being invoked:You will find numerous uses of these two functions throughout the CMake code of ROS 2.
* What does environment creation involve?- When and why would a package need to provide its own shell script for this?- How portable is that going to be?A package can provide a package-specific setup file to change the environment in any way necessary.Usually that involves setting environment variable like PATH or PYTHONPATH.That is necessary to find the executables or Python packages in the install space (if it is not /usr).But basically a package can set whatever it needs to in order to make it's install space fully usable.A package can provide whatever setup scripts it wants to - currently these are shell scripts and Windows batch files.The approach works currently well on Linux, OS X and Windows.Does every package need to include shell scripts and Windows batch files?If its installed files require any kind of environment variable: yes.
Is there a link to some typical example?If a package is not a plain Python packages but uses CMake to install a Python package it uses the following function:This will then ensure to create an environment hook which extends the PYTHONPATH:
I haven't tried that because our goal is to not backport ROS 2 features to ROS 1.That is really a goal of the project?How did that come to be a requirement?Please see the second message from Brian in this thread for a rational behind that decision:
1. I'm worried that ROS 2 development will break my ROS 1 system.To maintain the stability of existing ROS 1 code and avoid the risk ofregressions in ROS 1, we don't intend to backport anything significantfrom ROS 2. That's not to say that it can't happen, but our defaultposition is that ROS 1, including catkin, should remain as is, withincremental improvements and bug fixes.
On Mon, Jul 13, 2015 at 12:41 AM, Dirk Thomas <dth...@osrfoundation.org> wrote:On Sun, Jul 12, 2015 at 11:20 AM, Jack O'Quin <jack....@gmail.com> wrote:What is the extension point system? Where can I find out more about it?Extension points are a design pattern e.g. used heavily in Eclipse.In short:One code part declares an extension point and "invokes" it:Other code parts register a callback for an extension points which gets called when the extension point is being invoked:You will find numerous uses of these two functions throughout the CMake code of ROS 2.I am looking for examples of how and for what it's used, not just the implementation.
* What does environment creation involve?- When and why would a package need to provide its own shell script for this?- How portable is that going to be?A package can provide a package-specific setup file to change the environment in any way necessary.Usually that involves setting environment variable like PATH or PYTHONPATH.That is necessary to find the executables or Python packages in the install space (if it is not /usr).But basically a package can set whatever it needs to in order to make it's install space fully usable.A package can provide whatever setup scripts it wants to - currently these are shell scripts and Windows batch files.The approach works currently well on Linux, OS X and Windows.Does every package need to include shell scripts and Windows batch files?If its installed files require any kind of environment variable: yes.Trying to understand the macros and functions you linked, it appears that *maybe* things like ament_python_install_package() provide all the necessary shell scripts or batch files for pure Python packages.Is that right? If so, then most packages would not need to create their own scripts. That seems highly desirable.
Is there a link to some typical example?If a package is not a plain Python packages but uses CMake to install a Python package it uses the following function:This will then ensure to create an environment hook which extends the PYTHONPATH:Again, I am looking for a user perspective, not the bottom-up implementation details. I hope the Python case is similar to using catkin_install_python(). That would be fine. Is there a similar interface for C++?
I haven't tried that because our goal is to not backport ROS 2 features to ROS 1.That is really a goal of the project?How did that come to be a requirement?Please see the second message from Brian in this thread for a rational behind that decision:I read Brian's message pretty carefully when he first posted it, and again today. I suppose you are referring to this part:1. I'm worried that ROS 2 development will break my ROS 1 system.To maintain the stability of existing ROS 1 code and avoid the risk ofregressions in ROS 1, we don't intend to backport anything significantfrom ROS 2. That's not to say that it can't happen, but our defaultposition is that ROS 1, including catkin, should remain as is, withincremental improvements and bug fixes.I hate to be pedantic, but we do need to speak clearly about our goals and requirements. The most important thing for this SIG to accomplish is a strong consensus on what we collectively want.Brian says the goal is to maintain ROS 1 release and development stability. I think we all agree with that. In pursuit of that goal, he mentions a lack of intention to do significant backports to ROS 1, while admitting that it could happen.So, not doing backports is a means to preserving stability, not a goal in itself.I concur with that, but worry slightly that you seem to consider not backporting as a another separate objective.Why does that matter? Because there are other goals, like ease of migration, that are important, but not yet clearly understood. Allowing ROS 1 packages to someday be built using ament tools may or may not help with that. I doubt anyone knows. But, we should not be making design or implementation decisions based on the notion that we can never do it. Surely, some backports of new tools can be done without affecting any existing ROS 1 code. So, exceptions to the rule are possible, subject to good engineering judgement.I am not asking for anything different here and now, but I do want to permit some flexibility as the design evolves.