Skip to content

Conversation

@jslee02
Copy link
Member

@jslee02 jslee02 commented Dec 12, 2025

Fixes #1657.

This updates dynamics::FreeJoint Jacobian/integration logic to remain consistent when T_parentBodyToJoint and T_childBodyToJoint are non-identity.

  • Fix FreeJoint::integratePositions() to integrate the relative transform (body twist) and solve back for Q, preserving correct motion with offset joint frames.
  • Fix FreeJoint::getRelativeJacobianStatic(positions) to use the passed positions (instead of a cached Jacobian).
  • Ensure setRelativeSpatialVelocity() uses the up-to-date pose-dependent Jacobian; fix updateRelativeJacobianTimeDeriv() for non-identity child joint frames.
  • Add C++ integration coverage: FD world Jacobian + classic-deriv checks (including near-π), pose-change setter regression, and energy conservation checks.
  • Add GUI example free_joint_cases (ImGui) to visualize linear-only/angular-only/both and edge cases, with built-in numeric checks.

Before creating a pull request

  • Run pixi run test-all to lint, build, and test your changes (CI passed; locally ran pixi run lint, pixi run test, pixi run test-py)
  • Add unit tests for new functionality
  • Document new methods and classes
  • Add Python bindings (dartpy) if applicable
@jslee02 jslee02 added this to the DART 7.0 milestone Dec 12, 2025
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.96%. Comparing base (23213c8) to head (f4c9570).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@ ## main #2298 +/- ## ========================================== + Coverage 62.88% 62.96% +0.08%  ========================================== Files 363 363 Lines 33023 33068 +45 Branches 4348 4348 ========================================== + Hits 20766 20822 +56  + Misses 12257 12246 -11 
Flag Coverage Δ
unittests 62.96% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dart/dynamics/FreeJoint.cpp 81.48% <100.00%> (+1.91%) ⬆️
dart/dynamics/FreeJoint.hpp 100.00% <ø> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Use passed positions in getRelativeJacobianStatic - Integrate relative transform and solve back for Q - Fix relative Jacobian time-derivative rotation handling - Add FD Jacobian/Jdot + energy conservation tests - Add free_joint_cases ImGui example
@jslee02
Copy link
Member Author

jslee02 commented Dec 13, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

jslee02 and others added 20 commits December 13, 2025 07:50
CI links gz-physics tests against vendored gtest but can compile with conda-forge gtest headers, causing undefined references to MakeAndRegisterTestInfo(std::string,...). Force-include a small compatibility header in the gz-physics build to forward the std::string overload to the legacy const char* implementation.
- Clamp the initial ImGui window size to the available display area so large --gui-scale values don't push the window off-screen. - Use a scale-specific ImGui window ID so changing --gui-scale doesn't reuse prior saved window geometry. - Add an XY grid visual (toggleable) to improve depth perception in the zero-gravity scene.
- Track the ImGui scale in ImGuiViewer and add getImGuiScale(). - Add ImGuiViewer::setUpViewInWindowScaled() to scale window dimensions. - Update ImGui examples using --gui-scale to call setUpViewInWindowScaled(). - Add missing compatibility header dart/gui/ViewerAttachment.hpp (re-export from Viewer.hpp) so dart/gui/All.hpp builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants