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

test_ForceDependentSlip failure with libode==0.16.2==*_13 #62

Closed
1 task done
traversaro opened this issue Mar 17, 2024 · 8 comments
Closed
1 task done

test_ForceDependentSlip failure with libode==0.16.2==*_13 #62

traversaro opened this issue Mar 17, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@traversaro
Copy link
Contributor

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

After the new build of libode that uses libccd (see conda-forge/libode-feedstock#22), now the dart's test test_ForceDependentSlip fails, see https://github.com/conda-forge/dartsim-feedstock/pull/61/checks?check_run_id=22760346822 and https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=897543&view=logs&jobId=47084397-e614-5090-05b8-c04ebacb88b9 .

Installed packages

.

Environment info

.
@traversaro traversaro added the bug Something isn't working label Mar 17, 2024
@traversaro
Copy link
Contributor Author

Example failure log:

2024-03-17T21:58:52.3326856Z       Start 34: test_ForceDependentSlip
2024-03-17T21:58:52.6935278Z 34/71 Test #34: test_ForceDependentSlip ...........***Failed    0.36 sec
2024-03-17T21:58:52.7013219Z Running main() from $SRC_DIR/unittests/gtest/src/gtest_main.cc
2024-03-17T21:58:52.7061822Z [==========] Running 2 tests from 1 test case.
2024-03-17T21:58:52.7069568Z [----------] Global test environment set-up.
2024-03-17T21:58:52.7070630Z [----------] 2 tests from ForceDependentSlip
2024-03-17T21:58:52.7102803Z [ RUN      ] ForceDependentSlip.BoxSlipVelocity
2024-03-17T21:58:52.7103255Z [       OK ] ForceDependentSlip.BoxSlipVelocity (222 ms)
2024-03-17T21:58:52.7103572Z [ RUN      ] ForceDependentSlip.CylinderSlipVelocity
2024-03-17T21:58:52.7103874Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:265: Failure
2024-03-17T21:58:52.7104532Z The difference between extForceX * slip and body1->getLinearVelocity().x() is 0.00043832661683589763, which exceeds 1e-4, where
2024-03-17T21:58:52.7104981Z extForceX * slip evaluates to 0.02,
2024-03-17T21:58:52.7105347Z body1->getLinearVelocity().x() evaluates to 0.020438326616835898, and
2024-03-17T21:58:52.7105654Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7105918Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:266: Failure
2024-03-17T21:58:52.7106350Z The difference between 0.0 and body1->getLinearVelocity().y() is 0.005297929413959148, which exceeds 1e-4, where
2024-03-17T21:58:52.7106629Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7107069Z body1->getLinearVelocity().y() evaluates to 0.005297929413959148, and
2024-03-17T21:58:52.7107376Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7107631Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:280: Failure
2024-03-17T21:58:52.7108200Z The difference between 0.0 and body2->getLinearVelocity().y() is 0.001254381120491032, which exceeds 1e-4, where
2024-03-17T21:58:52.7108591Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7109367Z body2->getLinearVelocity().y() evaluates to 0.001254381120491032, and
2024-03-17T21:58:52.7109870Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7110323Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:265: Failure
2024-03-17T21:58:52.7111077Z The difference between extForceX * slip and body1->getLinearVelocity().x() is 0.00035668589428858657, which exceeds 1e-4, where
2024-03-17T21:58:52.7111420Z extForceX * slip evaluates to 0.02,
2024-03-17T21:58:52.7112755Z body1->getLinearVelocity().x() evaluates to 0.020356685894288587, and
2024-03-17T21:58:52.7113109Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7113539Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:266: Failure
2024-03-17T21:58:52.7113959Z The difference between 0.0 and body1->getLinearVelocity().y() is 0.0043113150438673625, which exceeds 1e-4, where
2024-03-17T21:58:52.7114245Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7114716Z body1->getLinearVelocity().y() evaluates to 0.0043113150438673625, and
2024-03-17T21:58:52.7123500Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7123884Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:279: Failure
2024-03-17T21:58:52.7124482Z The difference between mass * accel.x() * slip and spinVel - linVel is 0.00048835745446274004, which exceeds 2e-4, where
2024-03-17T21:58:52.7124812Z mass * accel.x() * slip evaluates to 0.026508948770409546,
2024-03-17T21:58:52.7125413Z spinVel - linVel evaluates to 0.026997306224872286, and
2024-03-17T21:58:52.7126092Z 2e-4 evaluates to 0.00020000000000000001.
2024-03-17T21:58:52.7128069Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:280: Failure
2024-03-17T21:58:52.7128526Z The difference between 0.0 and body2->getLinearVelocity().y() is 0.0013606856166480091, which exceeds 1e-4, where
2024-03-17T21:58:52.7128959Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7135293Z body2->getLinearVelocity().y() evaluates to -0.0013606856166480091, and
2024-03-17T21:58:52.7135836Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7136113Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:265: Failure
2024-03-17T21:58:52.7136553Z The difference between extForceX * slip and body1->getLinearVelocity().x() is 0.00024724163885008962, which exceeds 1e-4, where
2024-03-17T21:58:52.7136863Z extForceX * slip evaluates to 0.02,
2024-03-17T21:58:52.7137190Z body1->getLinearVelocity().x() evaluates to 0.02024724163885009, and
2024-03-17T21:58:52.7137491Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7137751Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:266: Failure
2024-03-17T21:58:52.7138178Z The difference between 0.0 and body1->getLinearVelocity().y() is 0.002784063048611347, which exceeds 1e-4, where
2024-03-17T21:58:52.7138454Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7138773Z body1->getLinearVelocity().y() evaluates to 0.002784063048611347, and
2024-03-17T21:58:52.7139058Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7139330Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:280: Failure
2024-03-17T21:58:52.7139749Z The difference between 0.0 and body2->getLinearVelocity().y() is 0.0012537817663281056, which exceeds 1e-4, where
2024-03-17T21:58:52.7140024Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7140352Z body2->getLinearVelocity().y() evaluates to 0.0012537817663281056, and
2024-03-17T21:58:52.7140643Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7140910Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:265: Failure
2024-03-17T21:58:52.7141340Z The difference between extForceX * slip and body1->getLinearVelocity().x() is 0.00011317467529363065, which exceeds 1e-4, where
2024-03-17T21:58:52.7141740Z extForceX * slip evaluates to 0.02,
2024-03-17T21:58:52.7142074Z body1->getLinearVelocity().x() evaluates to 0.020113174675293631, and
2024-03-17T21:58:52.7142523Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7142787Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:266: Failure
2024-03-17T21:58:52.7143198Z The difference between 0.0 and body1->getLinearVelocity().y() is 0.00050173758912424411, which exceeds 1e-4, where
2024-03-17T21:58:52.7143478Z 0.0 evaluates to 0,
2024-03-17T21:58:52.7143791Z body1->getLinearVelocity().y() evaluates to 0.00050173758912424411, and
2024-03-17T21:58:52.7144088Z 1e-4 evaluates to 0.0001.
2024-03-17T21:58:52.7144350Z $SRC_DIR/unittests/integration/test_ForceDependentSlip.cpp:279: Failure
2024-03-17T21:58:52.7144767Z The difference between mass * accel.x() * slip and spinVel - linVel is 0.00048677195781898774, which exceeds 2e-4, where
2024-03-17T21:58:52.7145078Z mass * accel.x() * slip evaluates to 0.0265112720574745,
2024-03-17T21:58:52.7145401Z spinVel - linVel evaluates to 0.026998044015293488, and
2024-03-17T21:58:52.7145848Z 2e-4 evaluates to 0.00020000000000000001.

@traversaro traversaro changed the title test_ForceDependentSlip test_ForceDependentSlip failure with libode==0.16.2==*_13 Mar 18, 2024
@traversaro
Copy link
Contributor Author

traversaro commented Mar 18, 2024

Wow, this was tricky. At least in 0.16.2, cmake with ccd enable pass the following flags:

-DdLIBCCD_BOX_CYL 
-DdLIBCCD_CAP_CYL 
-DdLIBCCD_CONVEX_BOX 
-DdLIBCCD_CONVEX_CAP 
-DdLIBCCD_CONVEX_CONVEX 
-DdLIBCCD_CONVEX_CYL 
-DdLIBCCD_CONVEX_SPHERE
-DdLIBCCD_CYL_CYL

while compiling with autotools:

-DdLIBCCD_CAP_CYL
-DdLIBCCD_CONVEX_BOX
-DdLIBCCD_CONVEX_CAP
-DdLIBCCD_CONVEX_CONVEX
-DdLIBCCD_CONVEX_CYL
-DdLIBCCD_CONVEX_SPHERE
-DdLIBCCD_CYL_CYL     

The CMake build has an additional -DdLIBCCD_BOX_CYL flag that is not there in autotools. If one pass ODE_WITH_LIBCCD_BOX_CYL=OFF to the CMake build, indeed all dart test work fine.

@jslee02
Copy link
Contributor

jslee02 commented Mar 19, 2024

That's a good catch! I also confirmed that this fixes the same issue on archilinux: build log, tested docker

@traversaro
Copy link
Contributor Author

Ack, thanks! I will align manually cmake and autotools in the conda-forge build, and then open an issue upstream.

@traversaro
Copy link
Contributor Author

By the way, the fact that box-cylinder check is not enable by the enable-ccd autotools flag is documented: https://bitbucket.org/odedevs/ode/src/bcfb66cd5e18e32e27cfaae3651ead930bbcda13/configure.ac#lines-428 .

@traversaro
Copy link
Contributor Author

traversaro commented Mar 19, 2024

Fixed by conda-forge/libode-feedstock#23 in libode==0.16.2=*_14
, upstream issue reported in https://bitbucket.org/odedevs/ode/issues/87/box-cylinder-ccd-check-disabled-by-default .

@jslee02
Copy link
Contributor

jslee02 commented Jun 27, 2024

@traversaro Can this be closed?

@traversaro
Copy link
Contributor Author

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants