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 CameraInfo + OccupancyGridUpdate canonical builtin types
Closes the two remaining canonical-object gaps for the ROS pipeline: every
common ROS 2 message now maps onto a builtin type. Both are wired end-to-end
(struct + codec + proto + enum/ABI/typeOf + tests + docs) at enum values 14/15,
following the existing owned (FrameTransforms) and byte-backed (OccupancyGrid)
templates.
- CameraInfo (owned): pinhole calibration K/D/R/P + dimensions, packed-double
codec. Mirrors sensor_msgs/CameraInfo; binning/ROI omitted (additive later).
Correlated to an image topic by name convention; carries no topic linkage.
- OccupancyGridUpdate (byte-backed): incremental sub-rectangle patch for an
OccupancyGrid. Deliberately no origin/resolution — a stateful consumer pairs
it with the base grid (<base>/costmap_updates <-> <base>/costmap) and places
it. Signed int32 cell offsets round-trip via the varint bit pattern.
Also dedups a duplicate RobotDescription row in the conversion-examples table.
Build 100%; ctest 5/5 (camera_info_codec, occupancy_grid_update_codec,
builtin_object, abi_layout_sentinels, occupancy_grid_codec).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(pj_base): SceneEntities gains ModelPrimitive + entity deletions
Extends the SceneEntities canonical type so it can losslessly represent
visualization_msgs/Marker:
- ModelPrimitive (mesh asset by url or inline data) on SceneEntity — covers
MESH_RESOURCE markers, which previously had no home.
- deletions[] of SceneEntityDeletion{MATCHING_ID, ALL} on SceneEntities — lets
a snapshot producer express the removal half of a stateful stream
(Marker DELETE / DELETEALL) without an empty-entity sentinel.
Both mirror fields in Foxglove's SceneEntity/SceneUpdate that the original port
omitted. Additive only: new struct fields + proto field numbers (models=14,
deletions=2), updated hand-written codec + round-trip tests, docs. No new
BuiltinObjectType, so the C ABI and abi_layout_sentinels are unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(pj_base): align SceneEntities schema with Foxglove field order
No consumers exist yet, so renumber freely to match Foxglove's
SceneEntity/SceneUpdate 1:1:
- SceneEntity: add metadata=6 (new KeyValuePair message) and shift the
primitive lists to 7..14 (arrows..models), matching Foxglove exactly.
- AxesPrimitive has no Foxglove counterpart; it moves to field 15, after the
Foxglove range, as a documented PlotJuggler extension.
- SceneEntities: order deletions=1, entities=2 (Foxglove SceneUpdate order).
C++ struct member names are unchanged, so producers/consumers that build by
name are unaffected; only the wire numbering moves. Codec + round-trip tests
updated (metadata coverage added).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(pj_base): preserve repeated D chunks in CameraInfo decode
Drop the per-occurrence info.D.clear() in the field-6 handler. readPackedDouble
appends, so a distortion-coefficient array split across multiple packed chunks
(valid protobuf, e.g. after message merge/concatenation) was losing all but the
last chunk. Now matches the DepthImage decoder. (Codex review P2.)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(pj_base): use shared KeyValuePair.proto in SceneEntities
SceneEntity.metadata referenced an inline KeyValuePair message duplicated in
SceneEntities.proto, but a canonical pj/KeyValuePair.proto already exists (and
is imported by the annotation schemas). Import it instead of redefining, so
PJ.KeyValuePair has a single definition.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(pj_base): add Log canonical builtin type (kLog=16)
A small owned builtin for textual log messages (timestamp, level, message,
name), for a log/console panel. Mirrors the core of Foxglove's Log schema and
rcl_interfaces/Log; the source-location fields (file, line) are intentionally
omitted.
Wires kLog=16 through builtin_object_abi.h (C enum), builtin_object.hpp
(enum + name/parse/typeOf + include), abi_layout_sentinels + builtin_object
tests, and CMake (codec source + round-trip test). New log.hpp / log_codec.*
/ Log.proto follow the established owned-type pattern; docs + proto README
updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Davide Faconti <dfaconti@aurynrobotics.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| Byte-backed views |`Image`, `DepthImage`, `PointCloud`, `CompressedPointCloud`, `OccupancyGrid`, `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. |
87
-
| Owned values |`ImageAnnotations`, `FrameTransforms`, `SceneEntities`, `AssetVideo`, `RobotDescription`; 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. |
86
+
| 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. |
87
+
| Owned values |`ImageAnnotations`, `FrameTransforms`, `SceneEntities`, `AssetVideo`, `RobotDescription`, `CameraInfo`; 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. |
88
88
89
89
Canonical `.proto` files live under `pj_base/proto/pj` and act as the wire
90
90
format contract. One file per top-level message, each named after its message
@@ -120,6 +120,9 @@ annotations, frame transforms, or no builtin object.
120
120
|`kSceneEntities`|`PJ::sdk::SceneEntities`| Procedural 3D scene primitives (arrows, cubes, lines, text, …). |
121
121
|`kAssetVideo`|`PJ::sdk::AssetVideo`| File-backed video reference plus typed playback metadata. |
122
122
|`kRobotDescription`|`PJ::sdk::RobotDescription`| Raw URDF/SDF/MJCF text + format hint. |
|`R`|`std::array<double, 9>`| 3x3 row-major rectification (identity for monocular). |
548
+
|`P`|`std::array<double, 12>`| 3x4 row-major projection / camera matrix. |
549
+
550
+
Sub-window fields (binning, ROI) from `sensor_msgs/CameraInfo` are intentionally
551
+
omitted; they are additive later if a consumer needs them.
552
+
`pj_base/builtin/camera_info_codec.hpp` serializes and deserializes this type
553
+
using the canonical `PJ.CameraInfo` protobuf wire format.
554
+
555
+
## Log
556
+
557
+
`Log` is a single textual log message, for a log/console panel. It mirrors the
558
+
core of Foxglove's `Log` schema (and `rcl_interfaces/Log` / `rosgraph_msgs/Log`).
559
+
560
+
| Field on `Log`| Type | Notes |
561
+
|----------------|------|-------|
562
+
|`timestamp_ns`|`Timestamp`| Time of the log message. |
563
+
|`level`|`Log::Level`|`kUnknown`/`kDebug`/`kInfo`/`kWarning`/`kError`/`kFatal` (values match Foxglove). |
564
+
|`message`|`std::string`| Log text. |
565
+
|`name`|`std::string`| Originating process / node / logger name. |
566
+
567
+
Foxglove's source-location fields (`file`, `line`) are intentionally omitted.
568
+
`pj_base/builtin/log_codec.hpp` serializes and deserializes this type using the
569
+
canonical `PJ.Log` protobuf wire format.
570
+
490
571
## Conversion Examples
491
572
492
573
| Source type | Canonical builtin type | Conversion intent |
@@ -503,7 +584,8 @@ Design notes:
503
584
| Detection or tracking message |`ImageAnnotations`| Convert boxes, points, circles, and labels into pixel-space primitives. |
504
585
| ROS `tf2_msgs/TFMessage`|`FrameTransforms`| Convert transform batches into named parent/child frame relationships. |
505
586
| 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. |
506
-
| 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. |
587
+
| 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. |
588
+
| 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. |
507
589
508
590
The builtin type is the boundary object. After conversion, consumers should not
509
591
need to know which third-party schema produced it.
0 commit comments