OpenWalker Project
Documentation of the ROS Packages
Main Page
Related Pages
Classes
Files
File List
File Members
src
ow_core
include
ow_core
joint_state.h
Go to the documentation of this file.
1
34
#ifndef OPEN_WALKER_CORE_JOINT_STATE_H
35
#define OPEN_WALKER_CORE_JOINT_STATE_H
36
37
#include <
ow_core/joint_position.h
>
38
#include <
ow_core/joint_velocity.h
>
39
#include <
ow_core/joint_acceleration.h
>
40
#include <
ow_core/joint_effort.h
>
41
42
43
namespace
ow_core
{
44
54
template
<
typename
_Scalar,
int
_Rows>
55
class
JointState
56
{
57
public
:
58
typedef
_Scalar Scalar;
59
60
enum
61
{
62
Rows = _Rows,
63
};
64
65
typedef
VectorDof<Scalar,Rows>
JVec
;
66
67
typedef
JointPosition<Scalar,Rows>
JPos
;
68
typedef
JointVelocity<Scalar,Rows>
JVel
;
69
typedef
JointAcceleration<Scalar,Rows>
JAcc
;
70
typedef
JointEffort<Scalar,Rows>
JTorque
;
71
72
static
const
JointState
& Zero()
73
{
74
static
JointState
v;
75
bool
once =
false
;
76
if
(!once)
77
{
78
v.q() =
JVec::Zero
();
79
v.qP() =
JVec::Zero
();
80
v.qPP() =
JVec::Zero
();
81
v.tau() =
JVec::Zero
();
82
once =
true
;
83
}
84
return
v;
85
}
86
87
protected
:
88
JPos q_;
89
JVel qP_;
90
JAcc qPP_;
91
JTorque tau_;
92
93
public
:
97
explicit
JointState
()
98
{}
99
100
JPos& q()
101
{
102
return
q_;
103
}
104
105
const
JPos& q()
const
106
{
107
return
q_;
108
}
109
110
JVel& qP()
111
{
112
return
qP_;
113
}
114
115
const
JVel& qP()
const
116
{
117
return
qP_;
118
}
119
120
JAcc& qPP()
121
{
122
return
qPP_;
123
}
124
125
const
JAcc& qPP()
const
126
{
127
return
qPP_;
128
}
129
130
JTorque& tau()
131
{
132
return
tau_;
133
}
134
135
const
JTorque& tau()
const
136
{
137
return
tau_;
138
}
139
140
141
};
142
143
144
}
145
146
#endif // TUM_ICS_OPEN_WALKER_JOINT_STATE_H
ow_core::JointVelocity< Scalar, Rows >
ow_core::VectorDof::Zero
static Base::ConstantReturnType Zero()
Returns an expression where all coefficients equal zero.
Definition:
vector_dof.h:69
joint_effort.h
ow_core::JointPosition< Scalar, Rows >
ow_core::VectorDof
The VectorDof class.
Definition:
vector_dof.h:49
joint_position.h
joint_acceleration.h
ow_core
Definition:
angular_acceleration.h:39
ow_core::JointState
The JointState class.
Definition:
joint_state.h:55
ow_core::JointState::JointState
JointState()
Default Constructor.
Definition:
joint_state.h:97
ow_core::JointEffort< Scalar, Rows >
ow_core::JointAcceleration< Scalar, Rows >
joint_velocity.h
Generated on Fri Feb 14 2020 12:12:24 for OpenWalker Project by
1.8.11