SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SRobotParsed.hpp
1 /* This file is part of scl, a control and simulation library
2 for robots and biomechanical models.
3 
4 scl is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 3 of the License, or (at your option) any later version.
8 
9 Alternatively, you can redistribute it and/or
10 modify it under the terms of the GNU General Public License as
11 published by the Free Software Foundation; either version 2 of
12 the License, or (at your option) any later version.
13 
14 scl is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU Lesser General Public
20 License and a copy of the GNU General Public License along with
21 scl. If not, see <http://www.gnu.org/licenses/>.
22 */
23 /* \file SRobotParsed.hpp
24  *
25  * Created on: Jul 22, 2010
26  *
27  * Copyright (C) 2010
28  *
29  * Author: Samir Menon <smenon@stanford.edu>
30  */
31 
32 #ifndef SROBOTPARSED_HPP_
33 #define SROBOTPARSED_HPP_
34 
35 #include <scl/DataTypes.hpp>
36 #include <scl/data_structs/SObject.hpp>
37 #include <scl/data_structs/SRigidBody.hpp>
38 #include <scl/data_structs/SActuatorSetParsed.hpp>
39 
40 #include <sutil/CMappedTree.hpp>
41 #include <string>
42 
43 namespace scl
44 {
45 
51 struct SRobotParsed : public SObject
52 {
53 public:
57 
59  std::vector<std::string> robot_tree_numeric_id_to_name_;
60 
63 
65  Eigen::VectorXd gc_pos_limit_max_, gc_pos_limit_min_;
66 
68  Eigen::VectorXd gc_pos_default_;
69 
77  Eigen::VectorXd damping_;
78 
80  Eigen::VectorXd actuator_forces_max_, actuator_forces_min_;
81 
83  sUInt dof_;
84 
86  Eigen::Vector3d gravity_;
87 
89  std::string log_file_;
90 
95  sBool flag_apply_gc_pos_limits_; //false
96  sBool flag_apply_actuator_force_limits_; //true
97  sBool flag_apply_actuator_pos_limits_; //true
98  sBool flag_apply_actuator_vel_limits_; //true
99  sBool flag_apply_actuator_acc_limits_; //true
100  sBool flag_controller_on_; //true
101  sBool flag_logging_on_; //false
102  sBool flag_wireframe_on_; //false
103  sFloat option_axis_frame_size_; //0.01
104  sFloat option_muscle_via_pt_sz_; //0.00 (not rendered)
107  //std::string name_; //Inherited
108  //sBool has_been_init_; //Inherited
109 
110  SRobotParsed() : SObject(std::string("SRobotParsed") ),
111  dof_(0)
112  {
113  //Flags to control SRobot's behavior
114  flag_apply_gc_damping_ = false;
115  flag_apply_gc_pos_limits_ = false;
116  flag_apply_actuator_force_limits_ = true;
117  flag_apply_actuator_pos_limits_ = true;
118  flag_apply_actuator_vel_limits_ = true;
119  flag_apply_actuator_acc_limits_ = true;
120  flag_controller_on_ = true;
121  flag_logging_on_ = false;
122  flag_wireframe_on_ = false;
123  option_axis_frame_size_ = 0.01;//default
124  option_muscle_via_pt_sz_ = 0.00;//default
125  }
126 };
127 
128 }//end of namespace scl_parser
129 
130 #endif /*SROBOTPARSED_HPP_*/
Eigen::VectorXd gc_pos_limit_max_
Definition: SRobotParsed.hpp:65
Definition: SRobotParsed.hpp:51
Eigen::VectorXd actuator_forces_max_
Definition: SRobotParsed.hpp:80
Eigen::VectorXd damping_
Definition: SRobotParsed.hpp:77
Definition: CMappedList.hpp:549
bool sBool
Definition: DataTypes.hpp:54
std::vector< std::string > robot_tree_numeric_id_to_name_
Definition: SRobotParsed.hpp:59
sUInt dof_
Definition: SRobotParsed.hpp:83
std::string log_file_
Definition: SRobotParsed.hpp:89
Eigen::VectorXd gc_pos_default_
Definition: SRobotParsed.hpp:68
Eigen::Vector3d gravity_
Definition: SRobotParsed.hpp:86
sutil::CMappedTree< std::string, SRigidBody > rb_tree_
Definition: SRobotParsed.hpp:56
Definition: CMappedTree.hpp:66
double sFloat
Definition: DataTypes.hpp:72
sutil::CMappedPointerList< std::string, SActuatorSetParsed, true > actuator_sets_
Definition: SRobotParsed.hpp:62
Definition: SObject.hpp:43
sBool flag_apply_gc_damping_
Definition: SRobotParsed.hpp:94
SRobotParsed()
Definition: SRobotParsed.hpp:110