NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
MountainGoatAchilles.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 MOUNTAIN_GOAT_ACHILLES_H
20 #define MOUNTAIN_GOAT_ACHILLES_H
21 
32 #include "dev/dhustigschultz/BigPuppy_SpineOnly_Stats/BaseQuadModelLearning.h"
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;
46 class tgStructureInfo;
47 class tgBasicActuator;
48 
50 {
51 public:
52 
53  MountainGoatAchilles(int segments, int hips, int legs);
54 
55  virtual ~MountainGoatAchilles();
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_legs;
82 
83 private:
84 
92  void addNodesLeg(tgStructure& s, double r);
93 
99  static void addRodsLeg(tgStructure& s);
100 
108  void addNodesHip(tgStructure& s, double r);
109 
115  static void addRodsHip(tgStructure& s);
116 
125  void addNodesVertebra(tgStructure& s, double r);
126 
133  static void addRodsVertebra(tgStructure& s);
134 
145  void addSegments(tgStructure& puppy, tgStructure& vertebra, tgStructure& hip, tgStructure& leg, double r);
146 
152  void addMuscles(tgStructure& puppy);
153 
154 };
155 
156 #endif
Definition of tgSubject class.
Contains the definition of class tgModel.
virtual void step(double dt)
virtual void setup(tgWorld &world)