Repository navigation
Add generic joint support to physics extension - #748
Conversation
Introduces a generic IJointDefinition interface and GamaJoint wrapper for representing physical joints. Adds joint creation methods to Box2D, Bullet, and Native Bullet worlds, and exposes joint creation operators in PhysicalSimulationAgent. Also includes a new GAML type for joints and updates copyright/license headers.
|
@copilot resolve the merge conflicts in this pull request |
There was a problem hiding this comment.
🟡 Changes recommended
The GAML models currently fail parsing/operator resolution, and joint typing, coordinates, and JBullet lifecycle contain correctness issues.
7 open findings
Model name contains unsupported spaces · New Model declaration uses an invalid space-separated name · New Instance operators require an unlisted physical-world receiver · New Agent removal leaves constraints attached to deleted bodies · New Slider axis omits Box2D Y-axis conversion · New GAML string getter returns a JointType enum · New Feature list advertises unsupported joint types and actions · New
What changed in this PR
Adds cross-engine joint support to the physics extension, exposing hinge, slider, and ball-and-socket joints to GAML.
Changes:
- Adds generic joint definitions and GAML-facing wrappers/operators.
- Implements joints for Box2D, JBullet, and native Bullet.
- Adds articulated-joint example models.
| File | Description |
|---|---|
NativeBulletPhysicalWorld.java |
Implements native Bullet joints. |
BulletPhysicalWorld.java |
Implements JBullet constraints. |
GamlJointType.java |
Registers the GAML joint type. |
PhysicalSimulationAgent.java |
Exposes joint creation operators. |
GamaJoint.java |
Wraps joints and motor controls. |
IPhysicalWorld.java |
Adds the joint creation contract. |
IJointDefinition.java |
Defines engine-independent joint configuration. |
Box2DPhysicalWorld.java |
Implements Box2D joints. |
Jointed Snake.gaml |
Demonstrates a motorized chain. |
Box2D Articulated Arm.gaml |
Demonstrates a motorized arm. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Renamed model from 'Jointed Snake' to 'Jointed_Snake'. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>
Resolved the conflict while merging |
There was a problem hiding this comment.
🟡 Changes recommended
The GAML operators have incompatible instance signatures, and body updates can leave joints attached to obsolete physics bodies.
6 open findings
Pass the created base agent to joint creation · New Destroy joints when updating backend bodies · New Agent removal leaves constraints attached to deleted bodies Instance operators require an unlisted physical-world receiver Start extension type IDs at the custom-type range · New Use valid GAML joint declaration syntax · New
5 resolved since last review
🧠 Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>



The goal of this PR is to introduce joints in the physics engine, step by step,