ROS Parser
A Python parser for ROS message definitions and Foxglove message path syntax.
Installation
uv add ros-parser
Parsers
- ros1_msg: Parses ROS1 message definition files (.msg)
- ros2_msg: Parses ROS2 message definition files (.msg)
- message_path: Parses Foxglove message path syntax for data access and filtering
Usage
Parsing ROS2 Messages
from ros_parser import ros2_msg
definition = ros2_msg.parse_message_string("""
float64 x
float64 y
float64 z
""")
for field in definition.fields:
print(f"{field.name}: {field.type}")
Parsing ROS1 Messages
from ros_parser import ros1_msg
definition = ros1_msg.parse_message_string("""
Header header
float64 x
float64 y
float64 z
""")
for field in definition.fields:
print(f"{field.name}: {field.type}")
Parsing Schema with Dependencies
from ros_parser import parse_schema_to_definitions
# Parse a full schema including embedded type definitions
definitions = parse_schema_to_definitions(
"geometry_msgs/msg/Pose",
schema_data
)
Regenerating Standalone Parsers
The project uses Lark to generate standalone parsers from grammar files. If you modify any .lark grammar file, regenerate the parsers:
uv run _generate_standalone.py \
src/ros_parser/ros1_msg/grammar.lark \
src/ros_parser/ros2_msg/grammar.lark \
src/ros_parser/message_path/grammar.lark \
--output-dir src/ros_parser \
--lexer contextual
For more details on the message path syntax, see src/ros_parser/message_path/README.md.
Metadata
Release files for ros-parser 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ros_parser-0.9.0.tar.gz | 85.3 kB | Without provenance | Details for ros_parser-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ros_parser-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for ros_parser-0.9.0-py3-none-any.whl |
Total release size: 179.0 kB
Release files / ros_parser-0.9.0.tar.gz
| Download URL | ros_parser-0.9.0.tar.gz |
|---|---|
| Size | 85.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f99a50445a46e89eeb57cbb0fde776a8e4ab0ca1c41e024975162163ef42f3c
|
|
BLAKE2b-256 checksum How to use checksums |
2dcb0c0eaf0b0ec5781f3161e6166a68c7ab2bf05f70c87f73884ad9e7faa9c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ros_parser-0.9.0-py3-none-any.whl
| Download URL | ros_parser-0.9.0-py3-none-any.whl |
|---|---|
| Size | 93.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bf02bb68ef9ad57182824756a6f565a6056188c0a3933590fd7551beee0ece9
|
|
BLAKE2b-256 checksum How to use checksums |
a495f7fba402ff30ed65d86227ba76f56d375ac3e4522cd20b9712bae372f2e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ros-parser 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.