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

Add new test suite of functional APIs #106

Merged
merged 35 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 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
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
Add fixture to parameterize tests over all velocity representations
  • Loading branch information
diegoferigo committed Mar 12, 2024
commit ff02a33164d64a6a0881a438067be0688a3ac8aa
20 changes: 20 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

import jax
import pytest
import jaxsim


def pytest_configure() -> None:
@@ -33,3 +34,22 @@ def prng_key() -> jax.Array:

pytest.prng_key, subkey = jax.random.split(pytest.prng_key, num=2)
return subkey


@pytest.fixture(
scope="function",
params=[
pytest.param(jaxsim.VelRepr.Inertial, id="inertial"),
pytest.param(jaxsim.VelRepr.Body, id="body"),
pytest.param(jaxsim.VelRepr.Mixed, id="mixed"),
],
)
def velocity_representation(request) -> jaxsim.VelRepr:
"""
Parametrized fixture providing all supported velocity representations.

Returns:
A velocity representation.
"""

return request.param