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

Replace node constructor arguments with NodeOptions #622

Merged
merged 12 commits into from
Feb 6, 2019

Conversation

mjcarroll
Copy link
Member

@mjcarroll mjcarroll commented Jan 29, 2019

Creates a NodeOptions object to pass all of the necessary options to the node constructor.

Connects to #492

mjcarroll and others added 4 commits January 29, 2019 11:54
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll mjcarroll added the in progress Actively being worked on (Kanban column) label Jan 29, 2019
@mjcarroll mjcarroll self-assigned this Jan 29, 2019
Signed-off-by: Michael Carroll <michael@openrobotics.org>
rclcpp/include/rclcpp/node.hpp Outdated Show resolved Hide resolved
rclcpp/include/rclcpp/node_options.hpp Outdated Show resolved Hide resolved
rclcpp/include/rclcpp/node_options.hpp Outdated Show resolved Hide resolved
rclcpp/include/rclcpp/node_options.hpp Outdated Show resolved Hide resolved
rclcpp/src/rclcpp/node_options.cpp Outdated Show resolved Hide resolved
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll
Copy link
Member Author

CI (up to rclcpp)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mjcarroll
Copy link
Member Author

Windows failures are likely due to missing symbol visibility.

Signed-off-by: William Woodall <william@osrfoundation.org>
@wjwwood wjwwood self-assigned this Feb 5, 2019
@wjwwood wjwwood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Feb 5, 2019
@mjcarroll
Copy link
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mjcarroll
Copy link
Member Author

Added missing lifecycle fixes:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments here only, ros2/rcl#379 looks fine.

rclcpp/include/rclcpp/node_options.hpp Outdated Show resolved Hide resolved
rclcpp/include/rclcpp/node_options.hpp Show resolved Hide resolved
rclcpp/src/rclcpp/node_options.cpp Show resolved Hide resolved
rclcpp/src/rclcpp/node_options.cpp Show resolved Hide resolved
rclcpp/include/rclcpp/node_options.hpp Show resolved Hide resolved
hidmic and others added 2 commits February 5, 2019 10:54
Co-Authored-By: wjwwood <william+github@osrfoundation.org>

Signed-off-by: William Woodall <william@osrfoundation.org>
Signed-off-by: William Woodall <william@osrfoundation.org>
@wjwwood
Copy link
Member

wjwwood commented Feb 5, 2019

I had to force-push to address the DCO issue.

Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending get_env TODO and green CI!

Signed-off-by: William Woodall <william@osrfoundation.org>
@wjwwood
Copy link
Member

wjwwood commented Feb 5, 2019

OK, I added a todo and @mjcarroll and I tested it locally, so here's full CI, hopefully it's green:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@wjwwood wjwwood merged commit 0f9098e into master Feb 6, 2019
@wjwwood wjwwood deleted the node_arguments_constructor branch February 6, 2019 07:10
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Feb 6, 2019
@wjwwood
Copy link
Member

wjwwood commented Feb 6, 2019

@mjcarroll do you think it would be possible to make this change tick/tock? I guess we could have left the existing constructors and deprecated them?

A separate question is whether or not it is worth doing that? @nuclearsandwich do you have an opinion on whether or not we should try to do that retroactively?


Either way we need an entry in the change summary page for dashing:

https://index.ros.org/doc/ros2/Releases/Release-Dashing-Diademata/#id4

@nuclearsandwich
Copy link
Member

@nuclearsandwich do you have an opinion on whether or not we should try to do that retroactively?

I'm slightly confused about the tick and tock. Would the tick deprecating the old constructors be Dashing and then they'd be removed from E-turtle? From offline conversation yesterday I think this new API is required for a lot of things we want to introduce. Does maintaining the old constructors interfere with that? APIs that land in Dashing will be with us until May 2021 whether they be deprecated or not. I think that as long as we update the change guide now that this has merged we will be giving people plenty of time to respond to it and make the necessary updates.

