Replies: 4 comments
-
Let's do an exercise since it requires a lot modifications. Additionally, let's break this milestone in the three main PRs: one per point that you have mentioned. |
Beta Was this translation helpful? Give feedback.
-
I am planning to start to work in this task. However, before that, I would like to propose a modification of this request. Instead of creating a
This suggestion limits the use to other cases, but I truly believe we don't want to support so many things (we don't have the resources neither motivation). @proyan and @nmansard. I need your support on this decision for starting to work. I am also happy to do not do it, but I don't think we have the resources |
Beta Was this translation helpful? Give feedback.
-
Hi Carlos,
Don't bother, I had already started implementing it. If you need it, I can try to finish it as a priority, but I don't see why you would need this immediately?
…On July 24, 2020 9:29:08 PM GMT+02:00, Carlos Mastalli ***@***.***> wrote:
I am planning to start to work in this task. However, before that, I
would like to propose a modification of this request.
Instead of creating a `cast<scalar>` function, I propose to do
`toCoGen` function. My points are:
- we don't want to support other scalars (already with this single
scalar there is a lot of to be written for each single class in
Crocoddyl)
- there is no need for casting scalars like float or CasADi
Rhis suggestion limits the use to other cases, but I truly believe we
don't want to support so many things (we don't have the resources
neither motivation).
@proyan and @nmansard. I need your support on this decision for
starting to work. I am also happy to do not do it, but I don't think we
have the resources
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#762 (comment)
|
Beta Was this translation helpful? Give feedback.
-
Thanks for taking care. Yes, it is important to me because I want to start with its Python bindings. The objective is to try it within my MPC algorithm written in Python. I am trying to avoid to write it in c++, so I could easily develop in future more advanced ideas. |
Beta Was this translation helpful? Give feedback.
-
This issue is concerned with easy transcription and use of the templated classes in crocoddyl.
We currently need a virtual member function in all classes that can cast the class from one scalar type to another. This would be useful in codegenerating actionmodels. The typical use would be to cast the actionmodel to the CodeGen Scalar Type. So instead of Lines 145-245 in https://github.com/proyan/crocoddyl/blob/topic/codegen2/benchmark/bipedal-with-contact-cg.cpp, we would have the following two lines:
Unfortunately, there are two problems that we face:
cast
function has to be virtual, and thus cannot be templatized. What this means is we need to define a kind of visitor mechanism which visitscast
for a fixed number of Scalar types, which would be predefined somewhere in the code. See https://stackoverflow.com/a/5872633 for full explanation.There are three phases for this task, and they would follow the following order:
a) The point (1) is quite boring, and time consuming.
b) Setting up the visitor mechanism is a bit technical, and is a bit rewarding.
c) Defining the casting function for all classes, which is again boring work.
Beta Was this translation helpful? Give feedback.
All reactions