-
Notifications
You must be signed in to change notification settings - Fork 3
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
Example of single package containing both ros1 and ros2 code #1
base: master
Are you sure you want to change the base?
Conversation
<maintainer email="[email protected]">rre</maintainer> | ||
<license>BSD</license> | ||
|
||
<buildtool_depend condition="$ROS_VERSION == 1">catkin</buildtool_depend> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this 'condition' attribute currently supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's part of REP-149: Package Manifest Format Three Specification.
find_package(catkin QUIET) | ||
find_package(ament_cmake QUIET) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that both could be found in situations where both ROS 1 and ROS 2 have been source
d (fi when the ros1bridge
is being used).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something you would do when building or only when running things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am assuming this should not be done when building so I could added a check if both are found it would error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something you would do when building or only when running things?
Both. For custom messages or services the bridge needs to be rebuilt. That would be something users will want to do I believe in many cases.
I am assuming this should not be done when building so I could added a check if both are found it would error.
If with "this" you are referring to "source
ing both" then it would be done both at runtime and at build time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the case then will there be package name conflicts between ros1 and ros2 packages with the same name?
I came across your example and was interested in seeing if it was possible to contain both ros1 and ros2 into a single package so the package name could be the same in both ros1 and ros2. This PR is not intended to be merged into the master but if you want I can rename this to different package name and keep the original examples to show both ways if you are interested.