Welcome to MsgCenterPyβs Documentation!ο
MsgCenterPy is a multi-format message conversion system based on a unified instance manager architecture, supporting seamless conversion between ROS2, Pydantic, Dataclass, JSON, Dict, YAML and JSON Schema.
π¦ Installationο
Basic Installationο
pip install msgcenterpy
With Optional Dependenciesο
# Install ROS2 support
conda install ros-humble-ros-core ros-humble-std-msgs ros-humble-geometry-msgs -c robostack-staging
From Sourceο
git clone https://github.com/ZGCA-Forge/MsgCenterPy.git
cd MsgCenterPy
pip install -e .[dev]
π Quick Startο
Basic Usageο
from msgcenterpy import MessageInstance, MessageType
# Create message instance from dictionary
data = {
"name": "sensor_001",
"readings": [1.0, 2.0, 3.0],
"active": True
}
dict_instance = MessageInstance.create(MessageType.DICT, data)
# Generate JSON Schema
schema = dict_instance.get_json_schema()
print(schema)
π― Supported Formatsο
Format |
Read |
Write |
JSON Schema |
Type Constraints |
---|---|---|---|---|
ROS2 |
β |
β |
β |
β |
JSON Schema |
β |
β |
β |
β |
Pydantic |
π§ |
π§ |
π§ |
π§ |
Dataclass |
π§ |
π§ |
π§ |
π§ |
JSON |
π§ |
π§ |
π§ |
π§ |
Dict |
π§ |
π§ |
π§ |
π§ |
YAML |
π§ |
π§ |
π§ |
π§ |
Note
β Fully Supported | π§ In Development
π οΈ Developmentο
Development Environment Setupο
For detailed development guidelines, please refer to the Development section.
π Documentation Contentsο
User Guide
Examples
API Reference
Development
Indices and Tablesο
π€ Community & Supportο
π Documentation: https://zgca-forge.github.io/MsgCenterPy/
π Issues: https://github.com/ZGCA-Forge/MsgCenterPy/issues