Skip to content

Add generic joint support to physics extension - #748

Merged
AlexisDrogoul merged 17 commits into
mainfrom
Physics-Joints
Oct 8, 2026
Merged

AlexisDrogoul merged 17 commits into
mainfrom
Physics-Joints

Conversation

@AlexisDrogoul

Copy link
Copy Markdown
Member

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

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.
@AlexisDrogoul AlexisDrogoul added the About Physics Plugin All the issues related to the plugin that contains the physics engines like JBullet label Aug 14, 2025
@AlexisDrogoul
AlexisDrogoul marked this pull request as draft August 14, 2025 00:51
@AlexisDrogoul
AlexisDrogoul marked this pull request as ready for review October 8, 2026 12:27
Copilot AI balanced review requested due to automatic review settings October 8, 2026 12:27
@AlexisDrogoul

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The GAML models currently fail parsing/operator resolution, and joint typing, coordinates, and JBullet lifecycle contain correctness issues.

7 open findings
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.

Comment thread gama.extension.physics/models/Physics Engine/models/Box2D Articulated Arm.gaml Outdated
Comment thread gama.extension.physics/models/Physics Engine/models/Jointed Snake.gaml Outdated
Comment thread gama.extension.physics/src/gama/extension/physics/gaml/GamaJoint.java Outdated
AlexisDrogoul and others added 5 commits October 8, 2026 19:34
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>
Copilot AI and others added 2 commits October 8, 2026 12:43
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>
Co-authored-by: AlexisDrogoul <579256+AlexisDrogoul@users.noreply.github.com>

Copilot AI commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the conflict while merging main in ee9e28b; the joint additions are adapted to the merged APIs, and the full reactor compile passes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread gama.extension.physics/models/Physics Engine/models/Box2D Articulated Arm.gaml Outdated
Comment thread gama.extension.physics/src/gama/extension/physics/gaml/types/GamlJointType.java Outdated
AlexisDrogoul and others added 3 commits October 8, 2026 23:40
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>
@AlexisDrogoul
AlexisDrogoul merged commit 009cef2 into main Oct 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

About Physics Plugin All the issues related to the plugin that contains the physics engines like JBullet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants