Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
REP-2001: Propose c++-only minimal ros2 variant #231
REP-2001: Propose c++-only minimal ros2 variant #231
Changes from 1 commit
181dbd6
09b1494
d643255
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 it is an explicit goal for this variant to be able to be used on a target system that doesn't have Python available, a different building + environment setup process should be highlighted as the currently recommended one (colcon build + source a setup file) does not fulfill this requirement (colcon/colcon-core#73)
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 goal isn't to have this be built on a target system that doesn't have Python available. The intention is to be built for a target system that doesn't have Python available. I want to make a strong distinction between the build-time environment and the run-time environment. While these are often the same in classic ROS workflows, It shouldn't be the assumption. Do you think I should add language around that here? I fully expect this to be built with colcon and linted with cpplint, for example.
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 build also needs Python to run the code generators for messages / services / actions.
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.
But that's not needed at runtime, right?
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.
That's what I meant as well but it was not clear.
Currently AFAICT it is not possible to source a colcon setup file (top-level setup.bash file generated by colcon) without Python: colcon/colcon-core#73.
So for such a variant to be usable on a system that doesn't have Python available, we need a different workflow that allow to setup the environment on the target even if the target doesn't have Python. It can be modifying colcon to generate Python-agnostic setup files, or a different mechanism.
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.
Oh - I see what you mean. The way I have used it is to
--merged-install
export LD_LIBRARY_PATH=install/lib
Now that I'm thinking about that, yes, it seems we'll need a non-python way to set up the proper environment variables. Would it be possible to get away with creating a fairly simple pure-shell utiility? Something that would
LD_LIBRARY_PATH
lib
folders toPATH
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.
That simple approach will only work for a subset. A complete shell-based solution must replicate the same logic as it is implemented in Python. That includes collecting all packages in the prefix, getting their dependencies (available in the filesystem, doesn't need to parse the manifests), order them topologically, and then source the setup files of each package.
If the shell-based solution doesn't implement the logic around
.dsv
files that would also imply a much longer time to setup the environment.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.
Are these details just necessary to handle the different types of installs, or is it deeper than that? Perhaps we could impose limitations on the usage of this variant so as to avoid more complexity in the environment setup.
Do these require python, or just the top level script does?
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.
That has nothing do to with the different types of installs.
The importance is the order. One package might rely on an environment change caused by another package it depends on.
No, they don't.
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 think we need to at least have one RMW in order to be able to build this variant - it can be just the default (FastRTPS) - or if that requires undesired dependencies any other RMW impl.
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 attempt to avoid FastRTPS was because of its dependency on libasio-dev. I'm more inclined toward Cyclone because it has no external rosdeps, but I know it's not the default RMW - what do you think?
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 agree that I think that it should stand alone and be buildable in the default configuration without modifications. Otherwise the out of the box experience will be quite poor. And we won't be able to test it easily as all tests would need to have logic to extend it with an implementation.
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 included
rcl_spdlog
andrmw_cyclonedds
in the latest revisionThere 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 think there needs to be a paragraph describing the rational why CycloneDDS was chosen over the default RMW FastRTPS.
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.
FWIW, and I'm not advocating for FastRTPS, I've been able to cross compile to an embedded ARM target using FastRTPS via
--cmake-flags -DTHIRDPARTY=ON
which forces FastRTPS to source it's own copy of asio (among other 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.
That's good information - perhaps we can target this at "one of" like the current core does
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.
historically despite the name "packages", this represent a list of repositories that one can clone and build as is (without the REP needing to explicitly list all packages in all the listed repos).
However some of these repositories contain python packages (e.g.
ament_index
repository includesament_index_cpp
andament_index_py
orament_cmake
includes many python packages). Should they be split out to keep this list "without any Python dependency"? or switch to listing explicitly packages and a recommended way to clone only those packages?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.
That's a good point - I am definitely hoping to build a subset of packages within the involved repositories. I'll add a list of repos and the packages from them that will be built. Since the variants are described by a meta-package, though, if you build
--packages-up-to VARIANT
that's probably more correct than checking things out and building everything.