NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
BigPuppySpineOnly.h
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_H
20 #define BIGPUPPY_SPINEONLY_H
21 
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 BigPuppySpineOnly: public BaseSpineModelLearning //public tgSubject<BigPuppy>, public tgModel
49 {
50 public:
51 
52  BigPuppySpineOnly(int segments, int hips);
53 
54  virtual ~BigPuppySpineOnly();
55 
64  virtual void setup(tgWorld& world);
65 
70  virtual void teardown();
71 
76  virtual void step(double dt);
77 
78 protected:
79 
80  const std::size_t m_hips;
81 
82 private:
83 
92  //void addNodesFoot(tgStructure& s, double r1, double r2);
93 
99  //static void addRodsFoot(tgStructure& s);
100 
108  //void addNodesLeg(tgStructure& s, double r);
109 
115  //static void addRodsLeg(tgStructure& s);
116 
124  void addNodesHip(tgStructure& s, double r);
125 
131  static void addRodsHip(tgStructure& s);
132 
141  void addNodesVertebra(tgStructure& s, double r);
142 
149  static void addRodsVertebra(tgStructure& s);
150 
161  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
162 
168  void addMuscles(tgStructure& puppy); //, std::size_t segments, std::size_t hips, std::size_t legs, std::size_t feet
169 
170 };
171 
172 #endif
Definition of tgSubject class.
virtual void teardown()
virtual void setup(tgWorld &world)
A template base class for a tensegrity spine.
Contains the definition of class tgModel.
virtual void step(double dt)