%global _empty_manifest_terminate_build 0 Name: python-osef Version: 2.8.0 Release: 1 Summary: Osef file/stream tools. License: MIT License URL: https://pypi.org/project/osef/ Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9d/cb/438dbc196f73e79a25971c26557da4ae704e24667f63e79383599b2af0d5/osef-2.8.0.tar.gz BuildArch: noarch Requires: python3-numpy %description # OSEF library Library containing utilities to read and parse a stream, live or recorded, retrieved from an **ALB** (**A**ugmented **L**iDAR **B**ox). The stream is in the **OSEF** format (**O**pen **SE**rialization **F**ormat): it's an Outsight-defined serialisation binary format used to encode data streaming out of the ALB. It is based on *TLV-encoding*. For the full documentation, contact us @ https://support.outsight.ai ## Installation Install from PyPi using pip: ```bash pip install osef ``` ## Usage Open and parse an osef file or stream: ```python import osef osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): tracked_objects = osef.osef_frame.TrackedObjects(frame_dict) ``` By default, the parser processes the recorded data as quickly as your computer allows it, so potentially faster than in real conditions. To process recorded data at the same pace as real time OSEF stream coming from an ALB, set the parameter real_frequency = True ```python frame_iterator = osef.parse(osef_path, True) ``` or ```python import osef osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" with osef.parser.OsefStream(osef_path) as osef_stream: tlv_iterator = osef.parser.get_tlv_iterator(osef_stream) for index, tlv in tlv_iterator: tree = osef.parser.build_tree(tlv) frame_dict = osef.parser.parse_to_dict(tree) tracked_objects = osef.osef_frame.TrackedObjects(frame_dict) ``` To find more code samples, see Outsight Code Samples repository: https://gitlab.com/outsight-public/outsight-code-samples/-/tree/master ### Frame helper In order to simplify data access in a scan frame, helper classes have been added to the library: ```python import osef from osef import osef_frame osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): # Frame data frame = osef_frame.OsefFrame(frame_dict) timestamp = frame.timestamp # Cloud data augmented_cloud = osef_frame.AugmentedCloud(frame_dict) coordinates = augmented_cloud.cartesian_coordinates reflectivities = augmented_cloud.reflectivities # Tracking data tracking_objects = osef_frame.TrackedObjects(frame_dict) poses = tracking_objects.poses bounding_boxes = tracking_objects.bounding_boxes ``` > 📝 All public types have a helper property For types that do not have a property, it is possible to access them like this: ```python import osef from osef import osef_frame, osef_types osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): # Tracking data tracking_objects = osef_frame.TrackedObjects(frame_dict) class_id_array = tracking_objects[osef_types.OsefKeys.CLASS_ID_ARRAY.value] ``` %package -n python3-osef Summary: Osef file/stream tools. Provides: python-osef BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-osef # OSEF library Library containing utilities to read and parse a stream, live or recorded, retrieved from an **ALB** (**A**ugmented **L**iDAR **B**ox). The stream is in the **OSEF** format (**O**pen **SE**rialization **F**ormat): it's an Outsight-defined serialisation binary format used to encode data streaming out of the ALB. It is based on *TLV-encoding*. For the full documentation, contact us @ https://support.outsight.ai ## Installation Install from PyPi using pip: ```bash pip install osef ``` ## Usage Open and parse an osef file or stream: ```python import osef osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): tracked_objects = osef.osef_frame.TrackedObjects(frame_dict) ``` By default, the parser processes the recorded data as quickly as your computer allows it, so potentially faster than in real conditions. To process recorded data at the same pace as real time OSEF stream coming from an ALB, set the parameter real_frequency = True ```python frame_iterator = osef.parse(osef_path, True) ``` or ```python import osef osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" with osef.parser.OsefStream(osef_path) as osef_stream: tlv_iterator = osef.parser.get_tlv_iterator(osef_stream) for index, tlv in tlv_iterator: tree = osef.parser.build_tree(tlv) frame_dict = osef.parser.parse_to_dict(tree) tracked_objects = osef.osef_frame.TrackedObjects(frame_dict) ``` To find more code samples, see Outsight Code Samples repository: https://gitlab.com/outsight-public/outsight-code-samples/-/tree/master ### Frame helper In order to simplify data access in a scan frame, helper classes have been added to the library: ```python import osef from osef import osef_frame osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): # Frame data frame = osef_frame.OsefFrame(frame_dict) timestamp = frame.timestamp # Cloud data augmented_cloud = osef_frame.AugmentedCloud(frame_dict) coordinates = augmented_cloud.cartesian_coordinates reflectivities = augmented_cloud.reflectivities # Tracking data tracking_objects = osef_frame.TrackedObjects(frame_dict) poses = tracking_objects.poses bounding_boxes = tracking_objects.bounding_boxes ``` > 📝 All public types have a helper property For types that do not have a property, it is possible to access them like this: ```python import osef from osef import osef_frame, osef_types osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): # Tracking data tracking_objects = osef_frame.TrackedObjects(frame_dict) class_id_array = tracking_objects[osef_types.OsefKeys.CLASS_ID_ARRAY.value] ``` %package help Summary: Development documents and examples for osef Provides: python3-osef-doc %description help # OSEF library Library containing utilities to read and parse a stream, live or recorded, retrieved from an **ALB** (**A**ugmented **L**iDAR **B**ox). The stream is in the **OSEF** format (**O**pen **SE**rialization **F**ormat): it's an Outsight-defined serialisation binary format used to encode data streaming out of the ALB. It is based on *TLV-encoding*. For the full documentation, contact us @ https://support.outsight.ai ## Installation Install from PyPi using pip: ```bash pip install osef ``` ## Usage Open and parse an osef file or stream: ```python import osef osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): tracked_objects = osef.osef_frame.TrackedObjects(frame_dict) ``` By default, the parser processes the recorded data as quickly as your computer allows it, so potentially faster than in real conditions. To process recorded data at the same pace as real time OSEF stream coming from an ALB, set the parameter real_frequency = True ```python frame_iterator = osef.parse(osef_path, True) ``` or ```python import osef osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" with osef.parser.OsefStream(osef_path) as osef_stream: tlv_iterator = osef.parser.get_tlv_iterator(osef_stream) for index, tlv in tlv_iterator: tree = osef.parser.build_tree(tlv) frame_dict = osef.parser.parse_to_dict(tree) tracked_objects = osef.osef_frame.TrackedObjects(frame_dict) ``` To find more code samples, see Outsight Code Samples repository: https://gitlab.com/outsight-public/outsight-code-samples/-/tree/master ### Frame helper In order to simplify data access in a scan frame, helper classes have been added to the library: ```python import osef from osef import osef_frame osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): # Frame data frame = osef_frame.OsefFrame(frame_dict) timestamp = frame.timestamp # Cloud data augmented_cloud = osef_frame.AugmentedCloud(frame_dict) coordinates = augmented_cloud.cartesian_coordinates reflectivities = augmented_cloud.reflectivities # Tracking data tracking_objects = osef_frame.TrackedObjects(frame_dict) poses = tracking_objects.poses bounding_boxes = tracking_objects.bounding_boxes ``` > 📝 All public types have a helper property For types that do not have a property, it is possible to access them like this: ```python import osef from osef import osef_frame, osef_types osef_path = "path/to/my/file.osef" # or osef_path="tcp://192.168.2.2:11120" for frame_dict in osef.parse(osef_path): # Tracking data tracking_objects = osef_frame.TrackedObjects(frame_dict) class_id_array = tracking_objects[osef_types.OsefKeys.CLASS_ID_ARRAY.value] ``` %prep %autosetup -n osef-2.8.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-osef -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Mon May 29 2023 Python_Bot - 2.8.0-1 - Package Spec generated