SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
SRobotIO.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 SRobotIO.hpp
24  *
25  * Created on: Jul 22, 2010
26  *
27  * Copyright (C) 2010
28  *
29  * Author: Samir Menon <smenon@stanford.edu>
30  */
31 #ifndef SROBOTIO_HPP_
32 #define SROBOTIO_HPP_
33 
34 #include <scl/DataTypes.hpp>
35 #include <scl/data_structs/SObject.hpp>
36 #include <scl/data_structs/SForce.hpp>
37 #include <scl/actuation/data_structs/SActuatorSetBase.hpp>
38 
39 #include <sutil/CMappedList.hpp>
40 #include <Eigen/Dense>
41 
42 #include <string>
43 #include <vector>
44 
45 namespace scl
46 {
50  {
51  public:
53  Eigen::VectorXd q_;
54 
56  Eigen::VectorXd dq_;
57 
59  Eigen::VectorXd ddq_;
60 
62  Eigen::VectorXd force_gc_measured_;
63 
78  };
79 
80 
84  {
85  public:
93  Eigen::VectorXd force_gc_commanded_;
94 
101  };
102 
107  struct SRobotIO : public SObject
108  {
110  sUInt dof_;
111 
114 
118 
120  SRobotIO();
121 
123  sBool init(const std::string& arg_robot_name,
124  const sUInt arg_robot_dof);
125 
128  void setGcPosition(const Eigen::VectorXd &arg_pos)
129  { sensors_.q_ = arg_pos; }
130 
133  void setGcVelocity(const Eigen::VectorXd &arg_vel)
134  { sensors_.dq_ = arg_vel; }
135 
137  sBool printInfo();
138 
142  };
143 }
144 
145 #endif /* SROBOTIO_HPP_ */
Eigen::VectorXd force_gc_commanded_
Definition: SRobotIO.hpp:93
Definition: SRobotIO.hpp:107
Eigen::VectorXd ddq_
Definition: SRobotIO.hpp:59
SRobotActuators actuators_
Definition: SRobotIO.hpp:117
void setGcPosition(const Eigen::VectorXd &arg_pos)
Definition: SRobotIO.hpp:128
sutil::CMappedPointerList< std::string, SActuatorSetBase, false > actuator_sets_
Definition: SRobotIO.hpp:100
sUInt dof_
Definition: SRobotIO.hpp:110
Definition: CMappedList.hpp:85
void setGcVelocity(const Eigen::VectorXd &arg_vel)
Definition: SRobotIO.hpp:133
sutil::CMappedList< std::string, SForce > forces_external_
Definition: SRobotIO.hpp:77
Definition: CMappedList.hpp:549
SRobotIO()
Definition: SRobotIO.cpp:40
bool sBool
Definition: DataTypes.hpp:54
Eigen::VectorXd dq_
Definition: SRobotIO.hpp:56
SRobotSensors sensors_
Definition: SRobotIO.hpp:113
sBool printInfo()
Definition: SRobotIO.cpp:81
Definition: SRobotIO.hpp:83
Eigen::VectorXd q_
Definition: SRobotIO.hpp:53
Eigen::VectorXd force_gc_measured_
Definition: SRobotIO.hpp:62
Definition: SObject.hpp:43
Definition: SRobotIO.hpp:49
sBool init(const std::string &arg_robot_name, const sUInt arg_robot_dof)
Definition: SRobotIO.cpp:46