Repository navigation
[Bot] Place Articraft catalog assets using rest-pose bounds - #8
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| 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]) |
There was a problem hiding this comment.
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 👍 / 👎.
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.