Skip to content

Add a reference page for the built-in world state store - #5562

Merged
Jeremy Rose (jeremyrose-viam) merged 4 commits into
mainfrom
claude/DOCS-5121-world-state-store-builtin
Nov 23, 2026
Merged

Jeremy Rose (jeremyrose-viam) merged 4 commits into
mainfrom
claude/DOCS-5121-world-state-store-builtin

Conversation

@shannonbradshaw

@shannonbradshaw Shannon Bradshaw (shannonbradshaw) commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Source changes

  • Documents: no ticket key found — rdk#6816 (35bd71312, in RDK v1.17.0): new built-in world state store model, rdk:service:world_state_store / rdk:builtin:builtin, in services/worldstatestore/builtin/. It is not a default service, can't be named builtin, keeps transforms in memory, starts from an optional transforms attribute (proto JSON; a transform without a uuid uses its reference frame name), and takes add, update and remove DoCommands, applied all-or-nothing in the order remove, add, update, returning the base64 uuids changed.

New page

  • docs/reference/services/world-state-store/_index.md: reference page (config and DoCommand reference) covering the JSON config, the transforms attribute, in-memory lifetime, the three DoCommands with examples, ordering and atomicity, the response shape, and what a streaming client sees.
  • Written following Playbook 2; may need additional human review. In particular: the page gives JSON config only, because I couldn't confirm from the app source that the CONFIGURE tab's + menu offers this built-in model.

Other docs changes

  • docs/reference/services/_index.md: table row for the new page.
  • docs/reference/apis/services/world-state-store.md: point to the built-in store as well as the module guide.
  • docs/visualization/visuals-and-collisions.md: say the service can be a module or the built-in store.

