-
Notifications
You must be signed in to change notification settings - Fork 186
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
Enabling casting in Crocoddyl #1346
base: devel
Are you sure you want to change the base?
Conversation
08b71d3
to
de1bbc2
Compare
b0e96b2
to
4788dc3
Compare
@nim65s -- The doc-coverage job took 300 minutes. I wonder if we are running codegen support in this job. As you can see, adding the casting support increases the compilation time. Do you think this is something we should care about now? |
We can decide to ignore gitlab CI for now, until I finish my work on the new documentation / coverage system and remove the doc-coverage gitlab job. Bui to decide that we can ignore gitlab CI, we need to trust other CI systems I think. Here, conda, nix and ROS are all red. |
All are broken as we need to get merged and deployed the changes I suggest in Pinocchio. |
Activation casting
Cleaned up cast control # This is the commit message #2: Fixed control casting
Fixed residual casting
Fixed cost and constraint casting
…tion of root joint DoF
86d1857
to
d5a2ddf
Compare
…sserts with floats (needed to handle this properly in Pinocchio)
86d6087
to
ca81684
Compare
# Enable ccache automatically if available | ||
find_program(CCACHE_PROGRAM ccache) | ||
if(CCACHE_PROGRAM) | ||
message(STATUS "Using ccache: ${CCACHE_PROGRAM}") | ||
set(CMAKE_C_COMPILER_LAUNCHER | ||
${CCACHE_PROGRAM} | ||
CACHE STRING "C compiler launcher" FORCE) | ||
set(CMAKE_CXX_COMPILER_LAUNCHER | ||
${CCACHE_PROGRAM} | ||
CACHE STRING "C++ compiler launcher" FORCE) | ||
endif() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never a good idea to force the use of ccache
. It should be set using the CMAKE variable directly externally, not internally.
This PR brings a massive effort to enabling casting to
floats
of each Crocoddyl's model class (action, diff-action, residuals, costs, activations, actuation, and costs).It also includes a software infrastructure for Python bindings with multiple scalars and their casting methods. Currently, this PR supports casting to
floats
only. It also doesn't support the casting of solvers or the pair-collision residual yet. I will address the former limitation as soon as possible, while the latter requires effort from Pinocchio developers (see this discussion: stack-of-tasks/pinocchio#2560). The casting methods are also vastly tested, and hopefully, everything is OK.This PR is not breaking the API. However, it is mandatory to support the casting of each Crocoddyl's model class. This can be done easily by
https://github.com/cmastalli/crocoddyl/blob/topic/casting/include/crocoddyl/core/actions/diff-lqr.hpp#L51-L52
https://github.com/cmastalli/crocoddyl/blob/9caec433f30834e3c5b7f3038be1b2fedc9f526e/include/crocoddyl/core/actions/diff-lqr.hxx#L231-L244
Additionally, this PR benchmarks the computational reduction of using
floats
, compared todoubles
. I attached the results below.I am excited about reaching this milestone, reported in #762. However, the technical solution suggested in that thread is not appropriate and feasible.