-
Notifications
You must be signed in to change notification settings - Fork 48
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
Attempt to load any available RMW implementation. #189
Conversation
The old logic was to load what the user asked for (via the RMW_IMPLEMENTATION environment variable). If the user didn't explicitly ask for an implementation, then it would attempt to load the default RMW implementation. The new logic is to load what the user asked for. If the user didn't explicitly ask for an implementation, attempt to load the default RMW. If that fails for some reason, fall back to loading any available RMW. If all of that fails, fail the load. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
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.
The patch seems reasonable to me, I left some minimal comments about error handling.
Besides making the code more robust, this PR should fix problems we are seeing in running demo PR jobs, like https://build.ros2.org/job/Rpr__demos__ubuntu_focal_amd64/131 .
I don't get why those tests are failing to find rmw_cyclonedds_cpp
, could you explain?
It's tricky, and has to do with how our PR jobs and Debian packages are setup and because the demos repository is "special". The way that the PR jobs work is that they look through all of the packages in a particular repository, and find all of the package dependencies declared in the package.xml. The job then installs the dependencies listed via apt-get (this may or may not be done through rosdep, it isn't clear to me). One of the (recursive) dependencies is Our Debian package for
(I've removed the other dependencies for brevity). What that means is that any of the Our demos repository is special in that a package in it ( Putting this all together, what happens is that the PR job goes to find dependencies. Since One other interesting thing to note is that only 3 tests in the demos repository currently fail this way. You'd think that all of the tests would fail, but this doesn't happen because most of the tests in that repository are parameterized on the available RMW implementations. Thus, we get tests like The new code fixes this by searching for any additional RMW implementations if the default isn't installed, so it will find the installed Let me know if that all makes sense. |
Makes sense to me, thanks for clarifying!!!
It doesn't sound like a problem to me. |
Yeah, that would also work. Yet another way to fix this would be to change the But changing the loader this way seemed like an overall improvement anyway to me, so I went with this code. |
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
The macOS failures are unrelated. Since this is approved, I'm going to go ahead and merge it, then do a release into Rolling. That should hopefully fix the PR jobs. |
The old logic was to load what the user asked for (via the
RMW_IMPLEMENTATION environment variable). If the user didn't
explicitly ask for an implementation, then it would attempt
to load the default RMW implementation.
The new logic is to load what the user asked for. If the user
didn't explicitly ask for an implementation, attempt to load
the default RMW. If that fails for some reason, fall back to
loading any available RMW. If all of that fails, fail the
load.
Signed-off-by: Chris Lalancette clalancette@openrobotics.org
One important thing to note about this PR is that it introduces a dependency between
rmw_implementation
andament_index_cpp
. I don't think that is a problem, but it bears thinking about.Besides making the code more robust, this PR should fix problems we are seeing in running demo PR jobs, like https://build.ros2.org/job/Rpr__demos__ubuntu_focal_amd64/131 .
I'm going to run full CI on this; I'm leaving this in draft state until that is done. Any early feedback is welcome.