Skip to content

[ITEP-82021] Add physics properties to Asset3D model#1030

Merged
saratpoluri merged 6 commits intomainfrom
feature/add-physics-properties
Feb 19, 2026
Merged

[ITEP-82021] Add physics properties to Asset3D model#1030
saratpoluri merged 6 commits intomainfrom
feature/add-physics-properties

Conversation

@rawatts10
Copy link
Copy Markdown
Contributor

📝 Description

This PR adds a minimum viable collection of physics properties to the Asset3D (Object Library) model in preparation for integration of a full physics simulation engine. This is phase 1: schema addition only. These properties are not yet consumed by any simulation or tracking logic - they are being added to the data model to support future physics engine integration.

Changes:

  • Add 9 new physics properties for rigid body simulation preparation:
    • Positional: geometric_center (array[3]) - offset from bottom center in meters
    • Mass: mass (kg), center_of_mass (array[3]) - mass distribution properties
    • Physics state: is_static (boolean), ttl (seconds), linear_damping (0.0-1.0), angular_damping (0.0-1.0)
    • Material: coefficient_of_restitution (0.0-1.0), friction_coefficients (array[2] for static/dynamic)
  • All fields include sensible defaults and help text for self-documentation
  • TTL defaults to 0.0 (infinite) for object permanence
  • Array fields pre-populated with example values to demonstrate expected format
  • Updated API serializer to expose all new properties
  • Updated create/update form views to include new fields
  • All properties use SI units (meters, kilograms, seconds) as specified
  • Migrations will be auto-generated on deployment (not stored in source control per project convention)

What this PR does NOT include:

  • ❌ Physics simulation engine integration
  • ❌ Consumption of these properties by tracking or controller logic
  • ❌ Collision shape properties (box, sphere, capsule, mesh) - deferred to separate feature
  • ❌ Validation or enforcement of physics property relationships

Context:

These properties establish the data foundation for future physics capabilities. They may be detected or configured based on object class and will support future physics engine integration. The minimum viable set was identified based on existing rigid body physics simulation solutions. This phase simply makes the properties available for configuration via UI and API.

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • 🚀 New feature – Non-breaking change which adds functionality
  • 🔨 Refactor – Non-breaking change which refactors the code base
  • 💥 Breaking change – Changes that break existing functionality
  • 📚 Documentation update
  • 🔒 Security update
  • 🧪 Tests
  • 🚂 CI

🧪 Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • ✅ Tested manually
  • 🤖 Ran automated end-to-end tests

Manual Testing:

  1. Built fresh demo environment using make demo
  2. Verified all 9 new fields appear in Object Library UI (Asset Create/Update forms)
  3. Confirmed array fields display with default values (e.g., [0.0, 0.0, 0.0] for geometric_center)
  4. Verified API endpoints return new properties in Asset3D serializer
  5. Tested creating new assets with custom physics property values
  6. Confirmed migrations auto-generate on first deployment and apply cleanly
  7. Verified that existing functionality is unaffected (properties are additive only)

Reviewers can test by:

make clean-volumes  # Clean existing data
make demo          # Rebuild with new schema

- Add 9 new physics properties for rigid body simulation preparation:
  - Positional: geometric_center (array[3])
  - Mass: mass, center_of_mass (array[3])
  - Physics state: is_static, ttl, linear_damping, angular_damping
  - Material: coefficient_of_restitution, friction_coefficients (array[2])
- All fields include sensible defaults and help text
- TTL defaults to 0.0 (infinite) for object permanence
- Array fields pre-populated with example values for self-documentation
- Updated API serializer to expose all new properties
- Updated create/update form views to include new fields
- All properties use SI units as specified
- Migrations will be auto-generated on deployment
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an initial set of rigid-body physics configuration fields to the Manager’s Asset3D (Object Library) data model, and exposes them through the UI CRUD views and REST serializer to support future physics engine integration.

Changes:

  • Added new physics-related fields (mass, centers, damping, restitution, friction, TTL/static) to Asset3D.
  • Exposed the new fields via Asset3DSerializer.
  • Added the new fields to the Asset3D create/update views’ editable field lists.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
manager/src/django/models.py Adds new physics properties to the Asset3D model (including list/array fields and defaults).
manager/src/django/serializers.py Includes the new physics properties in the Asset3DSerializer response/payload fields.
manager/src/django/views.py Adds the new physics properties to the Asset3D create/update form field lists.

Comment thread manager/src/django/models.py
Comment thread manager/src/django/models.py
Comment thread manager/src/django/models.py Outdated
Comment thread manager/src/django/models.py Outdated
Comment thread manager/src/django/models.py Outdated
saratpoluri
saratpoluri previously approved these changes Feb 18, 2026
@saratpoluri saratpoluri enabled auto-merge (squash) February 18, 2026 21:49
@saratpoluri saratpoluri merged commit 97e42e6 into main Feb 19, 2026
30 checks passed
@saratpoluri saratpoluri deleted the feature/add-physics-properties branch February 19, 2026 09:08
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.

5 participants