-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gracefully handle SIGINT and SIGTERM signals for play and burst CLI (#…
…1557) * Gracefully handle SIGINT and SIGTERM signals for play and burst CLI - Intercept signals to call Player::stop() instead of relying on the rclcpp::shutdown() in default signal handlers. - Also added static Player::Cancel() method. Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add test_play_cancel to the test_transport.py Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add missing imports in test_transport.py Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Regenerate Python stub files (.pyi) after altering API Signed-off-by: Michael Orlov <michael.orlov@apex.ai> * Add call for original deferred signal handler for Player and Recorder Signed-off-by: Michael Orlov <michael.orlov@apex.ai> --------- Signed-off-by: Michael Orlov <michael.orlov@apex.ai> (cherry picked from commit 32bd5c3) # Conflicts: # rosbag2_py/rosbag2_py/_transport.pyi # rosbag2_py/src/rosbag2_py/_transport.cpp # rosbag2_py/test/test_transport.py # rosbag2_transport/src/rosbag2_transport/player.cpp
- Loading branch information
1 parent
a79568a
commit 5ff8f94
Showing
4 changed files
with
329 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
from typing import Any, List | ||
|
||
import datetime | ||
import rosbag2_py._storage | ||
|
||
class PlayOptions: | ||
clock_publish_frequency: float | ||
clock_publish_on_topic_publish: bool | ||
clock_topics: List[str] | ||
delay: float | ||
disable_keyboard_controls: bool | ||
disable_loan_message: bool | ||
loop: bool | ||
node_prefix: str | ||
playback_duration: float | ||
playback_until_timestamp: int | ||
rate: float | ||
read_ahead_queue_size: int | ||
start_offset: float | ||
start_paused: bool | ||
topic_qos_profile_overrides: dict | ||
topic_remapping_options: List[str] | ||
topics_regex_to_exclude: str | ||
topics_regex_to_filter: str | ||
topics_to_filter: List[str] | ||
wait_acked_timeout: int | ||
def __init__(self) -> None: ... | ||
|
||
class Player: | ||
def __init__(self) -> None: ... | ||
def burst(self, storage_options: rosbag2_py._storage.StorageOptions, play_options: PlayOptions, num_messages: int) -> None: ... | ||
def cancel(self, *args, **kwargs) -> Any: ... | ||
def play(self, storage_options: rosbag2_py._storage.StorageOptions, play_options: PlayOptions) -> None: ... | ||
|
||
class RecordOptions: | ||
all_services: bool | ||
all_topics: bool | ||
compression_format: str | ||
compression_mode: str | ||
compression_queue_size: int | ||
compression_threads: int | ||
exclude_regex: str | ||
exclude_service_events: List[str] | ||
exclude_topic_types: List[str] | ||
exclude_topics: List[str] | ||
ignore_leaf_topics: bool | ||
include_hidden_topics: bool | ||
include_unpublished_topics: bool | ||
is_discovery_disabled: bool | ||
node_prefix: str | ||
regex: str | ||
rmw_serialization_format: str | ||
services: List[str] | ||
start_paused: bool | ||
topic_polling_interval: datetime.timedelta | ||
topic_qos_profile_overrides: dict | ||
topic_types: List[str] | ||
topics: List[str] | ||
use_sim_time: bool | ||
def __init__(self) -> None: ... | ||
|
||
class Recorder: | ||
def __init__(self) -> None: ... | ||
def cancel(self, *args, **kwargs) -> Any: ... | ||
def record(self, storage_options: rosbag2_py._storage.StorageOptions, record_options: RecordOptions, node_name: str = ...) -> None: ... | ||
|
||
def bag_rewrite(arg0: List[rosbag2_py._storage.StorageOptions], arg1: str) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.