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 timeout to executor_spin_until_future_complete #301

Merged
merged 4 commits into from
Apr 11, 2019

Conversation

vinnamkim
Copy link
Contributor

Fix #261.

Signed-off-by: vinnamkim vinnam.kim@gmail.com

Signed-off-by: vinnamkim <vinnam.kim@gmail.com>
@tfoote tfoote added the in review Waiting for review (Kanban column) label Apr 1, 2019
Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

Thanks for the addition!

rclpy/rclpy/__init__.py Show resolved Hide resolved
rclpy/rclpy/executors.py Outdated Show resolved Hide resolved
rclpy/rclpy/__init__.py Outdated Show resolved Hide resolved
rclpy/test/test_executor.py Outdated Show resolved Hide resolved
rclpy/test/test_executor.py Outdated Show resolved Hide resolved
rclpy/test/test_executor.py Outdated Show resolved Hide resolved
rclpy/test/test_executor.py Show resolved Hide resolved

def timer_callback():
pass
timer = self.node.create_timer(0.1, timer_callback)
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to create a timer? Is this so that the underlying spin_once will return (ie not timeout) and we can check the future? Seems like the spin_until_future_complete logic could be improved by not making it rely on other callbacks. This type of improvement does not have to happen in this PR since it looks like it has always been this way.

Copy link
Contributor Author

@vinnamkim vinnamkim Apr 4, 2019

Choose a reason for hiding this comment

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

Right, spin_until_future_complete has underlying spin_once needed to return like rclcpp.

Signed-off-by: vinnamkim <vinnam.kim@gmail.com>
@vinnamkim
Copy link
Contributor Author

@jacobperron Thanks for review. updated commit.

@jacobperron
Copy link
Member

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

@jacobperron
Copy link
Member

Wndows: Build Status

@jacobperron
Copy link
Member

@vinnamkim Sorry, a recent merge to master seems to have caused conflicts. For future, a rebase instead of a merge should help avoid this. After the conflict is resolved I'll merge this PR, thanks!

@jacobperron jacobperron merged commit d7bb725 into ros2:master Apr 11, 2019
@jacobperron jacobperron removed the in review Waiting for review (Kanban column) label Apr 11, 2019
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

3 participants