Skip to content

[Bot] Place Articraft catalog assets using rest-pose bounds - #8

Merged
Aymericr merged 1 commit into
mainfrom
codex/articraft-bounds-20261028
Oct 28, 2026
Merged

Aymericr merged 1 commit into
mainfrom
codex/articraft-bounds-20261028

Conversation

@Aymericr

Copy link
Copy Markdown
Member

Catalog entries described only by a mesh's raw size can place primitive-based or transformed URDF assets partly below the floor. This change measures rest-pose visual bounds through link and visual origins, converts them to Pascal's Y-up frame, and exports the dimensions and offset needed to stand the asset on its bottom centre.

Catalog records and nodes carry the optional offset. Both placement previews and placed nodes copy it, and the loaded visual applies it inside the node's transform. Existing joint poses and saved motion state remain intact when a node is saved and reopened.

Validation: package build and typecheck pass; all 29 tests pass (89 assertions), including primitive/mesh bounds, transformed joints, floor placement, and node serialization. Local validation used Bun 1.4.4 on macOS; GitHub CI is required before merge. Worker source is unchanged. Independent current-head review is pending.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T13:45:57.638403Z 5391715 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5391715695

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/bounds.ts
Comment on lines +58 to +61
for (const x of [extent.min[0], extent.max[0]]) {
for (const y of [extent.min[1], extent.max[1]]) {
for (const z of [extent.min[2], extent.max[2]]) {
const point = transform(matrix, [x, y, z])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute rotated primitive bounds from their actual geometry

When a sphere or cylinder visual has a non-axis-aligned joint or visual rotation, transforming the corners of its local AABB overestimates the actual bounds. For example, a unit sphere rotated 45° about X is reported as 2.828 m high rather than 2 m, so bottomCentreFrame offsets it upward by 1.414 m and leaves its real bottom about 0.414 m above the floor. Handle spheres analytically and compute the transformed cylinder support extents instead of treating every primitive extent as a box.

Useful? React with 👍 / 👎.

@Aymericr
Aymericr merged commit 130e59d into main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants