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

hpp-fcl -> coal #37

Merged
merged 16 commits into from
Feb 14, 2025
Merged

hpp-fcl -> coal #37

merged 16 commits into from
Feb 14, 2025

Conversation

nim65s
Copy link
Contributor

@nim65s nim65s commented Dec 13, 2024

Start working on hpp-fcl -> coal transition.

This might require another pass when the same work wil be done in pinocchio, (at least remove the COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL flag).

While here, enable some unittests, enable PTH ruff lint and implement it, and bump pinocchio.

2 tests are currently failing for me with:

======================================================================
FAIL: test_calc (__main__.TestVelocityAvoidance.test_calc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nim/local/agimus/colmpc/tests/test_velocity_avoidance.py", line 178, in test_calc
    self.assertAlmostEqual(
AssertionError: 8.834530107910298 != 8.834353448314038 within 5 places (0.00017665959626000927 difference) : Result missmatch in function ``calc`` between Python and C++implementation!.

======================================================================
FAIL: test_calc_diff_finite (__main__.TestVelocityAvoidance.test_calc_diff_finite)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/nim/local/agimus/colmpc/tests/test_velocity_avoidance.py", line 220, in test_calc_diff_finite
    np.testing.assert_allclose(
  File "/nix/store/5pfnhcknhr42slkqbc6y0q6qwlknsn1b-python3.12-numpy-1.26.4/lib/python3.12/site-packages/numpy/testing/_private/utils.py", line 1504, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
  File "/nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/lib/python3.12/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/nix/store/5pfnhcknhr42slkqbc6y0q6qwlknsn1b-python3.12-numpy-1.26.4/lib/python3.12/site-packages/numpy/testing/_private/utils.py", line 797, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=1e-09, atol=1e-09
Result missmatch in function ``calcDiff`` between C++ implementation and python implementation!.
Mismatched elements: 14 / 14 (100%)
Max absolute difference: 0.0071246
Max relative difference: 0.0059036
 x: array([ 1.236538,  3.745628,  6.082169, -3.663471, -2.296124,  2.476514, -0.346822, -0.079835, -0.178627, -0.31301 ,  0.218428,  0.131093, -0.100388, -0.014509])
 y: array([ 1.236034,  3.741866,  6.075044, -3.662399, -2.294085,  2.473528, -0.347269, -0.079858, -0.17865 , -0.313027,  0.218016,  0.130818, -0.100558, -0.014424])

nim65s added a commit that referenced this pull request Feb 7, 2025
nim65s added a commit that referenced this pull request Feb 10, 2025
@nim65s
Copy link
Contributor Author

nim65s commented Feb 10, 2025

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Feb 10, 2025

rebase

☑️ Nothing to do

  • -conflict [📌 rebase requirement]
  • -closed [📌 rebase requirement]
  • queue-position = -1 [📌 rebase requirement]
  • any of:
    • #commits > 1 [📌 rebase requirement]
    • #commits-behind > 0 [📌 rebase requirement]
    • -linear-history [📌 rebase requirement]

@nim65s
Copy link
Contributor Author

nim65s commented Feb 11, 2025

@Kotochleb : what should we do about this failing test ?

colmpc> ======================================================================
colmpc> FAIL: test_calc (__main__.TestVelocityAvoidance.test_calc)
colmpc> ----------------------------------------------------------------------
colmpc> Traceback (most recent call last):
colmpc>   File "/build/source/tests/test_velocity_avoidance.py", line 178, in test_calc
colmpc>     self.assertAlmostEqual(
colmpc> AssertionError: np.float64(8.834530107910298) != np.float64(8.834353448314038) within 5 places (np.float64(0.00017665959626000927) difference) : Result missmatch in function ``calc`` between Python and C++implementation!.
colmpc> ======================================================================
colmpc> FAIL: test_calc_diff_finite (__main__.TestVelocityAvoidance.test_calc_diff_finite)
colmpc> ----------------------------------------------------------------------
colmpc> Traceback (most recent call last):
colmpc>   File "/build/source/tests/test_velocity_avoidance.py", line 220, in test_calc_diff_finite
colmpc>     np.testing.assert_allclose(
colmpc>   File "/nix/store/xji7f8c2303yjxp4393y7vwj1wlffcnm-python3.12-numpy-2.2.0/lib/python3.12/site-packages/numpy/testing/_private/utils.py", line 1678, in assert_allclose
colmpc>     assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
colmpc>   File "/nix/store/xji7f8c2303yjxp4393y7vwj1wlffcnm-python3.12-numpy-2.2.0/lib/python3.12/site-packages/numpy/testing/_private/utils.py", line 884, in assert_array_compare
colmpc>     raise AssertionError(msg)
colmpc> AssertionError:
colmpc> Not equal to tolerance rtol=1e-09, atol=1e-09
colmpc> Result missmatch in function ``calcDiff`` between C++ implementation and python implementation!.
colmpc> Mismatched elements: 14 / 14 (100%)
colmpc> Max absolute difference among violations: 0.0071246
colmpc> Max relative difference among violations: 0.0059036
colmpc>  ACTUAL: array([ 1.236538,  3.745628,  6.082169, -3.663471, -2.296124,  2.476514, -0.346822, -0.079835, -0.178627, -0.31301 ,  0.218428,  0.131093, -0.100388, -0.014509])
colmpc>  DESIRED: array([ 1.236034,  3.741866,  6.075044, -3.662399, -2.294085,  2.473528, -0.347269, -0.079858, -0.17865 , -0.313027,  0.218016,  0.130818, -0.100558, -0.014424])
colmpc> ----------------------------------------------------------------------

@Kotochleb
Copy link
Collaborator

My wild guess is that default tolerances in Coal were changes since we worked on that. @ArthurH91 could you take a look at it as well?

@nim65s nim65s merged commit 1ef42a4 into main Feb 14, 2025
4 checks passed
@nim65s nim65s deleted the coal branch February 14, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants