ObservedPointFitter.h
Go to the documentation of this file.00001 #ifndef SimTK_SIMBODY_OBSERVED_POINT_FITTER_H_
00002 #define SimTK_SIMBODY_OBSERVED_POINT_FITTER_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "SimTKcommon.h"
00036 #include "simbody/internal/common.h"
00037 #include "simbody/internal/MultibodySystem.h"
00038
00039 namespace SimTK {
00040
00053 class SimTK_SIMBODY_EXPORT ObservedPointFitter {
00054 public:
00060 static Real findBestFit(const MultibodySystem& system, State& state, const std::vector<MobilizedBodyIndex>& bodyIxs, const std::vector<std::vector<Vec3> >& stations, const std::vector<std::vector<Vec3> >& targetLocations, Real tolerance=0.001);
00061
00076 static Real findBestFit(const MultibodySystem& system, State& state, const std::vector<MobilizedBodyIndex>& bodyIxs, const std::vector<std::vector<Vec3> >& stations, const std::vector<std::vector<Vec3> >& targetLocations, const std::vector<std::vector<Real> >& weights, Real tolerance=0.001);
00077 private:
00078 static void createClonedSystem(const MultibodySystem& original, MultibodySystem& copy, const std::vector<MobilizedBodyIndex>& originalBodyIxs, std::vector<MobilizedBodyIndex>& copyBodyIxs);
00079 static void findUpstreamBodies(MobilizedBodyIndex currentBodyIx, const std::vector<int> numStations, const SimbodyMatterSubsystem& matter, std::vector<MobilizedBodyIndex>& bodyIxs, int requiredStations);
00080 static void findDownstreamBodies(MobilizedBodyIndex currentBodyIx, const std::vector<int> numStations, const std::vector<std::vector<MobilizedBodyIndex> > children, std::vector<MobilizedBodyIndex>& bodyIxs, int& requiredStations);
00081 static int findBodiesForClonedSystem(MobilizedBodyIndex primaryBodyIx, const std::vector<int> numStations, const SimbodyMatterSubsystem& matter, const std::vector<std::vector<MobilizedBodyIndex> > children, std::vector<MobilizedBodyIndex>& bodyIxs);
00082 class OptimizerFunction;
00083 };
00084
00085 }
00086
00087 #endif // SimTK_SIMBODY_OBSERVED_POINT_FITTER_H_