SofaDefrost / SoftRobots

This Sofa plugin contains components & method for soft robotics.
GNU Lesser General Public License v3.0
97 stars 57 forks source link

errors for building softrobots plugin #268

Closed Parabolakit closed 8 months ago

Parabolakit commented 8 months ago

In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/PositionModel.h:30, from ../src/SoftRobots/component/constraint/model/PositionModel.inl:33, from ../src/SoftRobots/component/constraint/model/PositionModel.cpp:29: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/UnilateralPlaneConstraint.h:36, from ../src/SoftRobots/component/constraint/UnilateralPlaneConstraint.inl:33, from ../src/SoftRobots/component/constraint/UnilateralPlaneConstraint.cpp:29: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::__cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/CableModel.h:31, from ../src/SoftRobots/component/constraint/CableConstraint.h:33, from ../src/SoftRobots/component/constraint/CableConstraint.inl:30, from ../src/SoftRobots/component/constraint/CableConstraint.cpp:30: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/CableModel.h:31, from ../src/SoftRobots/component/constraint/model/CableModel.inl:33, from ../src/SoftRobots/component/constraint/model/CableModel.cpp:30: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/SurfacePressureModel.h:33, from ../src/SoftRobots/component/constraint/SurfacePressureConstraint.h:33, from ../src/SoftRobots/component/constraint/SurfacePressureConstraint.inl:30, from ../src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp:29: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::__cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/SurfacePressureModel.h:33, from ../src/SoftRobots/component/constraint/model/SurfacePressureModel.inl:34, from ../src/SoftRobots/component/constraint/model/SurfacePressureModel.cpp:31: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.inl:33, from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.cpp:30: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp:30: ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl: In instantiation of ‘void softrobots::forcefield::PREquivalentStiffnessForceField::init() [with DataTypes = sofa::defaulttype::StdRigidTypes<3, double>]’: ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp:39:36: required from here ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl:119:17: warning: ignoring return value of ‘constexpr bool sofa::type::Mat<L, C, Real>::invert(const sofa::type::Mat<L, C, Real>&) [with unsigned int NbLine = 6; unsigned int NbColumn = 6; = void; unsigned int L = 6; unsigned int C = 6; real = double]’, declared with attribute nodiscard [-Wunused-result] 119 | m_CInv[n].invert(m_complianceMat[n]); | ^~ In file included from ../framework/DefaultType/src/sofa/defaulttype/typeinfo/TypeInfo_Mat.h:25, from ../framework/DefaultType/src/sofa/defaulttype/DataTypeInfo.h:35, from ../framework/Core/src/sofa/core/objectmodel/BaseData.h:25, from ../framework/Core/src/sofa/core/objectmodel/Data.h:25, from ../framework/Core/src/sofa/core/objectmodel/Base.h:25, from ../framework/Core/src/sofa/core/objectmodel/BaseContext.h:25, from ../framework/Core/src/sofa/core/objectmodel/BaseObject.h:24, from ../framework/Core/src/sofa/core/behavior/StateAccessor.h:26, from ../framework/Core/src/sofa/core/behavior/BaseForceField.h:26, from ../framework/Core/src/sofa/core/behavior/ForceField.h:25, from ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.h:31, from ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl:30, from ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp:30: ../framework/Type/src/sofa/type/Mat.h:695:34: note: declared here 695 | [[nodiscard]] constexpr bool invert(const Mat<L,C,real>& m) | ^~ In file included from ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp:30: ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl: In instantiation of ‘void softrobots::forcefield::PREquivalentStiffnessForceField::addKToMatrix(sofa::linearalgebra::BaseMatrix, double, unsigned int&) [with DataTypes = sofa::defaulttype::StdRigidTypes<3, double>]’: ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp:39:36: required from here ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl:346:22: error: ‘softrobots::forcefield::PREquivalentStiffnessForceField<sofa::defaulttype::StdRigidTypes<3, double> >::CSRMatB66’ {aka ‘class sofa::linearalgebra::CompressedRowSparseMatrix<sofa::type::Mat<6, 6, double> >’} has no member named ‘wblock’; did you mean ‘wbloc’? 346 | csrMat->wblock(n, n, true) += block kFact; | ~~^~~~ | wbloc ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl:349:22: error: ‘softrobots::forcefield::PREquivalentStiffnessForceField<sofa::defaulttype::StdRigidTypes<3, double> >::CSRMatB66’ {aka ‘class sofa::linearalgebra::CompressedRowSparseMatrix<sofa::type::Mat<6, 6, double> >’} has no member named ‘wblock’; did you mean ‘wbloc’? 349 | csrMat->wblock(n, n + 1, true) += block kFact; | ~~^~~~ | wbloc ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl:352:22: error: ‘softrobots::forcefield::PREquivalentStiffnessForceField<sofa::defaulttype::StdRigidTypes<3, double> >::CSRMatB66’ {aka ‘class sofa::linearalgebra::CompressedRowSparseMatrix<sofa::type::Mat<6, 6, double> >’} has no member named ‘wblock’; did you mean ‘wbloc’? 352 | csrMat->wblock(n + 1, n, true) += block kFact; | ~~^~~~ | wbloc ../src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl:355:22: error: ‘softrobots::forcefield::PREquivalentStiffnessForceField<sofa::defaulttype::StdRigidTypes<3, double> >::CSRMatB66’ {aka ‘class sofa::linearalgebra::CompressedRowSparseMatrix<sofa::type::Mat<6, 6, double> >’} has no member named ‘wblock’; did you mean ‘wbloc’? 355 | csrMat->wblock(n + 1, n + 1, true) += block * kFact; | ~~^~~~ | wbloc In file included from ../src/SoftRobots/component/constraint/model/CableModel.cpp:30: ../src/SoftRobots/component/constraint/model/CableModel.inl: In instantiation of ‘SReal softrobots::constraint::CableModel::getDistanceToTriangle(const Coord&, const Triangle&, softrobots::constraint::CableModel::Coord&) [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3, double>, sofa::type::Vec<3, double>, double>; SReal = double; softrobots::constraint::CableModel::Coord = sofa::type::Vec<3, double>; softrobots::constraint::CableModel::Triangle = sofa::topology::Element]’: ../src/SoftRobots/component/constraint/model/CableModel.cpp:40:36: required from here ../src/SoftRobots/component/constraint/model/CableModel.inl:562:16: warning: unused variable ‘r’ [-Wunused-variable] 562 | const bool r = sofa::geometry::proximity::computeClosestPointOnTriangleToPoint(Vec3(p0), Vec3(p1), Vec3(p2), Vec3(position), projection); | ^ ../src/SoftRobots/component/constraint/model/CableModel.inl: In instantiation of ‘SReal softrobots::constraint::CableModel::getDistanceToTriangle(const Coord&, const Triangle&, softrobots::constraint::CableModel::Coord&) [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::type::Vec<2, double>, sofa::type::Vec<2, double>, double>; SReal = double; softrobots::constraint::CableModel::Coord = sofa::type::Vec<2, double>; softrobots::constraint::CableModel::Triangle = sofa::topology::Element]’: ../src/SoftRobots/component/constraint/model/CableModel.cpp:41:36: required from here ../src/SoftRobots/component/constraint/model/CableModel.inl:562:16: warning: unused variable ‘r’ [-Wunused-variable] make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:154: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/UnilateralPlaneConstraint.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: *** [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:141: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o] Error 1 In file included from ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.cpp:28: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/AffineFunctionModel.h:33, from ../src/SoftRobots/component/constraint/model/AffineFunctionModel.inl:30, from ../src/SoftRobots/component/constraint/model/AffineFunctionModel.cpp:32: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::__cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ In file included from ../src/SoftRobots/component/behavior/SoftRobotsConstraint.h:32, from ../src/SoftRobots/component/constraint/model/PositionModel.h:30, from ../src/SoftRobots/component/constraint/PositionConstraint.h:33, from ../src/SoftRobots/component/constraint/PositionConstraint.inl:30, from ../src/SoftRobots/component/constraint/PositionConstraint.cpp:30: ../src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.h:125:45: error: ‘virtual sofa::type::vector<std::__cxx11::basic_string > softrobots::behavior::SoftRobotsBaseConstraint::getBaseConstraintIdentifiers()’ marked ‘override’, but does not override 125 | virtual sofa::type::vector getBaseConstraintIdentifiers() override final | ^~~~~~~~ make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:76: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:206: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/model/SurfacePressureModel.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:102: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/CableConstraint.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:310: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:89: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/behavior/SoftRobotsConstraint.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:193: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/model/PositionModel.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:167: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/model/AffineFunctionModel.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:128: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/PositionConstraint.cpp.o] Error 1 make[2]: [external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/build.make:180: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/model/CableModel.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:14145: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/all] Error 2 make: *** [Makefile:152: all] Error 2

Parabolakit commented 8 months ago

I have no ideas how to modify the source file to successfully build the plugin.

alxbilger commented 8 months ago

Someone also had the error here: https://github.com/sofa-framework/sofa/discussions/4014#discussioncomment-6404552

You need to have matching versions of SOFA and SoftRobots. See the first warning paragraph in the documentation: https://www.sofa-framework.org/community/doc/plugins/build-a-plugin-from-sources/

Parabolakit commented 8 months ago

Someone also had the error here: sofa-framework/sofa#4014 (reply in thread)

You need to have matching versions of SOFA and SoftRobots. See the first warning paragraph in the documentation: https://www.sofa-framework.org/community/doc/plugins/build-a-plugin-from-sources/

Thanks!!! It works