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
845 stars 173 forks source link

No to_python (by-value) converter found for C++ type: boost::shared_ptr<crocoddyl::SolverFDDP> #859

Closed edantec closed 4 years ago

edantec commented 4 years ago

When prototyping in Python, I noticed there is no python to C++ binding for a shared pointer of SolverFDDP object. There is one for boost::shared_ptr<crocoddyl::SolverDDP> though.

cmastalli commented 4 years ago

Because we don't need to bind any shared pointer for any solver. The code that you mentioned (for the DDP solver) is indeed not needed.

Are you facing an issue with this?

edantec commented 4 years ago

I have a C++ function which returns a boost::shared_ptr<crocoddyl::SolverFDDP> object, and I have Python bindings for this function. When trying to use this function in Python I encounter the error No to_python (by-value) converter found for C++ type: boost::shared_ptr<crocoddyl::SolverFDDP>. I do not have this error when I change the type from SolverFDDP to SolverDDP in C++.

proyan commented 4 years ago

Are you changing the #include to fddp as well?

On September 27, 2020 1:30:13 PM GMT+02:00, edantec notifications@github.com wrote:

I have a C++ function which returns a boost::shared_ptr<crocoddyl::SolverFDDP> object, and I have Python bindings for this function. When trying to use this function in Python I encounter the error No to_python (by-value) converter found for C++ type: boost::shared_ptr<crocoddyl::SolverFDDP>. I do not have this error when I change the type from SolverFDDP to SolverDDP in C++.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/loco-3d/crocoddyl/issues/859#issuecomment-699622944

edantec commented 4 years ago

Yes, I included #include <crocoddyl/core/solvers/fddp.hpp> but still the same error

cmastalli commented 4 years ago

Yes, I included #include <crocoddyl/core/solvers/fddp.hpp> but still the same error

I don't understand this comment. You get this message when you haven't register a converter. Check out the latest devel branch, it should be solved.

proyan commented 4 years ago

@edantec could you rebase on top of the current devel? #861 should have solved your issue.

cmastalli commented 4 years ago

solved by #861