Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
hrplib
hrpModel
ForwardDynamics.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
3
* All rights reserved. This program is made available under the terms of the
4
* Eclipse Public License v1.0 which accompanies this distribution, and is
5
* available at http://www.eclipse.org/legal/epl-v10.html
6
* Contributors:
7
* National Institute of Advanced Industrial Science and Technology (AIST)
8
*/
14
#ifndef OPENHRP_FORWARD_DYNAMICS_H_INCLUDED
15
#define OPENHRP_FORWARD_DYNAMICS_H_INCLUDED
16
17
#include "
Body.h
"
18
19
#include <boost/shared_ptr.hpp>
20
#include <boost/intrusive_ptr.hpp>
21
#include <
hrpUtil/Eigen3d.h
>
22
23
#include "Config.h"
24
25
26
namespace
hrp
27
{
28
class
AccelSensor
;
29
35
class
HRPMODEL_API
ForwardDynamics
{
36
37
public
:
38
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39
40
ForwardDynamics
(
BodyPtr
body);
41
virtual
~ForwardDynamics();
42
43
void
setGravityAcceleration(
const
Vector3
& g);
44
void
setEulerMethod();
45
void
setRungeKuttaMethod();
46
void
setTimeStep(
double
timeStep);
47
void
enableSensors(
bool
on);
48
49
virtual
void
initialize() = 0;
50
virtual
void
calcNextState() = 0;
51
52
protected
:
53
54
virtual
void
initializeSensors();
55
virtual
void
updateSensorsFinal();
56
67
static
void
SE3exp(
Vector3
& out_p,
Matrix33
& out_R,
68
const
Vector3
& p0,
const
Matrix33
& R0,
69
const
Vector3
&
w
,
const
Vector3
& vo,
double
dt);
70
71
BodyPtr
body
;
72
Vector3
g
;
73
double
timeStep
;
74
bool
sensorsEnabled
;
75
76
enum
{ EULER_METHOD, RUNGEKUTTA_METHOD } integrationMode;
77
78
private
:
79
80
void
updateAccelSensor(
AccelSensor
* sensor);
81
void
initializeAccelSensors();
82
83
// varialbes for calculating sensor values
84
// preview control gain matrices for force sensors
85
typedef
Eigen::Matrix2d
matrix22
;
86
typedef
Eigen::Vector2d
vector2
;
87
matrix22
A
;
88
vector2
B
;
89
90
};
91
92
typedef
boost::shared_ptr<ForwardDynamics>
ForwardDynamicsPtr
;
93
94
};
95
96
#endif
hrp::ForwardDynamics::vector2
Eigen::Vector2d vector2
Definition:
ForwardDynamics.h:86
hrp::ForwardDynamicsPtr
boost::shared_ptr< ForwardDynamics > ForwardDynamicsPtr
Definition:
ForwardDynamics.h:92
Body.h
hrp::ForwardDynamics::B
vector2 B
Definition:
ForwardDynamics.h:88
hrp::ForwardDynamics::A
matrix22 A
Definition:
ForwardDynamics.h:87
hrp::ForwardDynamics::body
BodyPtr body
Definition:
ForwardDynamics.h:71
w
w
AccelSensor
Definition:
server/UtDynamicsSimulator/Sensor.h:91
hrp::BodyPtr
boost::shared_ptr< Body > BodyPtr
Definition:
Body.h:315
hrp::Vector3
Eigen::Vector3d Vector3
Definition:
EigenTypes.h:11
hrp::Matrix33
Eigen::Matrix3d Matrix33
Definition:
EigenTypes.h:12
Eigen3d.h
hrp::ForwardDynamics::matrix22
Eigen::Matrix2d matrix22
Definition:
ForwardDynamics.h:85
hrp::ForwardDynamics::g
Vector3 g
Definition:
ForwardDynamics.h:72
hrp::ForwardDynamics::timeStep
double timeStep
Definition:
ForwardDynamics.h:73
hrp
Definition:
ColdetModel.h:28
hrp::AccelSensor
Definition:
hrplib/hrpModel/Sensor.h:95
hrp::ForwardDynamics::sensorsEnabled
bool sensorsEnabled
Definition:
ForwardDynamics.h:74
hrp::ForwardDynamics
Definition:
ForwardDynamics.h:35
openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:37