All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DARTModel.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef _GAZEBO_DARTMODEL_HH_
19 #define _GAZEBO_DARTMODEL_HH_
20 
23 #include "gazebo/physics/Model.hh"
24 
25 namespace gazebo
26 {
27  namespace physics
28  {
33 
36  class DARTModel : public Model
37  {
40  public: explicit DARTModel(BasePtr _parent);
41 
43  public: virtual ~DARTModel();
44 
45  // Documentation inherited.
46  public: virtual void Load(sdf::ElementPtr _sdf);
47 
48  // Documentation inherited.
49  public: virtual void Init();
50 
51  // Documentation inherited.
52  public: virtual void Update();
53 
54  // Documentation inherited.
55  public: virtual void Fini();
56 
57  // Documentation inherited.
58  // public: void Reset();
59 
61  public: void BackupState();
62 
64  public: void RestoreState();
65 
67  public: dart::dynamics::Skeleton *GetDARTSkeleton();
68 
70  public: DARTPhysicsPtr GetDARTPhysics(void) const;
71 
73  public: dart::simulation::World *GetDARTWorld(void) const;
74 
76  protected: dart::dynamics::Skeleton *dtSkeleton;
77 
79  protected: Eigen::VectorXd dtConfig;
80 
82  protected: Eigen::VectorXd dtVelocity;
83  };
85  }
86 }
87 #endif