This library provides precompiled Protocol Buffer (protobuf) schemas for Foxglove, a web-based visualization and debugging tool for robotics. It allows Python applications to serialize and deserialize data according to Foxglove's standardized message definitions, facilitating interoperability within the Foxglove ecosystem. The current version is 0.3.0, and updates typically align with new schema definitions released by the broader Foxglove SDK.
pip install foxglove-schemas-protobufVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to create, serialize, and deserialize a `FrameTransform` message using the `foxglove-schemas-protobuf` library. It includes importing the specific message class and a common Google Protobuf type like `Timestamp`.
Regularly check PyPI for new versions of `foxglove-schemas-protobuf` and update your `requirements.txt`. Consult the Foxglove schemas GitHub repository for the latest schema definitions across all languages.
Ensure your installed `protobuf` library version is compatible with the `foxglove-schemas-protobuf` package. Typically, `pip install foxglove-schemas-protobuf` will install a compatible `protobuf` version, but if you have existing protobuf installations, check for conflicts (`pip check`).
Always pin exact versions for `foxglove-schemas-protobuf` in your project. When upgrading, test thoroughly and review the Foxglove schema changelog for breaking or compatibility-affecting changes. Use default values for optional fields to enhance robustness.
Verify the exact schema name from the Foxglove schemas repository. The Python module structure is `foxglove_schemas_protobuf.<SchemaName>_pb2` (e.g., `ImageAnnotation_pb2`). Ensure the package is correctly installed.
Ensure the input byte string is a complete and valid serialized Protobuf message for the target schema. Check the source of the data for corruption or mismatch. Verify that both sender and receiver are using compatible schema versions.
Update your code to reflect the current schema definition by consulting the Foxglove schema documentation or upgrading your `foxglove-schemas-protobuf` package and re-evaluating the available fields. Alternatively, ensure the data being deserialized matches the expected schema version.