-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Roman Sokolkov <[email protected]>
- Loading branch information
Showing
11 changed files
with
416 additions
and
0 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
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,20 @@ | ||
# rosbag2_py | ||
|
||
## Regenerating Python stub files (.pyi) | ||
|
||
Python stub files allow to supply type-hinting information for binary Python modules (e.g. pybind-based). | ||
|
||
In rosbag2_py stub files are generated with utility called `stubgen`. | ||
|
||
To regenerate stub files | ||
``` | ||
cd <workspace> | ||
colcon build --packages-up-to rosbag2_py | ||
source install/setup.sh | ||
# Make sure rosbag2_py can be imported | ||
python3 -c 'import rosbag2_py' | ||
sudo apt update && sudo apt install mypy=0.942-1ubuntu1 | ||
cd <rosbag2 git repo> | ||
stubgen -p rosbag2_py -o rosbag2_py | ||
``` |
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,7 @@ | ||
from rosbag2_py._compression_options import CompressionMode as CompressionMode, CompressionOptions as CompressionOptions, compression_mode_from_string as compression_mode_from_string, compression_mode_to_string as compression_mode_to_string | ||
from rosbag2_py._info import Info as Info | ||
from rosbag2_py._reader import SequentialCompressionReader as SequentialCompressionReader, SequentialReader as SequentialReader, get_registered_readers as get_registered_readers | ||
from rosbag2_py._reindexer import Reindexer as Reindexer | ||
from rosbag2_py._storage import BagMetadata as BagMetadata, ConverterOptions as ConverterOptions, FileInformation as FileInformation, MessageDefinition as MessageDefinition, MetadataIo as MetadataIo, ReadOrder as ReadOrder, ReadOrderSortBy as ReadOrderSortBy, StorageFilter as StorageFilter, StorageOptions as StorageOptions, TopicInformation as TopicInformation, TopicMetadata as TopicMetadata, get_default_storage_id as get_default_storage_id | ||
from rosbag2_py._transport import PlayOptions as PlayOptions, Player as Player, RecordOptions as RecordOptions, Recorder as Recorder, bag_rewrite as bag_rewrite | ||
from rosbag2_py._writer import SequentialCompressionWriter as SequentialCompressionWriter, SequentialWriter as SequentialWriter, get_registered_compressors as get_registered_compressors, get_registered_serializers as get_registered_serializers, get_registered_writers as get_registered_writers |
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,35 @@ | ||
from typing import ClassVar | ||
|
||
FILE: CompressionMode | ||
MESSAGE: CompressionMode | ||
NONE: CompressionMode | ||
|
||
class CompressionMode: | ||
__doc__: ClassVar[str] = ... # read-only | ||
__members__: ClassVar[dict] = ... # read-only | ||
FILE: ClassVar[CompressionMode] = ... | ||
MESSAGE: ClassVar[CompressionMode] = ... | ||
NONE: ClassVar[CompressionMode] = ... | ||
__entries: ClassVar[dict] = ... | ||
def __init__(self, value: int) -> None: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
|
||
class CompressionOptions: | ||
compression_format: str | ||
compression_mode: CompressionMode | ||
compression_queue_size: int | ||
compression_threads: int | ||
def __init__(self, compression_format: str = ..., compression_mode: CompressionMode = ..., compression_queue_size: int = ..., compression_threads: int = ...) -> None: ... | ||
|
||
def compression_mode_from_string(arg0: str) -> CompressionMode: ... | ||
def compression_mode_to_string(arg0: CompressionMode) -> str: ... |
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,6 @@ | ||
import rosbag2_py._storage | ||
|
||
class Info: | ||
def __init__(self) -> None: ... | ||
def read_metadata(self, arg0: str, arg1: str) -> rosbag2_py._storage.BagMetadata: ... | ||
def read_metadata_and_output_service_verbose(self, arg0: str, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from typing import Any | ||
|
||
class SequentialCompressionReader: | ||
def __init__(self) -> None: ... | ||
def get_all_message_definitions(self, *args, **kwargs) -> Any: ... | ||
def get_all_topics_and_types(self, *args, **kwargs) -> Any: ... | ||
def get_metadata(self, *args, **kwargs) -> Any: ... | ||
def has_next(self) -> bool: ... | ||
def open(self, arg0, arg1) -> None: ... | ||
def open_uri(self, arg0: str) -> None: ... | ||
def read_next(self) -> tuple: ... | ||
def reset_filter(self) -> None: ... | ||
def seek(self, arg0: int) -> None: ... | ||
def set_filter(self, arg0) -> None: ... | ||
def set_read_order(self, arg0) -> bool: ... | ||
|
||
class SequentialReader: | ||
def __init__(self) -> None: ... | ||
def get_all_message_definitions(self, *args, **kwargs) -> Any: ... | ||
def get_all_topics_and_types(self, *args, **kwargs) -> Any: ... | ||
def get_metadata(self, *args, **kwargs) -> Any: ... | ||
def has_next(self) -> bool: ... | ||
def open(self, arg0, arg1) -> None: ... | ||
def open_uri(self, arg0: str) -> None: ... | ||
def read_next(self) -> tuple: ... | ||
def reset_filter(self) -> None: ... | ||
def seek(self, arg0: int) -> None: ... | ||
def set_filter(self, arg0) -> None: ... | ||
def set_read_order(self, arg0) -> bool: ... | ||
|
||
def get_registered_readers() -> Set[str]: ... |
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,5 @@ | ||
import rosbag2_py._storage | ||
|
||
class Reindexer: | ||
def __init__(self) -> None: ... | ||
def reindex(self, arg0: rosbag2_py._storage.StorageOptions) -> 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
from typing import ClassVar, Dict, List | ||
|
||
import datetime | ||
|
||
class BagMetadata: | ||
bag_size: int | ||
compression_format: str | ||
compression_mode: str | ||
custom_data: Dict[str,str] | ||
duration: object | ||
files: List[FileInformation] | ||
message_count: int | ||
relative_file_paths: List[str] | ||
ros_distro: str | ||
starting_time: object | ||
storage_identifier: str | ||
topics_with_message_count: List[TopicInformation] | ||
version: int | ||
def __init__(self, version: int = ..., bag_size: int = ..., storage_identifier: str = ..., relative_file_paths: List[str] = ..., files: List[FileInformation] = ..., duration: object = ..., starting_time: object = ..., message_count: int = ..., topics_with_message_count: List[TopicInformation] = ..., compression_format: str = ..., compression_mode: str = ..., custom_data: Dict[str,str] = ..., ros_distro: str = ...) -> None: ... | ||
|
||
class ConverterOptions: | ||
input_serialization_format: str | ||
output_serialization_format: str | ||
def __init__(self, input_serialization_format: str = ..., output_serialization_format: str = ...) -> None: ... | ||
|
||
class Duration: | ||
def __init__(self, seconds: int, nanoseconds: int) -> None: ... | ||
|
||
class FileInformation: | ||
duration: datetime.timedelta | ||
message_count: int | ||
path: str | ||
starting_time: object | ||
def __init__(self, path: str, starting_time: object, duration: object, message_count: int) -> None: ... | ||
|
||
class MessageDefinition: | ||
encoded_message_definition: str | ||
encoding: str | ||
topic_type: str | ||
type_hash: str | ||
def __init__(self, topic_type: str, encoding: str, encoded_message_definition: str, type_hash: str) -> None: ... | ||
|
||
class MetadataIo: | ||
def __init__(self) -> None: ... | ||
def deserialize_metadata(self, arg0: str) -> BagMetadata: ... | ||
def metadata_file_exists(self, arg0: str) -> bool: ... | ||
def read_metadata(self, arg0: str) -> BagMetadata: ... | ||
def serialize_metadata(self, arg0: BagMetadata) -> str: ... | ||
def write_metadata(self, arg0: str, arg1: BagMetadata) -> None: ... | ||
|
||
class QoS: | ||
def __init__(self, history_depth: int) -> None: ... | ||
def avoid_ros_namespace_conventions(self, arg0: bool) -> QoS: ... | ||
def best_effort(self) -> QoS: ... | ||
def deadline(self, arg0: Duration) -> QoS: ... | ||
def durability(self, arg0: rmw_qos_durability_policy_t) -> QoS: ... | ||
def durability_volatile(self) -> QoS: ... | ||
def history(self, arg0: rmw_qos_history_policy_t) -> QoS: ... | ||
def keep_all(self) -> QoS: ... | ||
def keep_last(self, arg0: int) -> QoS: ... | ||
def lifespan(self, arg0: Duration) -> QoS: ... | ||
def liveliness(self, arg0: rmw_qos_liveliness_policy_t) -> QoS: ... | ||
def liveliness_lease_duration(self, arg0: Duration) -> QoS: ... | ||
def reliability(self, arg0: rmw_qos_reliability_policy_t) -> QoS: ... | ||
def reliable(self) -> QoS: ... | ||
def transient_local(self) -> QoS: ... | ||
|
||
class ReadOrder: | ||
reverse: bool | ||
sort_by: ReadOrderSortBy | ||
def __init__(self, sort_by: ReadOrderSortBy = ..., reverse: bool = ...) -> None: ... | ||
|
||
class ReadOrderSortBy: | ||
__doc__: ClassVar[str] = ... # read-only | ||
__members__: ClassVar[dict] = ... # read-only | ||
File: ClassVar[ReadOrderSortBy] = ... | ||
PublishedTimestamp: ClassVar[ReadOrderSortBy] = ... | ||
ReceivedTimestamp: ClassVar[ReadOrderSortBy] = ... | ||
__entries: ClassVar[dict] = ... | ||
def __init__(self, value: int) -> None: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
|
||
class StorageFilter: | ||
topics: List[str] | ||
topics_regex: str | ||
topics_regex_to_exclude: str | ||
def __init__(self, topics: List[str] = ..., topics_regex: str = ..., topics_regex_to_exclude: str = ...) -> None: ... | ||
|
||
class StorageOptions: | ||
custom_data: Dict[str,str] | ||
end_time_ns: int | ||
max_bagfile_duration: int | ||
max_bagfile_size: int | ||
max_cache_size: int | ||
snapshot_mode: bool | ||
start_time_ns: int | ||
storage_config_uri: str | ||
storage_id: str | ||
storage_preset_profile: str | ||
uri: str | ||
def __init__(self, uri: str, storage_id: str = ..., max_bagfile_size: int = ..., max_bagfile_duration: int = ..., max_cache_size: int = ..., storage_preset_profile: str = ..., storage_config_uri: str = ..., snapshot_mode: bool = ..., start_time_ns: int = ..., end_time_ns: int = ..., custom_data: Dict[str,str] = ...) -> None: ... | ||
|
||
class TopicInformation: | ||
message_count: int | ||
topic_metadata: TopicMetadata | ||
def __init__(self, topic_metadata: TopicMetadata, message_count: int) -> None: ... | ||
|
||
class TopicMetadata: | ||
id: int | ||
name: str | ||
offered_qos_profiles: List[QoS] | ||
serialization_format: str | ||
type: str | ||
type_description_hash: str | ||
def __init__(self, id: int, name: str, type: str, serialization_format: str, offered_qos_profiles: List[QoS] = ..., type_description_hash: str = ...) -> None: ... | ||
def equals(self, arg0: TopicMetadata) -> bool: ... | ||
|
||
class rmw_qos_durability_policy_t: | ||
__doc__: ClassVar[str] = ... # read-only | ||
__members__: ClassVar[dict] = ... # read-only | ||
RMW_QOS_POLICY_DURABILITY_SYSTEM_DEFAULT: ClassVar[rmw_qos_durability_policy_t] = ... | ||
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL: ClassVar[rmw_qos_durability_policy_t] = ... | ||
RMW_QOS_POLICY_DURABILITY_UNKNOWN: ClassVar[rmw_qos_durability_policy_t] = ... | ||
RMW_QOS_POLICY_DURABILITY_VOLATILE: ClassVar[rmw_qos_durability_policy_t] = ... | ||
__entries: ClassVar[dict] = ... | ||
def __init__(self, value: int) -> None: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
|
||
class rmw_qos_history_policy_t: | ||
__doc__: ClassVar[str] = ... # read-only | ||
__members__: ClassVar[dict] = ... # read-only | ||
RMW_QOS_POLICY_HISTORY_KEEP_ALL: ClassVar[rmw_qos_history_policy_t] = ... | ||
RMW_QOS_POLICY_HISTORY_KEEP_LAST: ClassVar[rmw_qos_history_policy_t] = ... | ||
RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT: ClassVar[rmw_qos_history_policy_t] = ... | ||
RMW_QOS_POLICY_HISTORY_UNKNOWN: ClassVar[rmw_qos_history_policy_t] = ... | ||
__entries: ClassVar[dict] = ... | ||
def __init__(self, value: int) -> None: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
|
||
class rmw_qos_liveliness_policy_t: | ||
__doc__: ClassVar[str] = ... # read-only | ||
__members__: ClassVar[dict] = ... # read-only | ||
RMW_QOS_POLICY_LIVELINESS_AUTOMATIC: ClassVar[rmw_qos_liveliness_policy_t] = ... | ||
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC: ClassVar[rmw_qos_liveliness_policy_t] = ... | ||
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT: ClassVar[rmw_qos_liveliness_policy_t] = ... | ||
RMW_QOS_POLICY_LIVELINESS_UNKNOWN: ClassVar[rmw_qos_liveliness_policy_t] = ... | ||
__entries: ClassVar[dict] = ... | ||
def __init__(self, value: int) -> None: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
|
||
class rmw_qos_reliability_policy_t: | ||
__doc__: ClassVar[str] = ... # read-only | ||
__members__: ClassVar[dict] = ... # read-only | ||
RMW_QOS_POLICY_RELIABILITY_BEST_EFFORT: ClassVar[rmw_qos_reliability_policy_t] = ... | ||
RMW_QOS_POLICY_RELIABILITY_RELIABLE: ClassVar[rmw_qos_reliability_policy_t] = ... | ||
RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT: ClassVar[rmw_qos_reliability_policy_t] = ... | ||
RMW_QOS_POLICY_RELIABILITY_UNKNOWN: ClassVar[rmw_qos_reliability_policy_t] = ... | ||
__entries: ClassVar[dict] = ... | ||
def __init__(self, value: int) -> None: ... | ||
def __eq__(self, other: object) -> bool: ... | ||
def __getstate__(self) -> int: ... | ||
def __hash__(self) -> int: ... | ||
def __index__(self) -> int: ... | ||
def __int__(self) -> int: ... | ||
def __ne__(self, other: object) -> bool: ... | ||
def __setstate__(self, state: int) -> None: ... | ||
@property | ||
def name(self) -> str: ... | ||
@property | ||
def value(self) -> int: ... | ||
|
||
def get_default_storage_id() -> str: ... |
Oops, something went wrong.