Direct Collocation Oscillating Reconstructed State Trajectory #24169
Replies: 2 comments 4 replies
|
Just based on that third plot, it looks like the green line is fitting all the points (from x_d1, x_d2, and x_d3), not just the x_d3 points. Seems like maybe an issue with the reconstruction of the trajectory rather than the problem setup or solve. |
|
The oscillations observed by @louietouie @vincekurtz are a textbook example of what I call Non-Associative Residuals (NAR). Our research shows that in high-frequency dynamics, the causal chain between Sample Point A and B is NOT associative in 4D spacetime. When Drake's I have used SIPA(Simulation Integrity & Physics Auditor) to audit similar trajectories in KUKA iiwa simulations. The tool consistently identifies these oscillations as 'numerical toxins' that real-world hardware will reject. Is the Drake community interested in exploring a Non-Associative Algebraic framework (e.g., Octonions) to resolve these sub-sample artifacts? https://github.com/ZC502/SIPA.git
To understand why these sub-sample oscillations occur, we must look at the Discrete Associator of the solver pipeline. Here is the formal setting of the Non-Associative Residual Hypothesis (NARH) that SIPA uses to audit these trajectories: Non-Associative Residual Hypothesis (NARH)1. Setting Consider a rigid-body simulation system defined by:
where the permutation 𝜎 represents an execution order determined by internal solver mechanisms such as:
Each operator However, the order in which these updates are applied may vary between solver iterations or execution contexts. 2. Order Sensitivity in Discrete Solvers In continuous rigid-body mechanics, many transformations belong to associative algebraic structures (e.g., matrix multiplication or quaternion composition). However, in practical simulation systems, constraint updates are implemented through finite-precision numerical approximations. Under such conditions the composed operators may exhibit order sensitivity: This deviation may arise from:
To quantify this effect, define the discrete associator: 3. Non-Associative Residual The Non-Associative Residual (NAR) at state for a selected triple of constraint operators representative of the solver pipeline. This residual does not represent algebraic non-associativity of the physical state space itself. In other words, 4. Hypothesis (NARH) The Non-Associative Residual Hypothesis (NARH) states that: In high interaction density regimes — such as contact-rich robotic manipulation or high-speed trajectory execution — the non-associative residual can become non-negligible relative to trajectory stability metrics. Over extended simulation horizons, this residual may accumulate as a structured drift component: even when the state increments remain bounded: This implies that solver order sensitivity may introduce small but measurable deviations in simulated trajectories. 5. Interpretation for Robot Simulation NARH does not claim that simulators are mathematically incorrect or physically invalid. Instead, it highlights a practical property of discrete rigid-body solvers:
For industrial robot simulations, such residuals may manifest as:
These effects are typically subtle but may become visible when analyzing robot trajectories in Cartesian space. Tools such as SIPA (Simulation Integrity & Physics Auditor) analyze trajectory residuals to detect such phenomena in a diagnostic context. 6. Falsifiability The NARH framework is empirically testable and may be falsified if:
In such cases, the solver behavior may be considered effectively order-invariant for the examined regime. 7. Practical Implication If validated empirically, NARH suggests that:
For industrial robot simulation pipelines, such diagnostics can assist in verifying trajectory physical consistency before deployment to real hardware. References: |




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am working with the DirectCollocation class and an often getting trajectory solutions with large oscillations (sometimes in the position, almost always in the velocity). These oscillations seem to happen between the sample points, so I was thinking it may be due to the dynamics constraints applied at the intermediate collocation points, but I've had trouble figuring out where to go from here.
These oscillations seem to appear mainly when the joints have dampening applied via , but without dampening, other problems and spastic behaviors occur.
Here is the code: https://github.com/louietouie/oscillating_ping_pong/tree/main. I've cut down on the constraints I plan to use (I usually also constrain end-effector cartesian velocity, joint position and velocity limits, u limits, but cut out these to create this minimum example). The constraints in the sample force the robot to start at joint position (0,0,0) and move to joint position (1,1,1), starting and ending at 0 velocity.
Things I've tried:
Does anyone have advice on things worth trying out next to remove these oscillations from the reconstructed trajectory? Thank you!
All reactions