loco-3d / crocoddyl

Crocoddyl is an optimal control library for robot control under contact sequence. Its solver is based on various efficient Differential Dynamic Programming (DDP)-like algorithms
BSD 3-Clause "New" or "Revised" License
854 stars 174 forks source link

Contacts - 6D Loop contacts #1309

Open LudovicDeMatteis opened 2 months ago

LudovicDeMatteis commented 2 months ago

This PR adds a new type of contact to Crocoddyl. We defined loop contacts (i.e. between parts of the robot) with 6D constraints (constraint on the contact frames relative position and orientation)

nim65s commented 1 month ago

An entry in CHANGELOG.md would also be welcome

LudovicDeMatteis commented 1 month ago

Can you provide a test for this, either in C++ or in python ?

Adding new tests to the factory for these contacts is not direct for me, I will provide a python test for now.

LudovicDeMatteis commented 1 month ago

I added a Changelog entry, @nim65s let me know if that is enough

nim65s commented 1 month ago

ref. https://github.com/LudovicDeMatteis/crocoddyl/pull/2

LudovicDeMatteis commented 1 month ago

@nim65s I added unitests in C++ to the PR. I decided to create a different factory for loop contacts as they are quite different from standard contacts. I also cherrypicked a commit from Maxime Sabbah's PR to fix an error in updateForce.

LudovicDeMatteis commented 1 month ago

@Kotochleb most of the code should be fine now, I may have missed or overlook some things though. Let me know if some things should still be changed or if the PR is fine as it is.

LudovicDeMatteis commented 1 month ago

Aside from those very minor changes mentioned in this review, everything appears to be all right. I ran unittests for the code compiled in both Release with -O3 and Release with -O3 -march=native -mavx -mfma. Both cases are passing. The same goes for dynamic memory allocation and and matrix resizing checks from Eigen. If the suggestions will be resolved I will approve the PR

I made these changes @Kotochleb. I compiled in Debug just fine