NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
MountainGoatNL2.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_NL_2_H
20 #define MOUNTAIN_GOAT_NL_2_H
21 
31 #include "dev/dhustigschultz/BigPuppy_SpineOnly_Stats/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;
45 class tgStructureInfo;
46 class tgBasicActuator;
47 
49 {
50 public:
51 
52  MountainGoatNL2(int segments, int hips, int legs);
53 
54  virtual ~MountainGoatNL2();
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_legs;
81 
82 private:
83 
91  void addNodesLeg(tgStructure& s, double r);
92 
98  static void addRodsLeg(tgStructure& s);
99 
107  void addNodesHip(tgStructure& s, double r);
108 
114  static void addRodsHip(tgStructure& s);
115 
124  void addNodesVertebra(tgStructure& s, double r);
125 
132  static void addRodsVertebra(tgStructure& s);
133 
144  void addSegments(tgStructure& puppy, tgStructure& vertebra, tgStructure& hip, tgStructure& leg, double r);
145 
151  void addMuscles(tgStructure& puppy);
152 
153 };
154 
155 #endif
virtual void teardown()
Definition of tgSubject class.
Contains the definition of class tgModel.
virtual void step(double dt)
virtual void setup(tgWorld &world)