Conversation
|
@clalancette do you think it would be worth using this in the Definitely need to add some tests still. |
7676287 to
95215c1
Compare
|
@clalancette / @tfoote Could one of you please spin up CI for me? I saw there are already tests for static transform publisher, and just refactored the existing one to use the component. Tests pass locally, at least. Let me know what you think! |
For consistency with the code base please license them under BSD-3 clause. Otherwise you end up requiring double due diligence for the package. I have't had a chance to read through it yet, but kicking off CI to see the results. |
@tfoote thanks, found an unfortunate mistake in my use of the logger macros. Fixed now, sorry I failed to notice that previously. |
clalancette
left a comment
There was a problem hiding this comment.
I've got some things that I think need to change here.
|
From here:
My concern with parameters is how that would be done in a system with several of these components. If they all use something like "linear_x" for the name, how does one keep the parameters from getting clobbered by other static transform setups? I'm really not sure how to support the generic component usage. |
The individual nodes would have to be named differently or namespaced differently, which would solve that problem. Even though we don't currently enforce it, you really want to do that anyway, since there is currently no other way to uniquely identify a node. |
So I should probably take the |
Honestly, I'd get rid of the |
Okay, so, to make sure I understand, you want the above but without the leading |
|
@clalancette I have not declared the parameters yet, but I'd like you to take a look at things to make sure we're still on the same page if you have a minute. |
So I do like the The ability to dynamically change the parameters on the fly is neat, but I actually don't think it belongs here. That is, this is the static transform broadcaster, so being able to change it on the fly gives me cognitive dissonance. It also makes it more complicated for an unclear use-case. So I'd suggest not installing the parameter_callback at all, and just declaring the parameters at constructor time. |
Yeah, that's a good point.
As I'm frankly a bit out of the loop here, I'm not quite sure what the "proper" way to do that would be. Is this still |
Personally I would just take your |
Done! Tested and working (at least locally). @tfoote / @clalancette please review and or spin up CI for me (when you are able)! |
clalancette
left a comment
There was a problem hiding this comment.
Got a bunch of comments. They should be mostly easy to fix.
a9fe3d0 to
c50c586
Compare
@clalancette it was being installed into lib, but I wanted to use the component in a different package, which could not find the library. On windows, I could find the Is this an invalid use case for components? If so I can just drop that commit. |
No, sorry, I was just getting confused with the names. Sorry about that. That change is fine. |
|
@clalancette While we're waiting on the branch, I'd like to bring up an observation from using this. I get a warning in the console when I use multiple instances of this component due to the name of the node being duplicated. Should I add a Does this have to do with the |
08b4b7d to
d374687
Compare
|
@clalancette / @tfoote rebased on top of |
|
@clalancette since the eloquent branch is now available and this is rebased on the tip of ros2, is there anything else I should wait for before hitting that squash and merge? Maybe one more round of CI since I'm paranoid (which you'll need to start for me, of couse ;) ). |
d374687 to
6e9908a
Compare
|
@allenh1 Now that we are past freeze, we can reconsider this one. First, do you mind squashing all of this development into a single commit? It's pretty messy to look at (a lot of that is my fault, but we may as well fix it now). Second, I think your point about the name of the node is a really good one. Yes, that is part of what anonymizing the name would buy us. We should think about how to fix it before we merge this, as that will bite people pretty easily. The problem with adding a static counter to the class is that it only helps for this process. If you launch two processes, and they each have a static_transform_publisher in them, they'll still overlap. One way to go about this (without true anonymous name support) is to generate a UUID for the node and suffix that onto the name. See https://github.com/ros2/rclcpp/blob/e494b3efada0258845e41ca866c5baadc8c9a83c/rclcpp_action/src/client.cpp#L370 , where we do something similar for actions. I'll propose we do something similar for now, and we can always update it later to do something smarter if we get true anonymous node support. |
Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
6e9908a to
eee51d8
Compare
It was quite a bit more iteration than I was also anticipating, haha. Squashed. Now we can pretend we just got it right a lot earlier on ;).
That's a valid point.
I also think this is the best approach (at least for the time being). I'll get to that soon. |
Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
…lalancette Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
2f19ba6 to
2e29109
Compare
|
@clalancette could you spin up CI for me please? |
Sure! Here you go: |
@clalancette Hm... Seems something is not quite right. I ran Did I need to run a different test? |
I'm not sure why you are getting a different result than CI. However, I will point out that the tests that failed in CI here also failed on the nightlies: https://ci.ros2.org/view/nightly/job/nightly_linux_debug/1398/#showFailuresLink . So it's not the fault of this PR. At this point, I'm pretty good with this. I'll let it sit until Monday (I'm pretty busy today anyway), but if I don't get other opinions by then I'll merge it. |
🎉 Thanks!
Me either... Just a classic "works on my machine" I suppose. |
* Create a static transform component for composition Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> * Suffix node name with randomly generated alpha-numeric string Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> * Fix windows build Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> * Switch to much more readable and more performant implementation by @clalancette Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> (cherry picked from commit 88cb824)
* Create a static transform component for composition Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> * Suffix node name with randomly generated alpha-numeric string Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> * Fix windows build Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> * Switch to much more readable and more performant implementation by @clalancette Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com> (cherry picked from commit 88cb824)
Adds a static transform publisher component.
This is still in progress, but I'm filing this now for visibility.
@tfoote since these are new files, should I license them as Apache-2.0?