NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
BigPuppySpineOnlyStats.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012, United States Government, as represented by the
3  * Administrator of the National Aeronautics and Space Administration.
4  * All rights reserved.
5  *
6  * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
7  * under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * http://www.apache.org/licenses/LICENSE-2.0.
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific language
16  * governing permissions and limitations under the License.
17 */
18 
19 #ifndef BIGPUPPY_SPINEONLY_STATS_H
20 #define BIGPUPPY_SPINEONLY_STATS_H
21 
31 #include "BaseQuadModelLearning.h"
32 
33 // This library
34 #include "core/tgModel.h"
35 #include "core/tgSubject.h"
36 // The C++ Standard Library
37 #include <map>
38 #include <set>
39 #include <string>
40 #include <vector>
41 
43 class tgWorld;
44 class tgStructure; //Do I need this, or tgStructureInfo?
45 class tgStructureInfo; //Do I need this, or just tgStructure, or both?
46 class tgBasicActuator;
47 
48 class BigPuppySpineOnlyStats: public BaseQuadModelLearning //public tgSubject<BigPuppy>, public tgModel
49 {
50 public:
51 
52  BigPuppySpineOnlyStats(int segments, int hips);
53 
54  virtual ~BigPuppySpineOnlyStats();
55 
64  virtual void setup(tgWorld& world);
65 
70  virtual void teardown();
71 
76  virtual void step(double dt);
77 
78  //std::vector<double> getCOM(const int n) const;
79 
80 private:
81 
90  //void addNodesFoot(tgStructure& s, double r1, double r2);
91 
97  //static void addRodsFoot(tgStructure& s);
98 
106  //void addNodesLeg(tgStructure& s, double r);
107 
113  //static void addRodsLeg(tgStructure& s);
114 
122  void addNodesHip(tgStructure& s, double r);
123 
129  static void addRodsHip(tgStructure& s);
130 
139  void addNodesVertebra(tgStructure& s, double r);
140 
147  static void addRodsVertebra(tgStructure& s);
148 
159  void addSegments(tgStructure& puppy, tgStructure& vertebra, tgStructure& hip, double r); //, std::size_t segments, std::size_t hips, std::size_t legs, std::size_t feet
160 
166  void addMuscles(tgStructure& puppy); //, std::size_t segments, std::size_t hips, std::size_t legs, std::size_t feet
167 
168 };
169 
170 #endif
virtual void setup(tgWorld &world)
Definition of tgSubject class.
virtual void step(double dt)
Contains the definition of class tgModel.