IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.5k stars 1.74k forks source link

Plans to make realsense-ros node a lifecycle node? [ROS2] #1838

Open anaelle-sw opened 3 years ago

anaelle-sw commented 3 years ago

Hello,

in our use case, we regularly plug / un-plug cameras (D435) to our system. We need to adapt the number of realsense-ros nodes running according to the current number of embedded cameras, at runtime without re-launching our whole ROS application.

Previously, with ROS1, we used to simply kill / launch the realsense-ros nodes with system calls.

ROS2 offers the possibility to use LifecycleNodes (ROS2 design documentation here and a demo here). We would be super interested in using realsense-ros nodes as lifecycle nodes, especially for two reasons:

(By "activate / deactivate / configure / unconfigure" I am directly referring to the lifecycle node's states transitions (see doc link above), and by "easily", I mean that these transitions can be triggered by an external node of our own, which would be able to ask the lifecycle realsense-ros node to change from a state to another)

Well my question is: are you considering to make realsense-ros a ROS2 lifecycle node? If so, any idea of the time it will take until it would be implemented? If this is not part of your plans for now, would you still accept a pull request to implement this? Even if, obviously, there would be a lot of discussions to have about the design of it, before implementing anything. I am just asking to know if lifecycle nodes are something you could consider at some point, or if there is just no room for lifecycle nodes in realsense-ros development.

Thank you!

MartyG-RealSense commented 3 years ago

Hi @anaelle-sw Thanks very much for your question! Support for lifecycle nodes in the RealSense ROS2 wrapper is a feature that has previously been suggested by a RealSense ROS community member in the link below.

https://github.com/IntelRealSense/librealsense/issues/5825#issuecomment-669345438

In regard to whether lifecycle node support is part of official future plans for the RO2 wrapper or whether a PR would be the preferable option, I will refer that question to @doronhi the RealSense ROS wrapper developer.

doronhi commented 3 years ago

Hi @anaelle-sw Making realsense2_camera a lifecycle node is indeed in our intentions. It is currently planned for the last quarter of 2021 but currently not prioritized very high. Your indication that this feature is useful may boost it up. As you say, it requires a design change. Any discussion and requirements description is very much appreciated.

anaelle-sw commented 3 years ago

Hi, thanks to both of you for your answers!

Any discussion and requirements description is very much appreciated.

Well for the moment, the three main features that we would appreciate with lifecycle nodes are:

doronhi commented 3 years ago

Hi, Thank you for your comments and requirement description. In the current version, if you start the node with the camera detached, the node just hangs there. When the camera is attached it is automatically detected, configured, and started. When the camera disconnects the node stays there, waiting for the camera to reconnect. Is that the behavior you wish to keep under the life-cycle structure?

anaelle-sw commented 3 years ago

Hello,

Is that the behavior you wish to keep under the life-cycle structure?

Well, almost yes, but at with two main differences I think:

Hope this can help, let me know if you need more details. Thanks for support!

doronhi commented 3 years ago

As said, there is still some time before work will begin. For now, I internally logged your remarks under DSO-17089. Thanks for the input.

MartyG-RealSense commented 3 years ago

Hi @anaelle-sw As lifecycle node plans for the ROS wrapper are set for some time in the future and your feedback has been logged by @doronhi - is it okay to close this case please? Thanks!

anaelle-sw commented 3 years ago

Hello, yes sure, thanks for support

MartyG-RealSense commented 3 years ago

You are very welcome @anaelle-sw - thanks very much for the update!

doisyg commented 2 years ago

Hello, Any update on this issue ? Is it still planned for the end of the year ?

imstevenpmwyca commented 2 years ago

Hello @doronhi, Is there any update regarding this lifecycle functionality? Would you share with us its current state or road-plan? Thank you very much and kind regards!

SamerKhshiboun commented 1 year ago

Hi @anaelle-sw, @imstevenpmwyca, My name is Samer, and I am a developer in the RealSense SW Team. As I got to this very interesting issue, I started to investigate the Lifecycle concept in ROS2 and estimating the effort we need to do these changes. I will update asap. Thank you.

alonsnir commented 1 year ago

Any progress on this one?

SamerKhshiboun commented 1 year ago

Hi @alonsnir , Sorry for delayed update, but the lifecycle is one of our major features that is planned to be completed by end of year. Implementation should start by end of Q3 and finish by end of Q4.

nwn-cpr commented 7 months ago

Hi @SamerKhshiboun, is there any update on the timeline for this feature?

quantumxt commented 2 months ago

Hi @SamerKhshiboun,

We are interested in utilizing the realsense-ros nodes as ROS2 Lifecycle Nodes to accommodate the dynamic addition and removal of Realsense cameras within our system at runtime. Previously, it was projected to be completed by Q4 2023 (https://github.com/IntelRealSense/realsense-ros/issues/1838#issuecomment-1646757580).

Hi @alonsnir , Sorry for delayed update, but the lifecycle is one of our major features that is planned to be completed by end of year. Implementation should start by end of Q3 and finish by end of Q4.

However, there have been no updates since July 2023.

Given this context, could you please provide an update on the status of this feature?

Thank you.

SamerKhshiboun commented 2 months ago

++ @Nir-Az @Arun-Prasad-V

Hi @quantumxt This feature was planned for Q4 2023, but unfortunately was postponed due to other high priority projects. We will have an internal developers sync on this feature next week, after it I can hopefully give you an update on the status and on the deadlines.

There are multiple questions that we need to answer:

@quantumxt if you are already familiar with Lifecycle Nodes and are using other packages which support it, your inputs are more than welcome.

quantumxt commented 2 months ago

Hi @SamerKhshiboun,

The use of Lifecycle Nodes is currently being explored, and we are still learning how to best utilize it. Below are some proposed implementation approaches for consideration:

These are some of our preliminary ideas, hope it would help.

quantumxt commented 1 month ago

Hi @SamerKhshiboun, is there any update on the status of this feature?