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
Improve ros2 component CLI #226
Conversation
@mjcarroll incidentally, I think I found a bug in the composable nodes implementation. If you execute: ros2 component run composition composition::Talker The composed node is given the same name as that of the container, which is being passed upon container execution via |
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.
This pull request adds a
run
verb to start a component on a standalone container ...
But it also:
It would be much easier to read if these unrelated changes would be separate PRs (or at least separate commits). I don't see a reason why they should be bundled in a single commit?
To distinguish run
more clearly from load
how about naming it standalone
instead?
@@ -59,7 +52,7 @@ def main(self, *, args): | |||
node=node, remote_container_node_name=args.container_node_name | |||
) | |||
if any(components): | |||
print(*['{} {}'.format(c.uid, c.name) for c in components], sep='\n') | |||
print(*['{} {}'.format(c.uid, c.name) for c in components], sep='\n') |
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.
What motivates the change in indentation?
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.
To get closer to a conventionally 4 spaces wide tabulation, but otherwise as arbitrary as the former 2 spaces.
My intent is to be consistent about indentation while at the same time making it easy to use for someone that's shell scripting. Any thoughts on usability in that regard are welcome
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.
Since other verbs use 2 spaces for indentation I would rather keep it with 2 for now.
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.
Still pending.
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.
Alright, fair enough.
In preparation for a standalone verb. Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
07bb66c
to
9b300d8
Compare
No technical reason, just to avoid having to git plumb it.
So I subjectively prefer |
@mjcarroll @dirk-thomas mind to review? |
@@ -59,7 +52,7 @@ def main(self, *, args): | |||
node=node, remote_container_node_name=args.container_node_name | |||
) | |||
if any(components): | |||
print(*['{} {}'.format(c.uid, c.name) for c in components], sep='\n') | |||
print(*['{} {}'.format(c.uid, c.name) for c in components], sep='\n') |
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.
Still pending.
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
This quiets the warning from colcon about it not explicitly installing a marker. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Fixes #225. This pull request adds a
run
verb to start a component on a standalone container, for instance:But it also:
--quiet
flag to existing verbs to ease shell scripting.package.xml