Registry /
serialization / foxglove-schemas-protobuf
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.
Install & Compatibility
Where this runs
tested against v0.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.285s · 19.9MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.0s · import 0.058s · 21MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Generated protobuf messages are typically within a `_pb2` module.
from foxglove_schemas_protobuf.FrameTransform_pb2 import FrameTransform
Common protobuf types like Timestamp are part of the `google.protobuf` package, not directly from `foxglove_schemas_protobuf`.
from google.protobuf.timestamp_pb2 import Timestamp
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`.
from foxglove_schemas_protobuf.FrameTransform_pb2 import FrameTransform
from google.protobuf.timestamp_pb2 import Timestamp
# Create a Timestamp
ts = Timestamp()
ts.seconds = 1678886400 # Example: March 15, 2023 12:00:00 PM UTC
ts.nanos = 123456789
# Create a FrameTransform message
transform = FrameTransform(
timestamp=ts,
parent_frame_id="base_link",
child_frame_id="tool0",
translation_x=1.0,
translation_y=0.5,
translation_z=0.2,
rotation_x=0.0,
rotation_y=0.0,
rotation_z=0.0,
rotation_w=1.0
)
# Serialize to bytes
serialized_data = transform.SerializeToString()
print(f"Serialized FrameTransform data length: {len(serialized_data)} bytes")
# Deserialize from bytes
deserialized_transform = FrameTransform()
deserialized_transform.ParseFromString(serialized_data)
print(f"\nDeserialized Parent frame: {deserialized_transform.parent_frame_id}")
print(f"Deserialized Child frame: {deserialized_transform.child_frame_id}")
print(f"Deserialized Timestamp: {deserialized_transform.timestamp.seconds}.{deserialized_transform.timestamp.nanos}")
assert deserialized_transform.parent_frame_id == "base_link"
assert deserialized_transform.translation_x == 1.0
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.