dojo-sim / Dojo.jl

A differentiable physics engine for robotics
MIT License
309 stars 27 forks source link

MRP Test sometimes fails with slightly violated tolerance #23

Open janbruedigam opened 2 years ago

janbruedigam commented 2 years ago

See for example CI#299 (attempt 1). https://github.com/dojo-sim/Dojo.jl/actions/runs/1972726645/attempts/1

thowell commented 2 years ago

This test has been problematic before and I often have difficulty replicating it locally. The finite-difference and analytical Jacobians should match more closely. Not sure what the best fix for this is...

janbruedigam commented 2 years ago

Maybe a naive question, haven't looked at the tests in detail: Why are we doing finit-diffing and not auto-diffing? Can finite-differences achieve the desired numerical accuracy?

simon-lc commented 2 years ago

I think we started using finite-diff everywhere because it's easier to use than ForwardDiff. Especially when you are dealing with structures or functions that have a fixed element type (say Float64). Forward diff will pass it's own type and the function might break. So this is just for convenience, and I think that most of the tests would work fine with ForwardDiff.