-
Notifications
You must be signed in to change notification settings - Fork 412
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
[WIP] Add functions to return formatted Node Name-Namespace strings #669
Conversation
Signed-off-by: Jacob Hassold <jhassold@dcscorp.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.
Thanks for opening the pull request. As I said in this description:
I think changing get_node_names()
to return the fully formatted node name + namespace (a.k.a. the fully qualified node name), along with a way to get them separate (like get_node_names_and_namespaces()
), is all we want to do.
…pace method Signed-off-by: Oswin So <oswinso@gmail.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
@wjwwood I believe we've addressed the issues that you raised. Any further things that jump out at you? Also, CLion is warning me of a bunch of Clang violations as I'm going through the code. Should these be cleaned up? Should we make an issue for them? Or should I ignore them? |
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.
Make sure you run the tests that our buildfarm would run to help us catch issues early, as CI turn around is pretty long, see: https://index.ros.org/doc/ros2/Tutorials/Colcon-Tutorial/#run-tests
I've been using "colcon test --packages-select rclcpp" from the root of my development workspace. Is this not correct? I do get several errors about style formatting left around the entire rclcpp package, which was part of the reason I was wondering if you wanted me to go and give the code a good scrubbing. EDIT I think I found what you were hinting at. I'm now adjusting my IDE to conform to ROS 2 specifications for code style. |
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
see: https://google.github.io/styleguide/cppguide.html#Vertical_Whitespace Signed-off-by: William Woodall <william@osrfoundation.org>
That's odd, on master it should produce no errors or failures, so any failures should be due to your diff or maybe some misconfiguration on your system (wrong or missing test dependencies?). We'll see what CI says: |
I should clarify - the IDE I'm using (CLion) is giving Clang style warnings. They're more like guidelines that something looks odd, rather than an actual error. Apologies for the confusion, I misspoke. |
Probably a silly question (I'm new to this), but is there anything I should be doing? The CI is saying that the change was on "Force Reinstallation of Numpy", am I reading it incorrectly? |
That is the latest commit in the |
So that change pertains to the CI system, rather than my code. Got it. So the instability is being caused by something I wrote? I guess I'd better start diving again... |
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
@jhdcs let me know when you want me to rerun CI, the lastest round has test failures that look related to these changes (based on a cursory look only). |
Yeah. I'm thinking that something might have been expecting the old format. Possibly. I'll let you know once I figure it out on my end. |
Okay, I think I know what's going on. NodeGraph::get_node_names() is used throughout the API, and the tests seem to expect an unqualified name (i.e: name, but no namespace). I can either update all the tests to accept the new version of get_node_names, or revert get_node_names to its original functionality, and create a new function called NodeGraph::get_qualified_node_names() that implements our desired functionality. I'm personally partial to the second option, both because it's easier, and because I'm not sure how much of the existing codebase is going to break if we suddenly swap the expected output of an already-in-use function. @wjwwood, what do you think? |
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
@wjwwood Would you be able to re-run CI? I think I might have gotten some things fixed, though I did find something interesting: Apparently if you use std::transform in the original get_node_names() function, you get a timeout error in some of the tests (specifically, gtest_multithreaded_rmw_fastrtps/opensplice, and at least on my system). As such, I've reverted it to the for-based implementation until I can figure out what on earth is going on... |
@jhdcs please revert you most recent commit, the idea is to change the behavior of Please (re)read my suggested solution in the original issue: #643 (comment) It is to update the behavior of the existing function (and fix anything that breaks due to that) and optionally add a function that returns a list of namespace and names as pairs. |
…_names" This reverts commit ed4b166. Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
Signed-off-by: Jacob Hassold <jhassold@dcscorp.com>
@jhdcs looks like something got messed up when you force pushed, and now you have changes from master on this branch... |
GAH! It's just one of those weeks, isn't it? |
Hopefully that fixes it. Sorry for all the trouble, and I really appreciate your guys' patience... I had to re-create the branch, it seems. I'll get the code actually working, then open a new pull request. |
Actually now the pull request is closed and I cannot reopen it... This usually happens if you delete the upstream branch or fork, but I'm not sure what's happening right now... |
That's basically what happened. Part of the fork was deleted accidentally due to my uncanny ability to mega-derp. No data was lost, but GitHub is really confused. I was going to open a new pull request that references both this one and the main issue later on, once I feel like I've worked a few more of the kinks out. Unless you want me to open it now, of course. |
Oh that's up to you. Feel free to open a new pr when ever you're ready. I just wanted to make sure you knew I could not reopen this one. |
Implements functions to add formatted node name and namespace strings. Still needs unit tests. Design tips and suggestions for useful tests is greatly appreciated!
Signed-off-by: Jacob Hassold jhassold@dcscorp.com
Connects to #643