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
* feat(pj_base): add VoxelGrid canonical builtin object + codec
Add sdk::VoxelGrid, the dense 3D voxel-grid builtin — the volumetric
sibling of OccupancyGrid, reusing PointCloud's PointField channel model.
The struct mirrors foxglove.VoxelGrid's byte layout (Z-Y-X order, three
strides) so a lazily-parsing producer exposes `data` as a zero-copy
Span<const uint8_t> + BufferAnchor rather than transcoding cells. The
per-voxel value is generic (occupancy/cost/ESDF/semantic via `fields`);
which voxels are drawn stays a viewer-side decision.
- voxel_grid.hpp / voxel_grid_codec.{hpp,cpp} + proto/pj/VoxelGrid.proto
- kVoxelGrid = 18 appended to BuiltinObjectType and PJ_builtin_object_type_t
(append-only; type 2 stays reserved)
- round-trip + empty-buffer tests; builtin_object_test enumerations extended
- docs: builtin_type.md (type row, section, conversion), proto README,
builtin-count bumps + 3-source version mechanics in CLAUDE.md
Build Debug+ASAN green; voxel_grid_codec_test 4/4, builtin_object_test 6/6.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(release): bump version to 0.10.0
VoxelGrid is a backward-compatible addition (tail-appended enum value +
two new exported symbols), so this is a MINOR bump and abi/baseline.abi
is unchanged.
Aligns all three version sources — conanfile.py, CMakeLists.txt
(PJ_PACKAGE_VERSION), and recipe.yaml (context.version) — so a v0.10.0
tag passes the conda-release guard. recipe.yaml had drifted to 0.8.1 at
the v0.9.0 tag, which is why the conda/pixi 0.9.0 publish failed while the
Conan/GitHub release succeeded.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Byte-backed views |`Image`, `DepthImage`, `PointCloud`, `CompressedPointCloud`, `OccupancyGrid`, `OccupancyGridUpdate`, `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. |
88
+
| 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
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. |
90
90
91
91
Canonical `.proto` files live under `pj_base/proto/pj` and act as the wire
@@ -126,6 +126,7 @@ annotations, frame transforms, or no builtin object.
126
126
|`kOccupancyGridUpdate`|`PJ::sdk::OccupancyGridUpdate`| Incremental sub-rectangle patch for a previously-published `OccupancyGrid`. |
`pj_base/builtin/voxel_grid_codec.hpp` serializes and deserializes this type
629
+
using the canonical `PJ.VoxelGrid` protobuf wire format.
630
+
596
631
## Conversion Examples
597
632
598
633
| Source type | Canonical builtin type | Conversion intent |
@@ -612,6 +647,7 @@ type using the canonical `PJ.PosesInFrame` protobuf wire format.
612
647
| ROS `std_msgs/String` on `/robot_description` (or matching name) carrying URDF XML |`RobotDescription`| Validate root element matches `format`, then carry the raw text + format hint. No mesh resolution at parse time. |
613
648
| ROS `sensor_msgs/CameraInfo`|`CameraInfo`| Map K / D / R / P plus dimensions; correlate to the image topic by name. Sub-window (binning / ROI) is dropped. |
614
649
| ROS `map_msgs/OccupancyGridUpdate`|`OccupancyGridUpdate`| Forward the cell-space patch (`x`/`y`/`width`/`height` + bytes); the consumer pairs it with the base grid and supplies origin/resolution. |
650
+
|`foxglove.VoxelGrid` / `costmap_2d/VoxelGrid`|`VoxelGrid`| Map counts/strides/`cell_size`/`origin` into the struct; keep voxel bytes zero-copy in Z-Y-X order. The draw predicate is viewer-side. |
615
651
616
652
The builtin type is the boundary object. After conversion, consumers should not
617
653
need to know which third-party schema produced it.
Copy file name to clipboardExpand all lines: pj_base/CLAUDE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
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`, `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`.
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`.
-`include/pj_base/builtin/` — the 16 builtin object struct headers (`*.hpp`; 17 enum values in `BuiltinObjectType`, value 2 reserved) + their 15 wire codecs (`*_codec.hpp`; RobotDescription has none) + the `BuiltinObject` (`std::any`) type-erased holder.
7
+
-`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.
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).
0 commit comments