Home › Forum › SOFA › Building SOFA › [SOLVED] Persistent Contact Plugin Compile Fail
- This topic has 1 reply, 2 voices, and was last updated 9 years, 2 months ago by Duriez.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
1 October 2015 at 22:57 #3723JasonBlocked
Hi Everyone,
I’m trying to compile the persistent contact plugin (Ubuntu 14.04LTS compiling the latest SOFA version in the git repository).
I wonder if I am making a simple mistake.
My compile fails with the following errors:
In file included from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:30:0, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl: In instantiation of ‘void sofa::component::mapping::RigidMapping<TIn, TOut>::updateK(const sofa::core::MechanicalParams*, sofa::core::ConstMultiVecDerivId) [with TIn = sofa::defaulttype::StdRigidTypes<2, float>; TOut = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<2, double>, sofa::defaulttype::Vec<2, double>, double>; sofa::core::ConstMultiVecDerivId = sofa::core::TMultiVecId<(sofa::core::VecType)2u, (sofa::core::VecAccess)0u>]’: /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:87:1: required from here /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:150: error: no matching function for call to ‘crossProductMatrix(sofa::defaulttype::Vec<2, double>&)’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:150: note: candidate is: In file included from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/helper/Quater.h:29:0, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Quat.h:28, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/SolidTypes.h:34, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseContext.h:33, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseObject.h:29, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/BaseMapping.h:32, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/Mapping.h:28, from /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.h:29, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.h:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template<class Real> sofa::defaulttype::Mat<3, 3, real> sofa::defaulttype::crossProductMatrix(const sofa::defaulttype::Vec<3, real1>&) inline defaulttype::Mat<3, 3, Real> crossProductMatrix(const defaulttype::Vec<3, Real>& v) ^ /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template argument deduction/substitution failed: In file included from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:30:0, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:150: note: cannot convert ‘((sofa::component::mapping::RigidMapping<sofa::defaulttype::StdRigidTypes<2, float>, sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<2, double>, sofa::defaulttype::Vec<2, double>, double> >*)this)->sofa::component::mapping::RigidMapping<sofa::defaulttype::StdRigidTypes<2, float>, sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<2, double>, sofa::defaulttype::Vec<2, double>, double> >::rotatedPoints.sofa::helper::vector<sofa::defaulttype::Vec<2, double>, sofa::helper::CPUMemoryManager<sofa::defaulttype::Vec<2, double> > >::<anonymous>.std::vector<_Tp, _Alloc>::operator[]<sofa::defaulttype::Vec<2, double>, std::allocator<sofa::defaulttype::Vec<2, double> > >(((std::vector<sofa::defaulttype::Vec<2, double>, std::allocator<sofa::defaulttype::Vec<2, double> > >::size_type)pointIdx))’ (type ‘sofa::defaulttype::Vec<2, double>’) to type ‘const sofa::defaulttype::Vec<3, double>&’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:83: error: no matching function for call to ‘crossProductMatrix(const sofa::defaulttype::Vec<2, double>&)’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:83: note: candidate is: In file included from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/helper/Quater.h:29:0, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Quat.h:28, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/SolidTypes.h:34, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseContext.h:33, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseObject.h:29, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/BaseMapping.h:32, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/Mapping.h:28, from /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.h:29, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.h:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template<class Real> sofa::defaulttype::Mat<3, 3, real> sofa::defaulttype::crossProductMatrix(const sofa::defaulttype::Vec<3, real1>&) inline defaulttype::Mat<3, 3, Real> crossProductMatrix(const defaulttype::Vec<3, Real>& v) ^ /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template argument deduction/substitution failed: In file included from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:30:0, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:83: note: cannot convert ‘(& childForces)->sofa::helper::vector<sofa::defaulttype::Vec<2, double>, sofa::helper::CPUMemoryManager<sofa::defaulttype::Vec<2, double> > >::<anonymous>.std::vector<_Tp, _Alloc>::operator[]<sofa::defaulttype::Vec<2, double>, std::allocator<sofa::defaulttype::Vec<2, double> > >(((std::vector<sofa::defaulttype::Vec<2, double>, std::allocator<sofa::defaulttype::Vec<2, double> > >::size_type)pointIdx))’ (type ‘const sofa::defaulttype::Vec<2, double>’) to type ‘const sofa::defaulttype::Vec<3, double>&’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl: In instantiation of ‘void sofa::component::mapping::RigidMapping<TIn, TOut>::updateK(const sofa::core::MechanicalParams*, sofa::core::ConstMultiVecDerivId) [with TIn = sofa::defaulttype::StdRigidTypes<2, double>; TOut = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<2, float>, sofa::defaulttype::Vec<2, float>, float>; sofa::core::ConstMultiVecDerivId = sofa::core::TMultiVecId<(sofa::core::VecType)2u, (sofa::core::VecAccess)0u>]’: /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:87:1: required from here /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:150: error: no matching function for call to ‘crossProductMatrix(sofa::defaulttype::Vec<2, float>&)’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:150: note: candidate is: In file included from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/helper/Quater.h:29:0, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Quat.h:28, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/SolidTypes.h:34, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseContext.h:33, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseObject.h:29, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/BaseMapping.h:32, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/Mapping.h:28, from /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.h:29, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.h:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template<class Real> sofa::defaulttype::Mat<3, 3, real> sofa::defaulttype::crossProductMatrix(const sofa::defaulttype::Vec<3, real1>&) inline defaulttype::Mat<3, 3, Real> crossProductMatrix(const defaulttype::Vec<3, Real>& v) ^ /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template argument deduction/substitution failed: In file included from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:30:0, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:150: note: cannot convert ‘((sofa::component::mapping::RigidMapping<sofa::defaulttype::StdRigidTypes<2, double>, sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<2, float>, sofa::defaulttype::Vec<2, float>, float> >*)this)->sofa::component::mapping::RigidMapping<sofa::defaulttype::StdRigidTypes<2, double>, sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<2, float>, sofa::defaulttype::Vec<2, float>, float> >::rotatedPoints.sofa::helper::vector<sofa::defaulttype::Vec<2, float>, sofa::helper::CPUMemoryManager<sofa::defaulttype::Vec<2, float> > >::<anonymous>.std::vector<_Tp, _Alloc>::operator[]<sofa::defaulttype::Vec<2, float>, std::allocator<sofa::defaulttype::Vec<2, float> > >(((std::vector<sofa::defaulttype::Vec<2, float>, std::allocator<sofa::defaulttype::Vec<2, float> > >::size_type)pointIdx))’ (type ‘sofa::defaulttype::Vec<2, float>’) to type ‘const sofa::defaulttype::Vec<3, float>&’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:83: error: no matching function for call to ‘crossProductMatrix(const sofa::defaulttype::Vec<2, float>&)’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:83: note: candidate is: In file included from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/helper/Quater.h:29:0, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Quat.h:28, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/SolidTypes.h:34, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseContext.h:33, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/objectmodel/BaseObject.h:29, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/BaseMapping.h:32, from /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/core/Mapping.h:28, from /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.h:29, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.h:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:28, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template<class Real> sofa::defaulttype::Mat<3, 3, real> sofa::defaulttype::crossProductMatrix(const sofa::defaulttype::Vec<3, real1>&) inline defaulttype::Mat<3, 3, Real> crossProductMatrix(const defaulttype::Vec<3, Real>& v) ^ /home/vagabond/Code/SOFA/sofa/framework/sofa/core/../../sofa/defaulttype/Mat.h:1073:37: note: template argument deduction/substitution failed: In file included from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.inl:30:0, from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentContactRigidMapping.cpp:26: /home/vagabond/Code/SOFA/sofa/SofaBase/../modules/SofaRigid/RigidMapping.inl:741:83: note: cannot convert ‘(& childForces)->sofa::helper::vector<sofa::defaulttype::Vec<2, float>, sofa::helper::CPUMemoryManager<sofa::defaulttype::Vec<2, float> > >::<anonymous>.std::vector<_Tp, _Alloc>::operator[]<sofa::defaulttype::Vec<2, float>, std::allocator<sofa::defaulttype::Vec<2, float> > >(((std::vector<sofa::defaulttype::Vec<2, float>, std::allocator<sofa::defaulttype::Vec<2, float> > >::size_type)pointIdx))’ (type ‘const sofa::defaulttype::Vec<2, float>’) to type ‘const sofa::defaulttype::Vec<3, float>&’ block += defaulttype::crossProductMatrix<Real>( childForces[pointIdx] ) * defaulttype::crossProductMatrix<Real>( rotatedPoints[pointIdx] ); ^ In file included from /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentFrictionContact.cpp:25:0: /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentFrictionContact.inl: In member function ‘void sofa::component::collision::PersistentFrictionContact<TCollisionModel1, TCollisionModel2>::activateConstraint()’: /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentFrictionContact.inl:570:59: error: ‘class sofa::core::collision::DetectionOutput’ has no member named ‘baryCoords’ index1 = this->mapThePersistentContact(o->baryCoords[0], index1, posColpoint, true); ^ /home/vagabond/Code/SOFA/sofa/applications/plugins/PersistentContact/PersistentFrictionContact.inl:594:59: error: ‘class sofa::core::collision::DetectionOutput’ has no member named ‘baryCoords’ index2 = this->mapThePersistentContact(o->baryCoords[1], index2, posColpoint, false); ^
Thank you for your kind help.
-J
22 October 2015 at 10:50 #3813DuriezBlockedHi !
I think that this code (even if very interesting) has not been maintained. We can do the effort to make this code available again. We have a “coding day” the last friday of each month in my team. I can put it in the program of next week.
Let me know if this code how important this code is for you. We can maybe also involve you to help us.
Best regards,
Christian
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.