[tpe] Add DetachableJoint support#832
Open
Xinyu-Sheng wants to merge 6 commits intogazebosim:gz-physics9from
Open
[tpe] Add DetachableJoint support#832Xinyu-Sheng wants to merge 6 commits intogazebosim:gz-physics9from
Xinyu-Sheng wants to merge 6 commits intogazebosim:gz-physics9from
Conversation
- Implement AttachFixedJointFeature, DetachJointFeature, SetJointTransformFromParentFeature - Add fixed joint constraint enforcement in simulation step - Enable TPE in detachable_joint tests" - Update detachable_joint test to support kinematic engines Signed-off-by: Xinyu Sheng <sheng.xin.yu@foxmail.com>
ahcorde
requested changes
Dec 23, 2025
- Update copyright year from 2020 to 2025 in JointFeatures.cc and JointFeatures.hh - Add missing #include <cstddef> to Base.hh, JointFeatures.cc, and JointFeatures.hh - Add missing #include <string> and #include <gz/math/pose3.hh> to JointFeatures.cc Signed-off-by: Xinyu Sheng <sheng.xin.yu@foxmail.com>
TPE exposes joint features as stubs for DetachableJoint support, but doesn't support actual joint construction from SDF or joint dynamics (damping, spring stiffness). Signed-off-by: Xinyu Sheng <sheng.xin.yu@foxmail.com>
- Change #include <gz/math/pose3.hh> to #include <gz/math/Pose3.hh> in JointFeatures.cc - The correct header file is Pose3.hh with capital P, matching the actual filename Signed-off-by: Xinyu Sheng <sheng.xin.yu@foxmail.com>
Signed-off-by: Xinyu Sheng <sheng.xin.yu@foxmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 New feature
Summary
This PR adds DetachableJoint feature support to the TPE (Trivial Physics Engine) plugin, enabling dynamic attachment and detachment of fixed joints between entities.
Fixes
Closes #818
Changes:
TPE Plugin (
tpe/plugin/):Base.hh: Add JointInfo struct and joints map for joint trackingJointFeatures.hh/cc: Implement AttachFixedJointFeature, DetachJointFeature, SetJointTransformFromParentFeature with stub implementations for required joint interface methodsSimulationFeatures.cc: Add fixed joint constraint enforcement in WorldForwardStep (required for kinematic engines that lack built-in constraint solvers)KinematicsFeatures.hh: Add FreeGroupFrameSemantics to feature listplugin.cc: Include JointFeatures in plugin feature listCMakeLists.txt: Add JointFeatures.cc to source filesTest (
test/common_test/):detachable_joint.cc: Update test to support kinematic engines that don't have gravity simulationBackground:
TPE is a kinematic physics engine without a built-in constraint solver. Unlike dynamic engines (Dartsim, Bullet), TPE requires manual enforcement of fixed joint constraints during each simulation step. This implementation maintains the relative pose between attached entities by recalculating child poses based on parent poses after each
WorldForwardStep.Test it
Expected: All tests pass for bullet, bullet-featherstone, dartsim, and tpe.
Checklist
Backport Request
Please backport this change to:
Why this should be backported:
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-byandGenerated-bymessages.