question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor rclpy signal handling

See original GitHub issue

Feature request

Feature description

The idea is to make it look more similar to what rclcpp is doing, and solve https://github.com/ros2/rclpy/issues/360, https://github.com/ros2/rclpy/issues/398.

Implementation considerations

rclpy is just triggering a raise condition in its handler, and chaining with the Python signal handler. In this way, the wait set is awaken, the Python signal handler raises KeywordInterrupt and then the execution finishes. rclcpp is shutting down context from a separated thread, specially used for this. It uses a synchronization mechanism to awake that thread when a signal is handled.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wjwwoodcommented, Aug 2, 2019

I heard that #360 is solved with the new OpenSplice version, can you confirm?

I’m not sure, I was just tasked with doing the upgrade, but I think the new version was supposed change something w.r.t. ctrl-c on Windows.

0reactions
ivanpaunocommented, Sep 6, 2019

Closing, as I don’t see much value of doing this after the OpenSplice problem was solved: https://github.com/ros2/rclpy/issues/360#issuecomment-528944306

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execution and Callbacks — rclpy 0.6.1 documentation
The base class for an executor. An executor controls the threading model used to process callbacks. Callbacks are units of work like subscription...
Read more >
signal — Set handlers for asynchronous events ... - Python Docs
Source code: Lib/signal.py This module provides mechanisms to use signal handlers in Python. General rules: The signal.signal() function allows defining ...
Read more >
Change in rclcpp/rclpy: shutting down gracefully on SIGTERM
A SIGTERM handler is planned to be added to rclcpp/rclpy, implementing the same behavior as the current SIGINT handler.
Read more >
Deadlocks in rclpy and how to prevent them with ... - Karelics
Using callback groups to control execution and avoid deadlocks · subscription callbacks (receiving and handling data from a topic), · timer ...
Read more >
Rclpy - Technical Notes - Confluence
command_line_args = rclpy.utilities.remove_ros_args(args = sys.argv)[ 1 :] ... sig interrupt handling. signal.signal(. signal.SIGINT,.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found