--
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.
What is the use case for mixing ROS1 and ROS2 in the same package?I'd prefer that the message package names remain the same.
--
--
Beside that ROS 1 and ROS 2 packages use a different CMake infrastructure (catkin vs. ament) to be built (hopefully we can publish an article about ament in the near future).Later is necessary since ROS 2 require feature in the build process which are not available in ROS 1.
Therefore mixing ROS 1 and ROS 2 in the same package is not possible.Based on the experience with "mixing" rosbuild with catkin that is also not a goal for ROS 2.It is intended to keep ROS 1 and ROS 2 completely separate.
That being said there is one important use case which requires to make it necessary to use ROS 1 message and ROS 2 messages at the same time.A bridge should be able to receive messages from one ROS version and relay them to the other ROS version.This software must be able to use C++ headers from both ROS 1 as well as ROS 2 packages.Since packages are based on CMake and are being identified by their name (`find_package(<pkgname>)`) these packages must have unique names across the ROS versions.Based on these requirements the message packages in ROS 2 have different names which are not colliding with ROS 1 package names.
--joq
--
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.
On Fri, Jul 3, 2015 at 4:56 PM, Jack O'Quin <jack....@gmail.com> wrote:If the only multi-version package build is for the bridge, why not invent a way to handle that special case, instead of forcing global renaming of message types?We've given some thought to how to do just that (handle the special case), but we've not come up with a solution that works well in practice. It really just boils down to the fact that they both use CMake and you need to find_package(foo) twice, once from ROS 1 and once from ROS 2, and get different results each time. It would be great to have a solution or a pattern that would allow us to overcome that without introducing lots of special changes in either the ROS 1 or ROS 2 version of the package. It should be relatively straight forward scenario to setup, just create a package with messages in ROS 1 and then a package in ROS 2 with the same name and messages. Then try to write another package, in the style of the current bridge, which uses ROS 1 and ROS 2 at the same time, as well as both versions of the message packages. If anyone can make that work in a clean way I think it would interesting to discuss and pursue.
As a result we've been naming packages differently on purpose so that the core ROS 2 and ROS 1 stacks don't have name collision. That's worked so far because we can take the time to organize it in such a way, but I agree that's not an ideal reality for each ROS 1 package you'd like to migrate to ROS 2.
One hopeful idea is that we'll be able to have a bridge in the future that's perhaps not as performant, but that can work without needing to depend on generated code from the ROS 2 message packages. Instead it would find them at run time and dynamically publish and subscribe to them based on the message idl file alone. That would allow you to have the same package name in ROS 1 and ROS 2 without running into the issue of how to deal with both at build time. However, that's just an idea at this point and so for the first version of the bridge which relies on generated code, in both ROS 1 and ROS 2, it was easier to change the names.
Looking at the ros1_bridge/CMakeLists.txt, I can imagine getting access to the ROS 1 messages using something like...find_package(ros1 REQUIRED std_msgs)
instead of...find_package(std_msgs)That could provide enough wrapper to allow forcing the ROS 1 messages into a distinguishable directory structure and handle the CMake differences.
Looking at the ros1_bridge/CMakeLists.txt, I can imagine getting access to the ROS 1 messages using something like...
find_package(ros1 REQUIRED COMPONENTS std_msgs)
Looking at the ros1_bridge/CMakeLists.txt, I can imagine getting access to the ROS 1 messages using something like...find_package(ros1 REQUIRED COMPONENTS std_msgs)Could you please also elaborate how this would work internally?I don't understand how the "ros1" CMake config file or CMake module will locate the ROS 1 package "std_msgs" is there is a ROS 2 package with the same name.
PS: ament is not "yet another ROS build system".You could call it catkin 1.0 or catkin 2.0 which address problems in the current catkin version which have been identified in the last two/three years of usage.Since we don't have the article about ament written yet it might not be obvious what the differences and similarities are - I will hopefully get to write that down in the near future.
--
I do not have access to them but...
--
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.