-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add pid to launch_ros node name as suffix #98
Conversation
Signed-off-by: Brian Ezequiel Marchi <brian.marchi65@gmail.com>
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.
LGTM!
A test would be nice, but I don't think it's necessary for this small change given the overhead involved.
@@ -61,7 +62,9 @@ def _function(self, context: launch.LaunchContext): | |||
if 'rcl_init called while already initialized' in str(exc): | |||
pass | |||
raise | |||
self.__launch_ros_node = rclpy.create_node('launch_ros', context=self.__rclpy_context) | |||
self.__launch_ros_node = rclpy.create_node( | |||
'launch_ros_{}'.format(os.getpid()), |
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.
@BMarchi appending launch
PID helps disambiguate but doesn't make it a hidden a node -- you need a leading underscore.
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 didn't see the requirement to make the launch_ros node hidden. Are you sure about appending that?
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.
Oops, I just tossed in a feature request. It's not in the original ticket, you're right. Disregard (I'll propose it afterwards).
Fixes #2 . As the title says, it adds the pid to the node's name as a suffix. Is there any need to create a test for this?