Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize the functional APIs and replace the OOP classes #108

Merged
merged 172 commits into from
Mar 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
688664b
Remove existing tests of OOP APIs
diegoferigo Mar 12, 2024
1b506de
Add a pytest fixture to generate a PRNG key
diegoferigo Mar 8, 2024
ff02a33
Add fixture to parameterize tests over all velocity representations
diegoferigo Mar 8, 2024
d70568c
Add session-wide fixtures to provide tested models
diegoferigo Mar 8, 2024
020ff88
Add collections of tested models
diegoferigo Mar 8, 2024
43fa2f9
Add tests of jaxsim.api.data module
diegoferigo Mar 8, 2024
5cdd914
Add test of jaxsim.api.joint module
diegoferigo Mar 8, 2024
446369a
Add test of jaxsim.api.link module
diegoferigo Mar 8, 2024
d95b589
Add test of jaxsim.api.model module
diegoferigo Mar 8, 2024
29ec058
Add methods to wrapper utils_idyntree.KinDynComputations
diegoferigo Mar 12, 2024
9b49549
Add other iDynTree testing helpers
diegoferigo Mar 8, 2024
97e54d6
Add test to check automatic differentiation of algorithms
diegoferigo Mar 8, 2024
b977b92
Fix random generation of JaxSimModelData for fixed-base models
diegoferigo Mar 8, 2024
8314788
Fix random generation of JaxSimModelData for jointless models
diegoferigo Mar 11, 2024
ccc3473
Fix api.joint.name_to_idx
diegoferigo Mar 8, 2024
0932028
Fix ABA in Mixed representation for fixed-base models
diegoferigo Mar 8, 2024
c234320
Fix ABA when inputs are passed
diegoferigo Mar 11, 2024
196426c
Fix computation of bias forces for fixed-base models
diegoferigo Mar 8, 2024
5eeda35
Rename Heun integrator to Heun2
diegoferigo Mar 8, 2024
f4563bf
Fix ForwardEuler integrator
diegoferigo Mar 8, 2024
b81bc1d
Fix shape correction of the Butcher tableau b parameter
diegoferigo Mar 11, 2024
945f04b
Fix non-jit execution of RBDAs for models with no joints
diegoferigo Mar 8, 2024
1b35ea2
Fix collidable_points_pos_vel for models with no collidable points
diegoferigo Mar 11, 2024
d7f1317
Remove pytest-forked
diegoferigo Mar 8, 2024
9612045
Require updated version of the rod dependency
diegoferigo Mar 11, 2024
e96595b
Fix joint.position_limit for jointless models
diegoferigo Mar 11, 2024
7a4e1ce
Fix cast of gc.body in api.ode
diegoferigo Mar 11, 2024
75cd229
Do not raise in simulation.utils.check_valid_shape
diegoferigo Mar 11, 2024
c7c8644
Increase tolerance in test of reduced CoM position
diegoferigo Mar 11, 2024
866a6e3
Update api.__init__.py
diegoferigo Mar 11, 2024
2b4c2c5
Add again support for latest jax and jaxlib
diegoferigo Mar 11, 2024
6397446
Install Gazebo Sim instead of Gazebo Classic in CI
diegoferigo Mar 11, 2024
67486e0
Add test of jit compiling functions taking JaxSimModel as input
diegoferigo Mar 12, 2024
5dcfeb9
Use ordered split keys in random data generation
diegoferigo Mar 12, 2024
a54bfae
Do not alter during runtime Butcher tableau coefficients
diegoferigo Mar 12, 2024
795df2b
Merge pull request #106 from ami-iit/functional_tests
diegoferigo Mar 12, 2024
6af0f84
Add KinDynParameters class
diegoferigo Mar 11, 2024
ef49d90
Add JointModel class
diegoferigo Mar 6, 2024
3179a80
Update JaxSimModel to store KinDynParameters
diegoferigo Mar 12, 2024
6b7f0bf
Uniform imports of jaxsim.api package
diegoferigo Mar 11, 2024
cae2d6e
Import KinDynParameters into jaxsim.api package
diegoferigo Mar 11, 2024
c153917
Update api.joint to use KinDynParameters instead of PhysicsModel
diegoferigo Mar 12, 2024
e3b5816
Update api.link to use KinDynParameters instead of PhysicsModel
diegoferigo Mar 12, 2024
57875b6
Add missing docstrings
diegoferigo Mar 12, 2024
67d2d12
Update dataclass properties of JaxSimModel attributes
diegoferigo Mar 12, 2024
d7466e5
Build KinDynParameters from parsed ModelDescription
diegoferigo Mar 13, 2024
9eaeac1
Add HashlessObject class
diegoferigo Mar 12, 2024
6e2a2e1
Store ModelDescription directly inside JaxSimModel
diegoferigo Mar 12, 2024
20a77c2
Update GroundContact class
diegoferigo Mar 12, 2024
4bfc629
Store ContactParameters inside KinDynParameters
diegoferigo Mar 12, 2024
85d432a
Propagate axes change of GroundContact
diegoferigo Mar 12, 2024
87c47c6
Define DoFs of base link
diegoferigo Mar 13, 2024
756b69f
Update api.ode to use KinDynParameters instead of PhysicsModel
diegoferigo Mar 14, 2024
7b6a88b
Apply suggestions from code review
diegoferigo Mar 14, 2024
1dbd1c8
Merge pull request #101 from ami-iit/feature/kin_dyn_parameters
diegoferigo Mar 14, 2024
53b801e
Update soft_contacts to use KinDynParameters instead of PhysicsModel
diegoferigo Mar 14, 2024
bebb581
Prepare transition to jaxsim.api from jaxsim.{high_level|physics}
diegoferigo Mar 14, 2024
58ada61
Update PhysicsModel{Input|State}, ODE{Input|State}, SoftContactsState
diegoferigo Mar 14, 2024
3d54ee8
Use new builder methods of ODEState and ODEInput
diegoferigo Mar 14, 2024
7426bcb
Introduce and propagate StandardGravity
diegoferigo Mar 14, 2024
3ad74e2
Disable some exception while tracing
diegoferigo Mar 14, 2024
a1fac84
Move rigid-body dynamics algorithms to jaxsim.rbda package
diegoferigo Mar 18, 2024
0c1170e
Move terrain definitions to jaxsim.terrain package
diegoferigo Mar 14, 2024
1967b7b
Move data structures to jaxsim.api.ode_data
diegoferigo Mar 18, 2024
05f2fa0
Update AD test
diegoferigo Mar 14, 2024
d0e7298
Import math resources in parent package
diegoferigo Mar 18, 2024
5b8594c
Update rbda.utils.process_inputs to new APIs
diegoferigo Mar 18, 2024
802e3c3
Add model.link_spatial_inertia_matrices
diegoferigo Mar 18, 2024
3227144
Compute tree transforms considering also the base pose
diegoferigo Mar 18, 2024
b8c2a87
Update ABA formulation to new APIs
diegoferigo Mar 18, 2024
f4f58a9
Normalize quaternion in JaxSimModelData.base_orientation
diegoferigo Mar 18, 2024
9ce2e20
Fix AD test with normalized quaternions
diegoferigo Mar 18, 2024
99f2353
Normalize quaternion before computing its derivative
diegoferigo Mar 18, 2024
8db9c57
Update CRBA formulation to new APIs
diegoferigo Mar 18, 2024
2c13931
Update FK to new APIs
diegoferigo Mar 18, 2024
7c86c4a
Update RNEA to new APIs
diegoferigo Mar 18, 2024
fd76844
Update Jacobian to new APIs
diegoferigo Mar 18, 2024
507167a
Update test_ad_integration
diegoferigo Mar 18, 2024
ef51c17
Normalize quaternion also in RK stages of SO(3) integrators
diegoferigo Mar 18, 2024
0e7eec7
Update SoftContacts to new APIs
diegoferigo Mar 18, 2024
2e7c50f
Minor updates of soft contacts algorithm
diegoferigo Mar 18, 2024
93985fb
Remove deprecated PhysicsModel from JaxSimModel
diegoferigo Mar 18, 2024
5cf468b
Remove unused methods from PhysicsModelState
diegoferigo Mar 18, 2024
b1d6755
Update import in api.references
diegoferigo Mar 18, 2024
e5ce67a
Move GroundContact to kin_dyn_parameters.ContactParams
diegoferigo Mar 18, 2024
1b4a528
Transpose the tangential deformation to have the points as first axis
diegoferigo Mar 18, 2024
900ea0d
Move StandardGravity to jaxsim.math
diegoferigo Mar 18, 2024
ca32a7e
Merge pull request #112 from ami-iit/transition_to_functional
diegoferigo Mar 19, 2024
ace54c6
Make mutability check in JaxsimDataclass.mutable_context stricter
diegoferigo Mar 21, 2024
0fcaede
Update typing of context managers
diegoferigo Mar 21, 2024
dc3119a
Do not automatically copy replaced fields
diegoferigo Mar 21, 2024
7f9b33a
Add explicit flatten_fn and unflatten_fn
diegoferigo Mar 21, 2024
41166b8
Minor enhancement in editable method
diegoferigo Mar 21, 2024
adf63b0
Update mutability handling
diegoferigo Mar 21, 2024
6f0343c
Add docstrings
diegoferigo Mar 21, 2024
2ca7bd8
Add JaxsimDataclass.check_compatibility helper
diegoferigo Mar 21, 2024
83fa95c
JaxsimDataclass.replace returns a shallow copy of the original object
diegoferigo Mar 21, 2024
eb4bc01
Merge pull request #116 from ami-iit/improve_jaxsim_dataclass
diegoferigo Mar 22, 2024
897197c
Add base class of embedded Runge-Kutta schemes
diegoferigo Mar 21, 2024
9dbbb17
Add HeunEulerSO3 and BogackiShampineSO3 variable-step integrators
diegoferigo Mar 20, 2024
b0a4a30
Fix conversion to nanoseconds in ode closure
diegoferigo Mar 21, 2024
ed4c6ff
Fix Butcher tableau of Heun integrator
diegoferigo Mar 20, 2024
6d91fc5
Introduce different stages to initialize integrators
diegoferigo Mar 20, 2024
b177ead
Add Quaternion.integration to integrate quaternions on SO(3)
diegoferigo Mar 21, 2024
1d2049f
Integrate quaternions in SO(3) also in RK stages
diegoferigo Mar 21, 2024
f8aaa7c
Move ExplicitRungeKuttaSO3Mixin to integrators.common
diegoferigo Mar 21, 2024
a5be7b4
Merge pull request #115 from ami-iit/variable_step_integrators
diegoferigo Mar 22, 2024
7f4cb56
Update imports
diegoferigo Mar 22, 2024
3a6906e
Fix check in data
diegoferigo Mar 22, 2024
53be994
Move functions related to CoM to new jaxsim.api.com module
diegoferigo Mar 22, 2024
16d996c
Add new test for api.com module
diegoferigo Mar 22, 2024
8f8888b
Add new methods to iDynTree wrapper
diegoferigo Mar 22, 2024
44e3dfa
Add api.link.velocity
diegoferigo Mar 22, 2024
d874908
Add api.link.velocity test
diegoferigo Mar 22, 2024
c86484e
Update api.link with minor changes and docstrings
diegoferigo Mar 22, 2024
763d664
Update api.model with minor changes
diegoferigo Mar 22, 2024
f36f7a2
Add model.total_momentum_jacobian
diegoferigo Mar 22, 2024
736b1a1
Add model.locked_spatial_inertia
diegoferigo Mar 22, 2024
ae81cfe
Add com.locked_centroidal_spatial_inertia
diegoferigo Mar 22, 2024
c3e0457
Add com.centroidal_momentum_jacobian
diegoferigo Mar 26, 2024
4f22a3e
Add com.centroidal_momentum
diegoferigo Mar 22, 2024
d8bc720
Add com.average_centroidal_velocity_jacobian
diegoferigo Mar 22, 2024
a2f891c
Add com.average_centroidal_velocity
diegoferigo Mar 26, 2024
5fb9e17
Add com.com_linear_velocity
diegoferigo Mar 26, 2024
83b28bc
Add model.average_velocity_jacobian
diegoferigo Mar 22, 2024
8fd3f1a
Add model.average_velocity
diegoferigo Mar 22, 2024
82a8f8f
Test new api.model functions
diegoferigo Mar 22, 2024
957caa8
Test new api.com functions
diegoferigo Mar 26, 2024
5d74bfb
Add math.transform module
diegoferigo Mar 22, 2024
6837a79
Add Adjoint.from_transform method
diegoferigo Mar 22, 2024
d0e3b85
Add contact.collidable_point_dynamics
diegoferigo Mar 22, 2024
89a813f
Add contact.collidable_point_forces
diegoferigo Mar 22, 2024
680a343
Add model.link_contact_forces
diegoferigo Mar 22, 2024
45d37b0
Update ode.system_velocity_dynamics to use new contact function
diegoferigo Mar 22, 2024
e1c9175
Merge pull request #117 from ami-iit/extend_functional_apis
diegoferigo Mar 26, 2024
f123b57
Add support for randomizing standard_gravity in random_model_data
diegoferigo Mar 26, 2024
154e3b8
Update JaxsimDataclass.replace method to use dataclasses.replace
diegoferigo Mar 26, 2024
43587dc
Fix wrap_system_dynamics_for_integration
diegoferigo Mar 26, 2024
6e5779d
Fix `api.contact.in_contact`
flferretti Mar 26, 2024
48328e8
Cast RBDA inputs to float
diegoferigo Mar 26, 2024
ba073e3
Make SoftContactsParams inherit fro JaxsimDataclass
diegoferigo Mar 26, 2024
227ed00
Add integrator_kwargs argument to api.model.step
diegoferigo Mar 26, 2024
6128860
Allow reducing a model and remove all joints
diegoferigo Mar 26, 2024
dd0d00b
Address review
flferretti Mar 26, 2024
074012c
Add new jacobian_full_doubly_left RBDA
diegoferigo Mar 26, 2024
31ee91f
Merge pull request #119 from ami-iit/flferretti-patch-1
flferretti Mar 26, 2024
535fe70
Update model.generalized_free_floating_jacobian to use the doubly-left
diegoferigo Mar 26, 2024
18f9553
Update link.jacobian to use the new doubly-left jacobian
diegoferigo Mar 26, 2024
ecdf60c
Merge pull request #121 from ami-iit/optimize_jacobian_algo
diegoferigo Mar 27, 2024
b65fa47
Update docstrings of JointModel
diegoferigo Mar 26, 2024
075ea39
Fix error in KynDynParameters.set_link_inertia
diegoferigo Mar 26, 2024
782c8b0
Add JointParameters.index
diegoferigo Mar 26, 2024
ee387bc
Add LinkParameters.index
diegoferigo Mar 26, 2024
869c7a8
Create a dummy JointParameters for joint-less models
diegoferigo Mar 26, 2024
b8c4d78
Move creation of contact parameters
diegoferigo Mar 26, 2024
cc6939f
Propagate missing base transform argument
diegoferigo Mar 26, 2024
fbd98cb
Minor changes with docstring and comments updates
diegoferigo Mar 26, 2024
ae7cc6d
Update hash computation
diegoferigo Mar 27, 2024
43a4aed
Merge pull request #120 from ami-iit/enhance_parametric_models
diegoferigo Mar 27, 2024
729b126
Remove jaxsim.simulation package
diegoferigo Mar 27, 2024
58f2890
Remove jaxsim.physics package
diegoferigo Mar 27, 2024
eca753d
remove jaxsim.high_level package
diegoferigo Mar 27, 2024
ed10470
Remove unused modules from jaxsim.math package
diegoferigo Mar 27, 2024
14e99b5
Remove unused modules from jaxsim.utils
diegoferigo Mar 27, 2024
1635366
Merge pull request #123 from ami-iit/remove_oop_and_unused_code
diegoferigo Mar 27, 2024
8ea1a0b
Avoid unhashable args in `contact.in_contact`
flferretti Mar 27, 2024
0968790
Allow importing `Self` from `typing_extensions`
flferretti Mar 27, 2024
0aa153d
Rename external_forces to link_forces
diegoferigo Mar 28, 2024
7220b7a
Remove unused jaxsim.math.joint
diegoferigo Mar 28, 2024
569afdc
Unify ε definition used to compute finite differences in AD test
diegoferigo Mar 28, 2024
07e4642
Use default tolerance in integration AD test with SO(3) integrators
diegoferigo Mar 28, 2024
2b353d1
Test AD of soft contacts model also including its parameters
diegoferigo Mar 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update hash computation
  • Loading branch information
diegoferigo committed Mar 27, 2024
commit ae7cc6d72bfaedf94587843b2472c457107ae5c3
11 changes: 6 additions & 5 deletions src/jaxsim/api/kin_dyn_parameters.py
Original file line number Diff line number Diff line change
@@ -213,12 +213,13 @@ def __eq__(self, other: KynDynParameters) -> bool:

def __hash__(self) -> int:

h = 0
h += hash(self.number_of_links())
h += hash(self.number_of_joints())
h += hash(tuple(self.parent_array.tolist()))
h = (
hash(self.number_of_links()),
hash(self.number_of_joints()),
hash(tuple(self.parent_array.tolist())),
)

return h
return hash(h)

# =============================
# Helpers to extract parameters
Loading