NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
BigDoxieNoFeet.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 BIGDOXIE_NOFEET_H
20 #define BIGDOXIE_NOFEET_H
21 
33 
34 // This library
35 #include "core/tgModel.h"
36 #include "core/tgSubject.h"
37 // The C++ Standard Library
38 #include <map>
39 #include <set>
40 #include <string>
41 #include <vector>
42 
44 class tgWorld;
45 class tgStructure; //Do I need this, or tgStructureInfo?
46 class tgStructureInfo; //Do I need this, or just tgStructure, or both?
47 class tgBasicActuator;
48 
49 class BigDoxieNoFeet: public BaseSpineModelLearning //public tgSubject<BigPuppy>, public tgModel
50 {
51 public:
52 
53  BigDoxieNoFeet(int segments, int hips, int legs, int feet);
54 
55  virtual ~BigDoxieNoFeet();
56 
65  virtual void setup(tgWorld& world);
66 
71  virtual void teardown();
72 
77  virtual void step(double dt);
78 
79 protected:
80 
81  const std::size_t m_hips;
82  const std::size_t m_legs;
83  const std::size_t m_feet;
84 
85 private:
86 
95  void addNodesFoot(tgStructure& s, double r1, double r2);
96 
102  static void addRodsFoot(tgStructure& s);
103 
111  void addNodesLeg(tgStructure& s, double r);
112 
118  static void addRodsLeg(tgStructure& s);
119 
127  void addNodesHip(tgStructure& s, double r);
128 
134  static void addRodsHip(tgStructure& s);
135 
144  void addNodesVertebra(tgStructure& s, double r);
145 
152  static void addRodsVertebra(tgStructure& s);
153 
164  void addSegments(tgStructure& puppy, tgStructure& vertebra, tgStructure& hip, tgStructure& leg, tgStructure& foot,
165  double r); //, std::size_t segments, std::size_t hips, std::size_t legs, std::size_t feet
166 
172  void addMuscles(tgStructure& puppy); //, std::size_t segments, std::size_t hips, std::size_t legs, std::size_t feet
173 
174 };
175 
176 #endif
virtual void step(double dt)
Definition of tgSubject class.
virtual void teardown()
A template base class for a tensegrity spine.
Contains the definition of class tgModel.
virtual void setup(tgWorld &world)