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

Code Refactoring on Template Scalar #695

Merged
merged 80 commits into from
Mar 2, 2020
Merged

Conversation

proyan
Copy link
Member

@proyan proyan commented Feb 20, 2020

This PR refactors the code based on the Scalar template.

  1. The tests are passing and are unchanged.
  2. The examples are passing and are unchanged.
  3. The user API is unchanged.
  4. The solvers, the utils and the bindings are unchanged.

This PR follows the issue in #691. This is a big change in the current code structure, and thus I want to make sure that all our partners are well aware of this.

There is no new feature being added in this PR, and this PR only focuses on the code refactoring.

@proyan
Copy link
Member Author

proyan commented Feb 20, 2020

@proyan You have forgotten a lot of noalias.

Thanks for finding those! I haven't looked at the implementation in this PR, this is only the refactoring. The code is exactly the same as before.

@proyan
Copy link
Member Author

proyan commented Feb 21, 2020

CI fails with
virtual memory exhausted: Cannot allocate memory
is this related to stack-of-tasks/pinocchio#1074?

@jcarpent
Copy link
Member

No, it is because the Python bindings of Crocoddyl are not well done!

Copy link
Member

@cmastalli cmastalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main important changes are:

  1. Do not implement methods in hpp file, move them to hxx (activation classes, actuation-full)
  2. Instantiate the multibody classes in crocoddyl/fwd.hpp (if this is not done, I am not sure :))

There are other minor changes to do:

  1. Add vertical skip
  2. Rename typedef to follow standard and avoid general names
  3. Rename MathBaseTpl to EigenS
  4. Add typedef for pinocchio stuffs

@proyan despite that the PR was terrible long, I am happy that you made it the easiest possible.
Thank you so much for this awesome contribution!!!!

Copy link
Member

@cmastalli cmastalli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main important changes are:

  1. Do not implement methods in hpp file, move them to hxx (activation classes, actuation-full)
  2. Instantiate the multibody classes in crocoddyl/fwd.hpp (if this is not done, I am not sure :))

There are other minor changes to do:

  1. Add vertical skip
  2. Rename typedef to follow standard and avoid general names
  3. Rename MathBaseTpl to EigenS
  4. Add typedef for pinocchio stuffs

@proyan despite that the PR was terrible long, I am happy that you made it the easiest possible.
Thank you so much for this awesome contribution!!!!

@proyan
Copy link
Member Author

proyan commented Feb 21, 2020

Thanks for the review Carlos. Unfortunately, I don't agree with many parts of your review.

The main important changes are:

1. Do not implement methods in hpp file, move them to hxx (activation classes, actuation-full)

These are often one line implementations, and it is not really different to have them in hxx files.

2. Instantiate the multibody classes in crocoddyl/fwd.hpp (if this is not done, I am not sure :))

The classes are instantiated.

2. Rename typedef to follow standard and avoid general names

There is no standard or general naming that is followed. I'm sorry but I don't agree with your suggestions.

3. Rename `MathBaseTpl` to `EigenS`

Again, I'm sorry but I don't agree.

4. Add typedef for pinocchio stuffs

Again, I'm sorry but I don't agree, see the comments in review.

@cmastalli
Copy link
Member

cmastalli commented Feb 21, 2020

Thanks for the review Carlos. Unfortunately, I don't agree with many parts of your review.

The main important changes are:

1. Do not implement methods in hpp file, move them to hxx (activation classes, actuation-full)

These are often one line implementations, and it is not really different to have them in hxx files.

2. Instantiate the multibody classes in crocoddyl/fwd.hpp (if this is not done, I am not sure :))

The classes are instantiated.

2. Rename typedef to follow standard and avoid general names

There is no standard or general naming that is followed. I'm sorry but I don't agree with your suggestions.

3. Rename `MathBaseTpl` to `EigenS`

Again, I'm sorry but I don't agree.

4. Add typedef for pinocchio stuffs

Again, I'm sorry but I don't agree, see the comments in review.

The reason of splitting into two files is to boost compilation.

MathBase is very general, that namespace could exist in any package.

Some typedef naming are not following any stile. Having Base is too general and hard to read.

Typedef for pinocchio stuff are not fundamental but they help to read the code. We could skip them for now.

@cmastalli
Copy link
Member

@proyan the code is nice, thanks!

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.

4 participants