Conversation
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
|
also, ros2's composite nodes are more or less equivalent to ros1's nodelets: https://docs.ros.org/en/humble/Concepts/Intermediate/About-Composition.html#ros-1-nodes-vs-nodelets would you want me to introduce composite nodes for all the different node types as well, to allow consumers the option to use the composite nodes to avoid IPC? |
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
|
Thanks for the proposal. I think this package should only implement composable nodes in code. They can be quite easily turned into standalone nodes in CMake: So that should simplify the implementation quite a lot (no more need for shared custom spinning code etc.). I'm also thinking if it would be possible to simplify the generic filters by using a template that would generate the .cpp file during build phase (of course not for images/pointclouds which need the extra stuff around transports). That would shrink the number of files in this repo quite a lot (I'm just not sure if there's a possible rebuild-time penalty - whether CMake is clever enough to figure out the generated files did not change). I also foresee a possible feature that could influence the design even at this stage: lifecycle nodes. As lifecycle support will be added to image_transport in Lyrical, it is something that so far only lives on the Rolling release: ros-perception/image_common#352 . But I think it would make sense to also provide these filters as lifecycle nodes. I'm just not sure about the transport-based ones on older distros where there's no support for lifecycle nodes. We will probably not be able to provide them on older distros, which means some In general, I'd like to keep this repo as a single Our repos in general support only Jazzy and newer, but I don't mind having Humble supported here as long as you can test it and it doesn't bring too much pain to the code (in general, I consider Humble as an alpha release of ROS 2, with Jazzy becoming close to a good beta). Regarding ros2_fmt_logger, I understand it is easier to use, but with the "amount" of logging in this package, I don't think it's worth it. It is a non-core package and as such it has unclear support/changes policy. I'd like to stay with the standard logging interface here. |
yeah, that's what I was thinking if you wanted composable nodes. I just did the very straightforward way first, but changing to composable nodes is quite easy
not sure how I'd do that as I'm not familiar with cmake, however it shouldn't be too difficult afaik.
lifecycle nodes might be able to be introduced for everything except point cloud 2 & image, and then only have those two as normal nodes. I don't think that would be too difficult.
afaik the way you'd do this with ros2 is by adding smth in the cmake to expose because from what I can tell, ros2 has no equivalent to ros1's
I'm targetting humble because my primary usecase uses humble (nvidia jetson orin nano, and nvidia currently only supports hunble/ubuntu 22.04 for it, sigh. I want to move to jazzy so badly)
the author has been rather responsive with me for support/changes. but if you don't want it then I won't add it, as it's not by any means critical. |
|
actually, it seems like there is
unsure if this exists in humble, however some people are saying it does, so I'll give that a try. though the way the version increments for rclcpp is a little odd. so the major version is not necessarily tied 1-to-1 with the ros distro. but it can be used to approximate it, I guess? |
Yes, this is a bit PITA. I've ended up with CMake feature tests as the most reliable way: ctu-vras/compass@86e8b40 . |
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
I'm leaving them there for now in case for some reason something comes up in the future where someone can't use a composable node for whatever reason Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
|
updated the description with a checklist for tracking the remaining things that need to be done |
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
|
Thanks for moving this forward. I've added CI to test building on all platforms and distros. I've also updated package.xml for ROS 2 (I haven't known that ament is happy to build a package with invalid package.xml). Please update your working copy. I can definitely help with the CMakeLists.txt cleanup (once the implementation is stabilized) and possibly also writing some simple tests to check whether the filter chains work properly. |
A little bit more detail on this. ROS core packages follow the semantic versioning paradigm, so they increase major version every time there is a backward incompatible change. This cannot, of course, happen on released distros, but it does happen on rolling. And apparently, the changes in rolling can be released so often that there are multiple major version bumps between a new stable ROS is branched off. To make your life more difficult, features from rolling get backports to older distros if possible, so you can't say simply "this feature is available in humble+". You'd have to explicitly list the particular version from which the feature was available on all released distros (up to the next stable distro to be released). This gets quite complicated because sometimes the stuff in changelogs of the core packages differs a bit from what was released (e.g. some versions in changelog were never released on buildfarm, but somebody can theoretically have them built from source). I've tried to open a discussion about making the detection of these features easier, but nobody seemed to be interested in discussing it: https://discourse.openrobotics.org/t/should-feature-adding-deprecating-changes-to-core-repos-define-feature-flags/52119 . If you find the proposal reasonable, feel free to add a comment, I'd be glad for it.
If you want Jazzy so badly, it's just a
Look at the CI :) Especially in the filters realm, the changes were quite wild.
Please, let's do this without the fmt logger. |
hmmm I was planning to do that but had read somewhere that it's not a good idea to do so never did it. but if it's worked fine for you, then I'll try to push that through sometime soon. though it might be a month or so before my robotics team has sufficient downtime to be able to do that, so for now I'll continue to target humble. |
The current implementation offers both a lifecycle node, as well as a non-lifecycle node. The reason for doing this, is because the lifecycle node requires additional code to start it. So, a non-lifecycle node is offered for simplicity. Lifecycle nodes are currently not offered for the image & pointcloud2 filter types. Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
|
@peci1 I've completed all the things I had on the checklist except for:
for the tests, what have you done to test it manually in the past? |
|
also, CI builds successfully on all distros without the need for any for lifecycle nodes, I've introduced a second node type, so there's both the normal node (e.g. |
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
…rectly converting time Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
added boost as a build dependency. though it's already a transitive dep. Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
|
Great, these are all good changes! Do you want to finish the lifecycle stuff as a part of this PR, or do you want to do it later? |
I don't think I did anything rigorous. I just set up a publisher, a filter and looked at its output in console, I guess. |
alright, in that case I'll probably just do something similar. the port is basically complete at this point, and there's only a few minor things left, really. so, I'll try to get to those, and then it should be ready for merging |
closes #5
CMakeLists.txtthis is some initial work on the ros2 port for sensor_filters
I'm currently targeting humble, however this will likely work perfectly fine on jazzy & kilted without any changes, however I have not tested either of those.
this has not been tested at all and likely still needs some work (namely the
CMakeLists.txt&ChangeHeaderFilter), as well as a few other places.however, it does compile.
I'd like to move the logging over to using ros2_fmt_logger (ros index), thoughts on that? I honestly much prefer it to what ros does with rclcpp.
I've also reformatted the code using a code style that I prefer as well as renamed .h -> .hpp & .cc -> .cpp, however both of those are their own commits so they can always be cherry picked/dropped.