You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(pj_base)!: remove the AssetVideo builtin object type (#131)
AssetVideo is superseded by the lazy PJ.VideoFrame path. The MP4 and
LeRobot loaders already produce VideoFrame, and nothing in the SDK,
PJ4, or pj-official-plugins (main) produces or consumes AssetVideo
anymore.
Remove the struct, codec, the PJ.AssetVideo .proto contract, and tests.
Drop the kAssetVideo (C++ BuiltinObjectType) and
PJ_BUILTIN_OBJECT_TYPE_ASSET_VIDEO (C ABI) enumerators, plus the
name()/parseBuiltinObjectType()/typeOf() arms. Slot 12 becomes a
permanently-reserved gap, mirroring the existing slot-2 reserve — ids
13..18 keep their values; nothing is renumbered. Anything classified as
type-id 12 now degrades to kNone and is rejected (the std::any
forward-compat path), never silently reinterpreted.
The ABI sentinel test loses its ==12 pin (the symbol is gone); the
existing ==11 and ==13 pins bracket the reserved hole, and this also
adds the previously-missing VoxelGrid ==18 sentinel. abi/baseline.abi is
unchanged (the codec is a static lib, not exported ABI; the enum is
header-only — abidiff shows no delta).
Docs updated: builtin_type.md, proto/pj/README.md, and both CLAUDE.md
files (type/codec counts 17->16 and 16->15; reserved-slot notes now list
2 and 12).
BREAKING CHANGE: removes a canonical builtin object schema. Per the SDK
versioning contract this warrants a MAJOR (1.0.0) bump. Version sources
are intentionally left at 0.10.0 in this commit — the maintainer will
cut the version together with the other breaking changes batched for
1.0.0.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Byte-backed views |`Image`, `DepthImage`, `PointCloud`, `CompressedPointCloud`, `OccupancyGrid`, `OccupancyGridUpdate`, `VoxelGrid`, `Mesh3D`, `VideoFrame`| Header fields live in the SDK struct; payload bytes live behind `Span<const uint8_t>` plus `BufferAnchor`. | No mandatory canonical codec; preserve zero-copy views over ROS, MCAP, compressed image, point-cloud, or plugin-owned payloads. If conversion is unavoidable, allocate a new payload and anchor it. |
89
-
| Owned values |`ImageAnnotations`, `FrameTransforms`, `SceneEntities`, `AssetVideo`, `RobotDescription`, `CameraInfo`, `PosesInFrame`; future marker types | SDK structs own their vectors/strings/scalars directly. | Add explicit codecs when canonical bytes are needed. Codecs serialize the owned value to the protobuf-wire payload described by the `.proto` contract, using shared private wire primitives. `RobotDescription` carries source-format text as-is (no canonical codec) — the format hint distinguishes URDF / SDF / MJCF. |
87
+
| Owned values |`ImageAnnotations`, `FrameTransforms`, `SceneEntities`, `RobotDescription`, `CameraInfo`, `PosesInFrame`; future marker types | SDK structs own their vectors/strings/scalars directly. | Add explicit codecs when canonical bytes are needed. Codecs serialize the owned value to the protobuf-wire payload described by the `.proto` contract, using shared private wire primitives. `RobotDescription` carries source-format text as-is (no canonical codec) — the format hint distinguishes URDF / SDF / MJCF. |
90
88
91
89
Canonical `.proto` files live under `pj_base/proto/pj` and act as the wire
92
90
format contract. One file per top-level message, each named after its message
@@ -120,7 +118,6 @@ annotations, frame transforms, or no builtin object.
120
118
|`kMesh3D`|`PJ::sdk::Mesh3D`| 3D mesh asset in its native binary format (GLTF/GLB/STL/PLY/OBJ/USD/DAE). |
121
119
|`kVideoFrame`|`PJ::sdk::VideoFrame`| One frame of an inter-frame-coded video stream (h264/h265/vp9/av1). |
122
120
|`kSceneEntities`|`PJ::sdk::SceneEntities`| Procedural 3D scene primitives (arrows, cubes, lines, text, …). |
123
-
|`kAssetVideo`|`PJ::sdk::AssetVideo`| File-backed video reference plus typed playback metadata. |
124
121
|`kRobotDescription`|`PJ::sdk::RobotDescription`| Raw URDF/SDF/MJCF text + format hint. |
Copy file name to clipboardExpand all lines: pj_base/CLAUDE.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
# pj_base — SDK vocabulary, builtin object schemas, and the C plugin ABI
2
2
3
-
pj_base is the **Level 0** foundation and the **SDK boundary** for plugin authors. It owns: the zero-dependency vocabulary types (`Timestamp`, `DatasetId`, `Range`, `Expected<T>`, `Span`, `TypeTree`); the canonical *builtin object* schemas (`sdk::Image`, `PointCloud`, `DepthImage`, `OccupancyGrid`, `VoxelGrid`, `FrameTransforms`, … — 17 types) **and 16 of their wire codecs** (RobotDescription has none); and the **C ABI** primitives every plugin family speaks (`plugin_data_api.h` + the service registry) plus the C-ABI protocol headers for **three** families — `data_source_protocol.h`, `message_parser_protocol.h`, `toolbox_protocol.h`. The **Dialog** protocol header is the exception: it lives in `pj_plugins/dialog_protocol/`, not here. It also ships the C++ SDK base classes for DataSource and Toolbox; the MessageParser and Dialog base classes live in `pj_plugins`. Builds as a STATIC lib with **zero public deps** — `fast_float` is a `BUILD_INTERFACE` private impl detail of `parseNumber`. Must NOT depend on `pj_datastore`, `pj_plugins`, Qt, or any Conan runtime lib. This is a read-only submodule subtree: change it only when explicitly working in `plotjuggler_sdk`.
3
+
pj_base is the **Level 0** foundation and the **SDK boundary** for plugin authors. It owns: the zero-dependency vocabulary types (`Timestamp`, `DatasetId`, `Range`, `Expected<T>`, `Span`, `TypeTree`); the canonical *builtin object* schemas (`sdk::Image`, `PointCloud`, `DepthImage`, `OccupancyGrid`, `VoxelGrid`, `FrameTransforms`, … — 16 types) **and 15 of their wire codecs** (RobotDescription has none); and the **C ABI** primitives every plugin family speaks (`plugin_data_api.h` + the service registry) plus the C-ABI protocol headers for **three** families — `data_source_protocol.h`, `message_parser_protocol.h`, `toolbox_protocol.h`. The **Dialog** protocol header is the exception: it lives in `pj_plugins/dialog_protocol/`, not here. It also ships the C++ SDK base classes for DataSource and Toolbox; the MessageParser and Dialog base classes live in `pj_plugins`. Builds as a STATIC lib with **zero public deps** — `fast_float` is a `BUILD_INTERFACE` private impl detail of `parseNumber`. Must NOT depend on `pj_datastore`, `pj_plugins`, Qt, or any Conan runtime lib. This is a read-only submodule subtree: change it only when explicitly working in `plotjuggler_sdk`.
-`include/pj_base/builtin/` — the 17 builtin object struct headers (`*.hpp`; 18 enum values in `BuiltinObjectType`, value 2 reserved) + their 16 wire codecs (`*_codec.hpp`; RobotDescription has none) + the `BuiltinObject` (`std::any`) type-erased holder.
7
+
-`include/pj_base/builtin/` — the 16 builtin object struct headers (`*.hpp`; 17 enum values in `BuiltinObjectType`, values 2 and 12 reserved) + their 15 wire codecs (`*_codec.hpp`; RobotDescription has none) + the `BuiltinObject` (`std::any`) type-erased holder.
8
8
-`include/pj_base/sdk/` — C++ SDK over the ABI: DataSource + Toolbox `*_plugin_base.hpp`, `service_registry.hpp`/`service_traits.hpp`, host views, Arrow RAII holders, `testing/`.
9
9
-`include/pj_base/*_protocol.h`, `plugin_data_api.h`, `builtin_object_abi.h`, `plugin_abi_export.hpp` — the stable C-ABI surface for DataSource/MessageParser/Toolbox (the Dialog protocol header lives in `pj_plugins/dialog_protocol/`).
10
10
-`proto/pj/` — canonical `.proto` wire contracts for the builtin types (see its README).
11
11
-`src/`, `tests/` — codec/parse impls and gtests.
12
12
-`abi/baseline.abi` — golden libabigail dump; the ABI-stability regression baseline.
13
13
14
14
## Gotchas
15
-
- ABI numbering is **frozen**: `BuiltinObjectType` (builtin_object.hpp) and `PJ_builtin_object_type_t` (builtin_object_abi.h) share stable numeric values — never renumber; type 2 is permanently reserved. Append-only.
15
+
- ABI numbering is **frozen**: `BuiltinObjectType` (builtin_object.hpp) and `PJ_builtin_object_type_t` (builtin_object_abi.h) share stable numeric values — never renumber; types 2 and 12 are permanently reserved. Append-only.
16
16
- Every vtable slot is `PJ_NOEXCEPT`; a throw across the ABI boundary calls `std::terminate`. See the header block in `plugin_data_api.h`.
17
17
-`BuiltinObject` is `std::any`, deliberately not `std::variant`, for forward-compat — recover via `std::any_cast<T>` / `sdk::typeOf`. See `builtin/builtin_object.hpp`.
18
18
- ABI/struct-layout or signature changes require a Conan **MINOR** bump and a refreshed `abi/baseline.abi`; tail-appended slots are a PATCH (see submodule CLAUDE.md → Release Versioning).
0 commit comments