Code references

  • services/worldstatestore/builtin/builtin.go (registration, naming, in-memory lifetime), config.go (transforms, default uuid, validation), commands.go (DoCommands, order, all-or-nothing, error format, response), fieldmask.go (update paths, null clears, updatedFields), stream.go (snapshot then changes, stream ends when a client falls behind), all at v1.17.0.
  • api/proto/viam/common/v1/common.proto Transform, Geometry, PoseInFrame.
  • The PR says a follow-up will have the built-in motion service plan around the store's transforms. That isn't in v1.17.0 (services/motion doesn't import worldstatestore), so the page says the planner does not use them.

Documents: DOCS-5121 (the gap ticket docs-agent filed for this change). Docs-agent gap: world-state-store-builtin-model.


Generated by daily docs change agent


Generated by Claude Code


Follow-up revisions

Three more commits on top of the original. They fill gaps on the new page and update pages that said custom visuals can only come from a module.

Reference page (docs/reference/services/world-state-store/_index.md)

  • States orientation units: oX/oY/oZ orientation vector, theta in degrees.
  • Explains how to address a configured transform at runtime: without a uuid, its UUID is its referenceFrame name, base64-encoded (table is "dGFibGU=").
  • Adds the error cases to the command table: removing or updating a UUID that isn't stored, an update that changes no fields, updating the uuid, and paths that reach inside a list or map.
  • Rewords the update example: {"x": 5} sets x to 5, not "moves it along x".
  • Adds a Python do_command example that handles the base64 UUIDs.

Pages that said custom visuals come from a module

  • docs/visualization/3d-scene/_index.md: the intro, the task list, the "where each element comes from" table, and the custom-visuals sections now name both sources: the built-in store or a module.
  • docs/visualization/troubleshoot-the-3d-scene.md:
    • The intro and description are organized by each element's source, matching the page's sections.
    • The stale-visual section has separate checks for the built-in store and for a module, including a new check for a module that drops changes.
    • The WorldState paragraph now says Replay mode draws a saved plan's obstacles.
  • docs/visualization/visuals-and-collisions.md, docs/motion-planning/frame-system/end-effector-frames.md, docs/visualization/_index.md (description): name the built-in store alongside modules.

Where spatial state lives (docs/visualization/reference/world-state.md)

New section with a table of the three sources: frame system, WorldState, and world state store. It shows which ones the planner and the live 3D scene each read, how long each lasts, and when to use which.

Testing

On a machine running viam-server v1.17.0:

  • Configured the store with the page's table seed.
  • Ran the page's DoCommand examples and the Python example as written.
  • Confirmed with ListUUIDs/GetTransform and in the 3D SCENE tab: partial updates, the seeded UUID, all-or-nothing calls, and each documented error message.
  • Confirmed the new troubleshooting check live: after a viam-server restart ended the stream, the 3D scene reconnected, redrew from the store's contents without a page reload, and then followed new changes. The production app pins @viamrobotics/visualization 3.4.0, which has this reconnect logic.

Notes for reviewers

  • JSON-only config is intentional. The app's list of built-in models (rdkbuiltins/viam-server-stable.json) has only rdk:builtin:fake for this API as of 2026-11-23, so the CONFIGURE tab probably doesn't offer rdk:builtin:builtin yet.
  • "The planner does not plan around them" is true for v1.17.0 only. rdk PR 6817, open and unreviewed, would let the motion service read stores (opt-in, with a visual_only mark). If it ships, this page, the world-state table, and visuals-and-collisions.md need updating, and a how-to for the built-in store should follow.
  • Out of scope: publish-visuals-from-a-module.md's streaming example drops changes for slow clients, tracked in DOCS-5141.

🤖 Generated with Claude Code

rdk#6816 adds rdk:service:world_state_store model rdk:builtin:builtin:
an in-memory store seeded from a transforms attribute and changed with
add, update and remove DoCommands. Link it from the API page, the
services index and visuals-and-collisions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Nja2XqYruJmjhpsBqwUQUv
@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Nov 18, 2026
@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit 997e1c0
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6b04aa2b5c8b2ec5238664b5
😎 Deploy Preview https://deploy-preview-5562--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 33 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Jeremy Rose (jeremyrose-viam) commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Docs review: Ready to merge

This PR adds a reference page for the built-in world state store (rdk:builtin:builtin) and updates the visualization section, 3D scene, world state and troubleshooting pages so they no longer say custom visuals need a module. Everything the new commits add matches RDK v1.17.0, the Python SDK and the visualization version the app ships.

Follow-up 2026-11-23: reviewed through 997e1c0. 3 resolved, 0 still open, 0 disputed.

CI: All required checks passing

Docs health: No regressions

Released: All documented changes are live (rdk PR 6816 is in v1.17.0; the scene's stream reconnect is in @viamrobotics/visualization 3.4.0, which the production app pins)

Resolved since the first review (3)
  • docs/reference/services/world-state-store/_index.md:63: orientation units are now stated (orientation vector, theta in degrees).
  • docs/visualization/visuals-and-collisions.md:22: the line-wrap nit is gone with the reflowed paragraph.
  • docs/visualization/3d-scene/_index.md:18: the intro now says custom visuals are what a world state store service holds.
Verified against source (20 claims)

Carried over from the first review (11 claims): API and model names, not a default service and can't be named builtin, the transforms attribute and validation, in-memory lifetime, command semantics, apply order and all-or-nothing, error format, required frames, stream snapshot then changes, unordered ListUUIDs, and the planner not reading the store. All at viamrobotics/rdk v1.17.0 services/worldstatestore/builtin/.

New in this pass:

  • Orientation is an orientation vector with theta in degrees: viamrobotics/api proto/viam/common/v1/common.proto:21-27,41-42
  • A configured transform without a uuid takes its referenceFrame name, so table is "dGFibGU=": builtin/config.go, and base64 of table
  • add gives an item without a uuid a random one and the response reports it: builtin/commands.go:224-227,111-115
  • update: an update must change at least one field, can't change the uuid, a path can name a whole message but not reach inside a list or map, and an unknown UUID is an error: builtin/fieldmask.go:35-36,26,109-110,120-121, builtin/commands.go:248-250
  • remove of an unknown UUID is an error: builtin/commands.go:272-273
  • {"pose": {"x": 5}} sets x and leaves the rest of the pose: field paths are inferred from what the item spells out, builtin/fieldmask.go:58-92; the same example is in builtin/commands.go:42-46
  • Python from viam.services.worldstatestore import WorldStateStore and do_command: viamrobotics/viam-python-sdk src/viam/services/worldstatestore/__init__.py; a command crossing gRPC is accepted as plain JSON, builtin/commands.go:126-127
  • Setting the table's z to -10 raises it by 10 mm, since it's configured at z: -20 on the same page
  • When a stream ends, the 3D scene reopens it and redraws from a fresh snapshot, so a server that ends a lagging client's stream recovers it: viamrobotics/visualization src/lib/components/Machine/worldStateSync.ts (in v3.4.0; production app pins 3.4.0)
  • The scene polls depth cameras for point clouds at the point cloud refresh rate: viamrobotics/visualization v3.4.0 src/lib/components/Machine/PointCloud.svelte:42
  • WorldState obstacles never appear in the live scene, but Replay mode draws the ones a saved plan recorded: viamrobotics/visualization v3.4.0 src/lib/plugins/MotionPlanReplayer/inspect-ik/useIKInspection.svelte.ts:82, draw-pose-set.ts:80

Automated review by Claude. Rerunning the review updates this comment.

…om visuals need a module

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ning intros, and fix the troubleshooting page's source model and WorldState claim

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) merged commit ccb6d25 into main Nov 23, 2026
14 of 15 checks passed
@jeremyrose-viam
Jeremy Rose (jeremyrose-viam) deleted the claude/DOCS-5121-world-state-store-builtin branch November 23, 2026 21:21
@github-actions

Copy link
Copy Markdown

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants