opensim-org / opensim-models

SimTK OpenSim models (.osim) and related example files that are distributed with OpenSim.
opensim.stanford.edu
61 stars 43 forks source link

Build breaks: error: no member named 'getGroundBody' in 'OpenSim::Model' #121

Closed yurivict closed 4 years ago

yurivict commented 5 years ago

https://github.com/opensim-org/opensim-models/blob/master/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp#L24

In file included from /usr/local/include/OpenSim/Common/Adapters.h:28:
/usr/local/include/OpenSim/Common/CSVFileAdapter.h:38:21: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
    CSVFileAdapter& operator=(CSVFileAdapter&&)      = default;
                    ^
/usr/local/include/OpenSim/Common/CSVFileAdapter.h:32:39: note: move assignment operator of 'CSVFileAdapter' is implicitly deleted because base class
      'DelimFileAdapter<double>' has a deleted move assignment operator
class OSIMCOMMON_API CSVFileAdapter : public DelimFileAdapter<double> {
                                      ^
/usr/local/include/OpenSim/Common/DelimFileAdapter.h:97:23: note: explicitly defaulted function was implicitly deleted here
    DelimFileAdapter& operator=(const DelimFileAdapter&) = default;
                      ^
/usr/local/include/OpenSim/Common/DelimFileAdapter.h:182:23: note: copy assignment operator of 'DelimFileAdapter<double>' is implicitly deleted because field
      '_delimitersRead' has no copy assignment operator
    const std::string _delimitersRead;
                      ^
/usr/ports/science/opensim-core/opensim-models/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp:24:37: error: no member named 'getGroundBody' in
      'OpenSim::Model'
                OpenSim::Body &ground = osimModel.getGroundBody();
                                        ~~~~~~~~~ ^
/usr/ports/science/opensim-core/opensim-models/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp:47:53: error: no member named 'upd_CoordinateSet' in
      'OpenSim::PinJoint'
                CoordinateSet &platformJoints = platformToGround->upd_CoordinateSet();
                                                ~~~~~~~~~~~~~~~~  ^
/usr/ports/science/opensim-core/opensim-models/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp:54:13: error: no member named 'addDisplayGeometry' in
      'OpenSim::Body'
                platform->addDisplayGeometry("box.vtp");
                ~~~~~~~~  ^
/usr/ports/science/opensim-core/opensim-models/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp:55:13: error: no member named 'updDisplayer' in
      'OpenSim::Body'
                platform->updDisplayer()->setScaleFactors(Vec3(1, 0.05, 1));
                ~~~~~~~~  ^
/usr/ports/science/opensim-core/opensim-models/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp:113:1: warning: '/*' within block comment [-Wcomment]
/**/
^
In file included from /usr/ports/science/opensim-core/opensim-models/Tutorials/Building_a_Passive_Dynamic_Walker/DynamicWalkerBuildModel.cpp:3:
In file included from /usr/local/include/OpenSim/OpenSim.h:26:
In file included from /usr/local/include/OpenSim/Common/osimCommon.h:29:
In file included from /usr/local/include/OpenSim/Common/FunctionSet.h:31:
In file included from /usr/local/include/OpenSim/Common/Function.h:33:
In file included from /usr/local/include/simbody/SimTKmath.h:27:
In file included from /usr/local/include/simbody/SimTKcommon.h:38:
/usr/local/include/simbody/SimTKcommon/internal/MeasureImplementation.h:551:16: warning: binding dereferenced null pointer to reference has undefined behavior
      [-Wnull-dereference]
        return *reinterpret_cast<T*>(0);
               ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/simbody/SimTKcommon/internal/MeasureImplementation.h:612:14: note: in instantiation of member function 'SimTK::Measure_<SimTK::Vector_<double>
      >::Implementation::getUncachedValueVirtual' requested here
    explicit Implementation(const T& value) 
             ^
/usr/local/include/simbody/SimTKcommon/internal/Measure.h:346:25: note: in instantiation of member function 'SimTK::Measure_<SimTK::Vector_<double>
      >::Constant::Implementation::Implementation' requested here
    :   Measure_<T>(new Implementation(value)) {}
                        ^
/usr/local/include/simbody/SimTKcommon/internal/MeasureImplementation.h:649:5: note: in instantiation of member function 'SimTK::Measure_<SimTK::Vector_<double>
      >::Constant::Constant' requested here
:   Constant(Vector(size, Real(0))) {}
    ^
^Cgmake[2]: *** [CMakeFiles/DynamicWalkerBuild.dir/build.make:63: CMakeFiles/DynamicWalkerBuild.dir/DynamicWalkerBuildModel.cpp.o] Interrupt
gmake[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/DynamicWalkerBuild.dir/all] Interrupt
gmake: *** [Makefile:84: all] Interrupt
yurivict commented 5 years ago

@jimmyDunne

Hi Jimmy,

Maybe you could fix the testcases so that they would work with the latest OpenSim master?

I tried to find at least one working testcase and they all are broken.

The other one I tried is this:

$ opensim-cmd run-tool analyzePointKinematicsPendulum.xml
Preparing to run AnalyzeTool.
No model file was specified (<model_file> element is empty) in the Tool's Setup file. Consider passing `false` for the constructor's `aLoadModel` parameter
    In Object 'double_pendulum' of type AnalyzeTool.
    Thrown at AbstractTool.cpp:388 in loadModel().

Thank you! Yuri