Record message parse helper function
Project description
record_msg
record message parse helper function. It needs to be used in combination with cyber_record
Parser record
First read the record file through cyber_record, then record_msg provides 3 interfaces to help parsing cyber record file.
csv format
you can use to_csv to format objects so that they can be easily saved in csv format.
import csv
from record_msg.parser import to_csv
f = open("message.csv", 'w')
writer = csv.writer(f)
def parse_pose(pose):
'''
save pose to csv file
'''
line = to_csv([pose.header.timestamp_sec, pose.pose])
writer.writerow(line)
f.close()
image
you can use ImageParser to parse and save images in output_path.
from record_msg.parser import ImageParser
image_parser = ImageParser(output_path='../test')
for topic, message, t in record.read_messages():
if topic == "/apollo/sensor/camera/front_6mm/image":
image_parser.parse(message)
# or use timestamp as image file name
# image_parser.parse(image, t)
lidar
you can use PointCloudParser to parse and save pointclouds in output_path.
from record_msg.parser import PointCloudParser
pointcloud_parser = PointCloudParser('../test')
for topic, message, t in record.read_messages():
if topic == "/apollo/sensor/lidar32/compensator/PointCloud2":
pointcloud_parser.parse(message)
# other modes, default is 'ascii'
# pointcloud_parser.parse(message, mode='binary')
# pointcloud_parser.parse(message, mode='binary_compressed')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file record_msg-1.0.2.tar.gz.
File metadata
- Download URL: record_msg-1.0.2.tar.gz
- Upload date:
- Size: 478.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b63c6237b868431f2fff1f70a5b837492554d7feda871573de201d61779cacac
|
|
| MD5 |
0d0488c2b2a0052b2a5bfff3aa1f0494
|
|
| BLAKE2b-256 |
77b5e080f1fc0e7658b79f6fd2ddcbcc912de217d571f114f62b9dfa2b4f5870
|
Provenance
The following attestation bundles were made for record_msg-1.0.2.tar.gz:
Publisher:
publish-pypi.yml on daohu527/record-msg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
record_msg-1.0.2.tar.gz -
Subject digest:
b63c6237b868431f2fff1f70a5b837492554d7feda871573de201d61779cacac - Sigstore transparency entry: 982090800
- Sigstore integration time:
-
Permalink:
daohu527/record-msg@888cbdc7a225a059586a9e41e80e5d1a293defe3 -
Branch / Tag:
refs/tags/1.0.2 - Owner: https://github.com/daohu527
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@888cbdc7a225a059586a9e41e80e5d1a293defe3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file record_msg-1.0.2-py3-none-any.whl.
File metadata
- Download URL: record_msg-1.0.2-py3-none-any.whl
- Upload date:
- Size: 781.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
726e9fdd45b445bb9b252a39ea23005a18f73815e80e9c0507335b894136f71d
|
|
| MD5 |
3ab22dbe58159e058631e074cce9fb37
|
|
| BLAKE2b-256 |
3208f029f907b71d268e26ff4769af4885f0164a7b39cf5aadda097f4d9148d6
|
Provenance
The following attestation bundles were made for record_msg-1.0.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on daohu527/record-msg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
record_msg-1.0.2-py3-none-any.whl -
Subject digest:
726e9fdd45b445bb9b252a39ea23005a18f73815e80e9c0507335b894136f71d - Sigstore transparency entry: 982090853
- Sigstore integration time:
-
Permalink:
daohu527/record-msg@888cbdc7a225a059586a9e41e80e5d1a293defe3 -
Branch / Tag:
refs/tags/1.0.2 - Owner: https://github.com/daohu527
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@888cbdc7a225a059586a9e41e80e5d1a293defe3 -
Trigger Event:
release
-
Statement type: