Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reorganizes GTDynamics factor headers into subsystem-specific directories (kinematics/dynamics/mechanics/statics), updates call sites to the new include paths, and adds new grouped test suites/targets for those subsystems.
Changes:
- Moved/introduced factor headers under
gtdynamics/{kinematics,dynamics,mechanics}/and updated includes across tests and core code. - Added CMake plumbing for subsystem-scoped test groups (
check.kinematics,check.dynamics, etc.) plus new tests under those groups. - Refactored some scenario cost construction to use the new
Mechanicshelper for adding wrench/torque-related factors.
Reviewed changes
Copilot reviewed 39 out of 54 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/testInequalityConstraint.cpp | Update PoseFactor include to new kinematics location. |
| tests/testIERetractor.cpp | Update PoseFactor include to new kinematics location. |
| tests/testIECartPoleWithFriction.cpp | Update PoseFactor include to new kinematics location. |
| tests/testChain.cpp | Update ContactDynamicsMomentFactor include to new dynamics location. |
| tests/testCartPoleWithFriction.cpp | Update PoseFactor include to new kinematics location. |
| tests/CMakeLists.txt | Refactor excludes and add test include directory for root tests. |
| gtdynamics/utils/Trajectory.h | Update PointGoalFactor include to new kinematics location. |
| gtdynamics/utils/JsonSaver.h | Update multiple factor includes to new subsystem locations. |
| gtdynamics/universal_robot/Joint.cpp | Update JointLimitFactor include to new kinematics location. |
| gtdynamics/statics/tests/testStaticWrenchFactor.cpp | Add new unit test for StaticWrenchFactor. |
| gtdynamics/statics/tests/CMakeLists.txt | Add statics test group via gtsamAddTestsGlob. |
| gtdynamics/statics/CMakeLists.txt | Add conditional inclusion of statics tests subdir. |
| gtdynamics/scenarios/IEQuadrupedUtilsCosts.cpp | Switch torque/wrench equivalence factor creation to Mechanics. |
| gtdynamics/mechanics/tests/testWrenchPlanarFactor.cpp | Update include to new mechanics location. |
| gtdynamics/mechanics/tests/testWrenchEquivalenceFactor.cpp | Update include to new mechanics location. |
| gtdynamics/mechanics/tests/testTorqueFactor.cpp | Update include to new mechanics location. |
| gtdynamics/mechanics/tests/CMakeLists.txt | Add mechanics test group via gtsamAddTestsGlob. |
| gtdynamics/mechanics/WrenchPlanarFactor.h | Add/move wrench planar constraint/factor into mechanics module. |
| gtdynamics/mechanics/WrenchEquivalenceFactor.h | Add/move wrench equivalence factor into mechanics module. |
| gtdynamics/mechanics/TorqueFactor.h | Add/move torque factor into mechanics module. |
| gtdynamics/mechanics/MechanicsSlice.cpp | Update includes to new mechanics factor headers. |
| gtdynamics/mechanics/CMakeLists.txt | Add conditional inclusion of mechanics tests subdir. |
| gtdynamics/kinematics/tests/testTwistFactor.cpp | Update include to new kinematics location. |
| gtdynamics/kinematics/tests/testPoseFactor.cpp | Update include to new kinematics location. |
| gtdynamics/kinematics/tests/testPointGoalFactor.cpp | Update include to new kinematics location. |
| gtdynamics/kinematics/tests/testContactKinematicsTwistFactor.cpp | Update include to new kinematics location. |
| gtdynamics/kinematics/tests/testContactHeightFactor.cpp | Update include to new kinematics location. |
| gtdynamics/kinematics/tests/CMakeLists.txt | Add kinematics test group via gtsamAddTestsGlob. |
| gtdynamics/kinematics/TwistFactor.h | Add/move twist factor into kinematics module. |
| gtdynamics/kinematics/PoseFactor.h | Add/move pose factor into kinematics module. |
| gtdynamics/kinematics/PointGoalFactor.h | Add/move point goal factor into kinematics module. |
| gtdynamics/kinematics/KinematicsSlice.cpp | Update includes to new kinematics factor headers. |
| gtdynamics/kinematics/JointLimitFactor.h | Add/move joint limit factor into kinematics module. |
| gtdynamics/kinematics/ContactKinematicsTwistFactor.h | Add/move contact twist constraint/factor into kinematics module. |
| gtdynamics/kinematics/ContactHeightFactor.h | Add/move contact height constraint/factor into kinematics module. |
| gtdynamics/kinematics/CMakeLists.txt | Add conditional inclusion of kinematics tests subdir. |
| gtdynamics/factors/ObjectiveFactors.h | Update PointGoalFactor include to new kinematics location. |
| gtdynamics/factors/ObjectiveFactors.cpp | Update PointGoalFactor include to new kinematics location. |
| gtdynamics/dynamics/tests/testWrenchFactor.cpp | Update include to new dynamics location. |
| gtdynamics/dynamics/tests/testTwistAccelFactor.cpp | Update include to new dynamics location. |
| gtdynamics/dynamics/tests/testContactKinematicsAccelFactor.cpp | Update include to new dynamics location. |
| gtdynamics/dynamics/tests/testContactDynamicsMomentFactor.cpp | Update include to new dynamics location. |
| gtdynamics/dynamics/tests/testContactDynamicsFrictionConeFactor.cpp | Update include to new dynamics location. |
| gtdynamics/dynamics/tests/CMakeLists.txt | Add dynamics test group via gtsamAddTestsGlob. |
| gtdynamics/dynamics/WrenchFactor.h | Add/move wrench balance factor into dynamics module. |
| gtdynamics/dynamics/TwistAccelFactor.h | Add/move twist acceleration factor into dynamics module. |
| gtdynamics/dynamics/DynamicsSlice.cpp | Update includes to new dynamics factor headers. |
| gtdynamics/dynamics/ContactKinematicsAccelFactor.h | Add/move contact acceleration constraint/factor into dynamics module. |
| gtdynamics/dynamics/ContactDynamicsMomentFactor.h | Add/move contact moment constraint/factor into dynamics module. |
| gtdynamics/dynamics/ContactDynamicsFrictionConeFactor.h | Add/move friction cone inequality factor into dynamics module. |
| gtdynamics/dynamics/ChainDynamicsGraph.h | Update includes to new dynamics factor headers. |
| gtdynamics/dynamics/CMakeLists.txt | Add conditional inclusion of dynamics tests subdir. |
| gtdynamics.i | Update wrapped header includes (PoseFactor/WrenchFactor/ContactHeightFactor). |
| README.md | Document grouped test targets and common build/run target patterns. |
Comments suppressed due to low confidence (1)
gtdynamics.i:95
gtdynamics.ideclares a free functiongtsam::NoiseModelFactor* WrenchFactor(...), but there is no corresponding C++ definition in the repo (the onlyWrenchFactorfound returnsNoiseModelFactor::shared_ptringtdynamics/dynamics/WrenchFactor.h). This will break wrapper generation/linking. Either (1) add/restore a C++ overload with this exact signature, or (2) update the interface to wrap the existing shared_ptr-returning function with matching parameter types.
#include <gtdynamics/dynamics/WrenchFactor.h>
gtsam::NoiseModelFactor* WrenchFactor(
const gtsam::noiseModel::Base *cost_model, const gtdynamics::Link *link,
const std::vector<gtsam::Key> wrench_keys, int t = 0,
const std::optional<gtsam::Vector3> &gravity);
varunagrawal
approved these changes
Feb 15, 2026
Contributor
varunagrawal
left a comment
There was a problem hiding this comment.
Thank you. Been wanting to do this restructure for a while but it was too much of a breaking change.
Member
Author
|
Will merge - will add xmake fix in next PR |
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.
Reorganizes GTDynamics factor headers into subsystem-specific directories (kinematics/dynamics/mechanics/statics), updates call sites to the new include paths, and adds new grouped test suites/targets for those subsystems.
See copilot review for detailed changes.