Skip to content
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

Adding duplicate node information #1088

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Conversation

CursedRock17
Copy link
Contributor

This resolves issue #984 just bringing more information to an error message when there are multiple nodes that are being published. Originally the issue wanted to just add the logger name to make it easier to read, but I also got the node name because I figured to user should want to know both, making an easier to resolve the duplicate node.

That should solve the issue, but there is still a TODO, that's been there since 2019, which talks about the design docs and the instability of duplicate nodes. Do we want to add anything now, like mentioned in the doc:

For a default (non-production) behavior I think having the newer node raise an exception makes sense

Or is it better to leave it be?

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left some comments on things to fix inline.

To reply to:

That should solve the issue, but there is still a TODO, that's been there since 2019, which talks about the design docs and the instability of duplicate nodes. Do we want to add anything now, like mentioned in ros2/design#187:

For a default (non-production) behavior I think having the newer node raise an exception makes sense

Or is it better to leave it be?

Certainly we should do it in a separate PR if we want to attempt to address it.

That said, it is likely a large project. I don't think it will be a lot of code change, but there will have to be a lot of research done both in the code (composition, SROS2, etc), and into how the community is using node names. And since a change like that will almost certainly break some downstream users, we'll have to do community outreach to make sure people are aware that the change is coming.

rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
@fujitatomoya
Copy link
Collaborator

@CursedRock17 thanks for the contribution, i am good to go.

@clalancette can you do the review?

rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more small fixes, then we are ready for CI.

rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
rcl/src/rcl/logging_rosout.c Outdated Show resolved Hide resolved
Signed-off-by: CursedRock17 <[email protected]>

fixing some style changes

Signed-off-by: CursedRock17 <[email protected]>

Adding heap arrays

Signed-off-by: CursedRock17 <[email protected]>

Removing extra bulk

Signed-off-by: CursedRock17 <[email protected]>

Update rcl/src/rcl/logging_rosout.c

Co-authored-by: Chen Lihui <[email protected]>
Signed-off-by: CursedRock17 <[email protected]>

Update rcl/src/rcl/logging_rosout.c

Co-authored-by: Chris Lalancette <[email protected]>

Update rcl/src/rcl/logging_rosout.c

Co-authored-by: Chris Lalancette <[email protected]>

Update rcl/src/rcl/logging_rosout.c

Co-authored-by: Chris Lalancette <[email protected]>

Adding Semicolons

Fixing Linting Error

Signed-off-by: CursedRock17 <[email protected]>

Update rcl/src/rcl/logging_rosout.c

Co-authored-by: Chris Lalancette <[email protected]>

Update rcl/src/rcl/logging_rosout.c

Co-authored-by: Chris Lalancette <[email protected]>
@clalancette
Copy link
Contributor

clalancette commented Aug 23, 2023

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette clalancette merged commit f11fcaa into ros2:rolling Aug 24, 2023
2 checks passed
@CursedRock17 CursedRock17 deleted the logger_info branch August 24, 2023 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants