NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
TensegrityModelController.cpp
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 
26 // This module
28 // This application
29 #include "TensegrityModel.h"
30 // This library
31 //#include "core/tgBasicActuator.h"
33 #include "core/tgString.h"
34 
35 //#include "sensors/tgDataObserver.h"
36 // The C++ Standard Library
37 #include <cassert>
38 #include <stdexcept>
39 #include <vector>
40 #include <iostream>
41 #include "helpers/FileHelpers.h"
42 
43 //Constructor does nothing at the moment
45 {
46 }
47 
48 //Debugging output interaction with yaml
50 {
51  std::cout << "Setting up the tensegrity model controller" << std::endl;
52  //Tags from entire structure
53  const tgTags AllTags = subject.getTags();
54  //Get array of strings
55  const std::deque<std::string>& AllTagStringsArray = AllTags.getTags();
56  //Iterate through array and output strings to command line
57  for (std::size_t i = 0; i < AllTagStringsArray.size(); i ++)
58  {
59  std::cout << AllTagStringsArray[i] << std::endl;
60  }
61  std::cout << "Finished outputting tags" << std::endl;
62  //Outputting entire model
63  std::cout << "Contents of model: " << std::endl;
64  std::cout << subject << std::endl;
65 }
66 
68 {
69 }
70 
71 
Convenience function for combining strings with ints, mostly for naming structures.
virtual void onSetup(TensegrityModel &subject)
virtual void onStep(TensegrityModel &subject, double dt)
Contains the definition of abstract base class tgSpringCableActuator. Assumes that the string is line...
A series of functions to assist with file input/output.
Contains the definition of class TensegrityModelController.
Definition: tgTags.h:44