New/fixing derivs benchmarks#110
Open
DVolpi256 wants to merge 192 commits into
Open
Conversation
Has temporary variables for the backward pass as well. Comments are made for new functions that need to be implemented.
…ded some efficiencies after review.
… two unit test files and fixed the resulting type issues.
Need Casadi to add additional terms
Merging to add support for Ubuntu 24 instead of 18
…tives function in testRBDAlgos
… 456 of ClusterTreeDyamics.cpp. The error pertains to a segmentation fault that I believe is related to the usage of the Psi_dot_ term.
…h a finite difference for fixed-base robots.
…finite difference and the other does a complex step. They work well for the double pendulum case. The three link and four link serial chains and Mini Cheetah have larger errors.
…s derivatives tests now pass.
… Cheetah. Examining how to get the complex step working and whether testRigidBodyDynamicsAlgosDerivatives is now broken.
…aking the existing unit tests.
- Reverted src/Dynamics/ClusterTreeDynamics.cpp to e1bf655 - Reverted include/grbda/Utils/OrientationTools.h to e1bf655 - Reverted src/Dynamics/ClusterJoints/FreeJoint.cpp to e1bf655 - Reverted src/Robots/MiniCheetah.cpp to e1bf655 - Reverted UnitTests/testHelpers.hpp to e1bf655 - Modified UnitTests/testInverseDynamicsDerivativesSimple.cpp: - Updated conf_add to use [pos(3), quat(4)] ordering - Use h=1e-6 for floating base (instead of 1e-8) - Use tolerance 1e-5 for floating base tests - Joint.h remains with [pos(3), quat(4)] ordering (e1bf655 baseline) Results: - testInverseDynamicsDerivativesSimple: 4/4 PASSED (including MiniCheetahQuaternion) - testRigidBodyDynamicsAlgosDerivatives: 14/14 PASSED
enableIDDerivativesProfiling/getIDDerivativesProfilingData/resetIDDerivativesProfiling were removed from ClusterTreeModel/ClusterTreeDynamics on this branch. Restore when the profiling infrastructure is re-added. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
clang is not an official dependency and is not installed. gcc supports the same -O3 -march=native flags and works identically for CasADi's shell JIT backend. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…uteTriple - benchmarkIDDerivatives: remove enableIDDerivativesProfiling/printIDDerivativesProfiling calls - benchmarkParallelChainDepth: replace profiling block with zero-initialized fields - benchmarkIDDerivativesScaling: replace dangling t6 reference and triple_results CSV export with disabled stubs - benchmarkComplexJointChains: replace dangling t6/t12 comparison output with disabled stubs All four issues stem from RevoluteTriple sections disabled in a prior commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… output Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TeleopArm uses RevoluteTripleWithRotor which throws in getSdotqd_q, causing an abort when firstOrderInverseDynamicsDerivatives is called. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds back the thread_local profiling accumulators and four free functions (enableIDDerivativesProfiling, getIDDerivativesProfilingData, resetIDDerivativesProfiling, printIDDerivativesProfiling) to ClusterTreeModel.h and ClusterTreeDynamics.cpp. Re-instruments firstOrderInverseDynamicsDerivatives with if(prof_enabled) chrono timestamps at the same six phase boundaries as before: fwd_kin, fwd_casadi, fwd_other, bwd_casadi, bwd_other, bwd_prop. Zero overhead when profiling is disabled. Restores benchmarkIDDerivativesBreakdown.cpp from fixing_derivs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Now that RevoluteTripleWithRotor is backed by Generic<Scalar>, the derivative methods work correctly. Restores: - RevoluteTripleChain<3/6/9> in benchmarkIDDerivativesComparison - TeleopArm in benchmarkIDDerivativesComparison - Full Test 4 (t3..t99) in benchmarkIDDerivativesScaling, including summary t6 output and triple_results CSV export - Full Test 3 (t3..t12) in benchmarkComplexJointChains, including t6/t12 comparison output and per-cluster timing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
| << std::setw(10) << r.fwd_other_us | ||
| << std::setw(10) << r.bwd_casadi_us | ||
| << std::setw(10) << r.bwd_other_us | ||
| << std::setw(10) << r.bwd_prop_us |
Member
There was a problem hiding this comment.
sanity check: can you confirm that the forward part of the graph is grouping the kin and other?
And the backward (noncasadi part) of the graph is ground prop and other?
Contributor
Author
There was a problem hiding this comment.
I added some clarifying documentation. Good catch
Member
pwensing
reviewed
Jun 16, 2026
|
|
||
| printResults(results); | ||
|
|
||
| return 0; |
Member
There was a problem hiding this comment.
We'll need to run this a final time once ready to get the stats for the world frame comparisson.
pwensing
reviewed
Jun 16, 2026
pwensing
reviewed
Jun 16, 2026
…ssary/vestigal code
pwensing
approved these changes
Jun 18, 2026
… file to describe how they should be run
0c55440 to
e332462
Compare
301a490 to
b1941ce
Compare
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.

Added benchmarking unit tests for firstOrderInverseDynamicsDerivatives