Skip to content

Fix has_invalid_weak_nodes - #266

Merged
dhood merged 2 commits into
ros2:masterfrom
gbiggs:has_invalid_weak_nodes_fix
Nov 17, 2016
Merged

dhood merged 2 commits into
ros2:masterfrom
gbiggs:has_invalid_weak_nodes_fix

Conversation

@gbiggs

@gbiggs gbiggs commented Nov 2, 2016 •

Copy link
Copy Markdown
Member

Fixes #264/

My copy of the master for ROS 2 doesn't currently compile so I worked against Alpha8. The changes apply cleanly to master, however.

The need to call rclcpp::init() in the tests so that nodes can be created is a bit ugly. I'd welcome suggestions on how to improve that. (Making Node an interface so that mocks can be easily created would be a good approach, but also a significant change to the code base; I'm happy to do that work if there is interest.)

@dirk-thomas dirk-thomas changed the title Fix #264 Fix has_invalid_weak_nodes Nov 2, 2016
@dirk-thomas

Copy link
Copy Markdown
Member

Ticket numbers in the title of PRs don't cross reference. Therefore I updated the title and you comment.

The current nightly builds of all default branches seems stable: http://ci.ros2.org/view/nightly/ Maybe you want to double check your local setup.

An interface for nodes definitely makes sense. @wjwwood is currently working on refactoring rclcpp and will likely do that too.

Regarding calling init: it is simply necessary to call this from a life cycle point of view. There might be various ways to call the function which might be shorter then what you used in this patch, e.g. https://github.com/ros2/system_tests/blob/07aa8fa2bf62ddefebf4c50f9a8c8348a6a860fb/test_rclcpp/test/test_executor.cpp#L227-L229

The patch looks good to me, but I will defer to @wjwwood to merge this.

@dhood

dhood commented Nov 2, 2016

Copy link
Copy Markdown
Member

I kicked off CI with this branch:
Windows: Build Status
Linux: Build Status
OS X: Build Status

@dhood

dhood commented Nov 17, 2016

Copy link
Copy Markdown
Member

thanks for the fix and tests @gbiggs. We were delaying merging this branch while investigating an instability on OS X. It seems to have just been a race condition that has since resolved itself and this can be merged now.

@dhood
dhood merged commit aa2d0a3 into ros2:master Nov 17, 2016
Karsten1987 pushed a commit that referenced this pull request Nov 18, 2016
* Fix #264

* Corrected test comment
Karsten1987 pushed a commit that referenced this pull request Dec 7, 2016
* Fix #264

* Corrected test comment
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
* fix indentation to comply with uncrusity 0.67

* fix spacing to comply with uncrusity 0.67
DensoADAS pushed a commit to DensoADAS/rclcpp that referenced this pull request Aug 5, 2022
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.

3 participants