@wjwwood
Copy link
Member

wjwwood commented Feb 6, 2019

I'm slightly confused about the tick and tock. Would the tick deprecating the old constructors be Dashing and then they'd be removed from E-turtle?

Exactly.

From offline conversation yesterday I think this new API is required for a lot of things we want to introduce. Does maintaining the old constructors interfere with that? APIs that land in Dashing will be with us until May 2021 whether they be deprecated or not.

It wouldn't affect those, as we'd only add new options to the NodeOptions struct and not the constructor. So the existing constructor could be used for some existing options, but would be deprecated and new options would only be available via the new NodeOptions constructor.

I think that as long as we update the change guide now that this has merged we will be giving people plenty of time to respond to it and make the necessary updates.

That was my original thinking, but I just wanted to leave the door open if that wasn't ok with everyone.

@nuclearsandwich
Copy link
Member

That was my original thinking, but I just wanted to leave the door open if that wasn't ok with everyone.

It's okay with me at least 👍 please do link the ros2_documentation PR when it's up.

@dirk-thomas
Copy link
Member

Merging this PR while the corresponding rcl PR ros2/rcl#379 hasn't been merged breaks master: https://ci.ros2.org/job/ci_linux/6132/

@wjwwood
Copy link
Member

wjwwood commented Feb 6, 2019

I merged the outstanding pr, that's my fault. I opened all connected prs in waffle, but either that one didn't show in waffle or I misclicked. Should be fixed now.

@mjcarroll
Copy link
Member Author

It was actually my fault, I connected the rcl issue to this pull request and not the other issue. Sorry about that.

@wjwwood
Copy link
Member

wjwwood commented Feb 6, 2019

No worries, I shouldn't 🙈 trust waffle :)

cho3 pushed a commit to cho3/rclcpp that referenced this pull request Jun 3, 2019
* Start work on creaating NodeOptions structure.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Continue work on NodeOptions.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update tests for NodeOptions impl.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update documentation and copy/assignment.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update rclcpp_lifecycle to conform to new API.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Use builder pattern with NodeOptions.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Documentation updates.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* Update rclcpp_lifecycle to use NodeOptions.

Signed-off-by: Michael Carroll <michael@openrobotics.org>

* change to parameter idiom only, from builder pattern

Signed-off-by: William Woodall <william@osrfoundation.org>

* Update rclcpp/include/rclcpp/node_options.hpp

Co-Authored-By: wjwwood <william+github@osrfoundation.org>

Signed-off-by: William Woodall <william@osrfoundation.org>

* follow up with more resets of the rcl_node_options_t

Signed-off-by: William Woodall <william@osrfoundation.org>

* todo about get env

Signed-off-by: William Woodall <william@osrfoundation.org>
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
* Added documentation to rcl_lifecycle

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Adding more documentation to rcl_lifecycle

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Update rcl_lifecycle/include/rcl_lifecycle/default_state_machine.h

Co-Authored-By: Jorge Perez <jjperez@ekumenlabs.com>

Update rcl_lifecycle/include/rcl_lifecycle/default_state_machine.h

Co-Authored-By: Jorge Perez <jjperez@ekumenlabs.com>

Update rcl_lifecycle/include/rcl_lifecycle/transition_map.h

Co-Authored-By: Jorge Perez <jjperez@ekumenlabs.com>

Update rcl_lifecycle/include/rcl_lifecycle/rcl_lifecycle.h

Co-Authored-By: Jorge Perez <jjperez@ekumenlabs.com>

Update rcl_lifecycle/include/rcl_lifecycle/transition_map.h

Co-Authored-By: Jorge Perez <jjperez@ekumenlabs.com>
Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added feedback

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Added more feedback

Signed-off-by: ahcorde <ahcorde@gmail.com>

* Fixed uncrustify

Signed-off-by: ahcorde <ahcorde@gmail.com>

Co-authored-by: Jorge Perez <jjperez@ekumenlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants