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

Add a tutorial on Lifecycle nodes #4924

Open
1 of 2 tasks
Yadunund opened this issue Jan 6, 2025 · 14 comments
Open
1 of 2 tasks

Add a tutorial on Lifecycle nodes #4924

Yadunund opened this issue Jan 6, 2025 · 14 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Yadunund
Copy link
Member

Yadunund commented Jan 6, 2025

Extend the Intermediate tutorials with a chapter on implementing Lifecycle nodes and designing APIs using NodeInterfaces such that the APIs work with both regular Nodes and LifecycleNodes.

@Yadunund Yadunund added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 6, 2025
@kscottz
Copy link
Collaborator

kscottz commented Jan 7, 2025

Just for clarity here, you are asking for an example node that implements both the standard node interface and the lifecycle node interface.

Roughly this means that the standard node interface performs the primary state's / transitions when it is instantiated as a standard node? If this is the case, it might be helpful to have a paster template that people can re-use as a starting point.

Do you have a good example of NodeInterfaces being used with a lifecycle node out in the wild? Even tests might be helpful here.

@Yadunund
Copy link
Member Author

Yadunund commented Jan 9, 2025

I was alluding to following the pattern described by @methylDragon in his lightning talk.

This would encourage more users to use LifecycleNodes while keeping other APIs compatible with both Node and LifecycleNode.

@kscottz
Copy link
Collaborator

kscottz commented Jan 9, 2025

Perfect. Thanks. I can work with this! I may even be able to find a new contributor to do it.

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-news-for-the-week-of-january-13th-2024/41608/1

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/ros-news-for-the-week-of-january-20th-2025/41719/1

@NickTziaros
Copy link
Contributor

I may even be able to find a new contributor to do it.

Is there a way I can be of assistance? Im not an expert by any means but i would like to get my hands dirty with this one.

@kscottz
Copy link
Collaborator

kscottz commented Jan 27, 2025

@NickTziaros by all means! Give it a shot.

Make sure to take a look at the docs readme and the contributing guide. Make sure to put your editor into whitespace mode as the linter is really particular.

@kscottz
Copy link
Collaborator

kscottz commented Feb 11, 2025

Thanks for the help @NickTziaros.

@Yadunund
Copy link
Member Author

So we're still missing a tutorial on implementing lifecycle nodes, their various on_* methods, transitioning states via cli commands & launch actions. @NickTziaros's addition can be extended to include these topics. Should we keep this ticket open or open a separate one?

@fujitatomoya fujitatomoya reopened this Feb 12, 2025
@fujitatomoya
Copy link
Collaborator

@Yadunund good eye, let's reopen this.

@Yadunund
Copy link
Member Author

I've updated the description accordingly 👍🏼

@kscottz
Copy link
Collaborator

kscottz commented Feb 12, 2025

Good catch @Yadunund. Sorry about that.

On the other hand we really need to work towards smaller, faster pull requests and this fits that pattern.

@NickTziaros
Copy link
Contributor

So we're still missing a tutorial on implementing lifecycle nodes, their various on_* methods, transitioning states via cli commands & launch actions

I might as well make this one too :D

@NickTziaros
Copy link
Contributor

I made a PR #5038, adding

+Output:
+ 

above

[INFO] [Simple_Node]: Node name: Simple_Node 
[INFO] [Simple_LifeCycle_Node]: Node name: Simple_LifeCycle_Node

for consistency. Somehow I missed it the first time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants