Skip to content

Commit 3a2714c

Browse files
Remove definition of dg across various class.
Make it internal to the implementation.
1 parent 52e4493 commit 3a2714c

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

include/sot/core/feature-abstract.hh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
/* Matrix */
1818
#include <dynamic-graph/linear-algebra.h>
19-
namespace dg = dynamicgraph;
2019

2120
/* SOT */
2221
#include "sot/core/api.hh"
@@ -137,20 +136,20 @@ public:
137136
\par[in] time: The time at which the error is computed.
138137
\return The vector res with the appropriate value.
139138
*/
140-
virtual dg::Vector &computeError(dg::Vector &res, int time) = 0;
139+
virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res, int time) = 0;
141140

142141
/*! \brief Compute the Jacobian of the error according the robot state.
143142
144143
\par[out] res: The matrix in which the error will be written.
145144
\return The matrix res with the appropriate values.
146145
*/
147-
virtual dg::Matrix &computeJacobian(dg::Matrix &res, int time) = 0;
146+
virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res, int time) = 0;
148147

149148
/// Callback for signal errordotSOUT
150149
///
151150
/// Copy components of the input signal errordotSIN defined by selection
152151
/// flag selectionSIN.
153-
virtual dg::Vector &computeErrorDot(dg::Vector &res, int time);
152+
virtual dynamicgraph::Vector &computeErrorDot(dynamicgraph::Vector &res, int time);
154153

155154
/*! @} */
156155

@@ -170,7 +169,7 @@ public:
170169
SignalPtr<Flags, int> selectionSIN;
171170

172171
/// Derivative of the reference value.
173-
SignalPtr<dg::Vector, int> errordotSIN;
172+
SignalPtr<dynamicgraph::Vector, int> errordotSIN;
174173

175174
/*! @} */
176175

@@ -179,15 +178,15 @@ public:
179178

180179
/*! \brief This signal returns the error between the desired value and
181180
the current value : \f$ E(t) = {\bf s}(t) - {\bf s}^*(t)\f$ */
182-
SignalTimeDependent<dg::Vector, int> errorSOUT;
181+
SignalTimeDependent<dynamicgraph::Vector, int> errorSOUT;
183182

184183
/*! \brief Derivative of the error with respect to time:
185184
* \f$ \frac{\partial e}{\partial t} = - \frac{d{\bf s}^*}{dt} \f$ */
186-
SignalTimeDependent<dg::Vector, int> errordotSOUT;
185+
SignalTimeDependent<dynamicgraph::Vector, int> errordotSOUT;
187186

188187
/*! \brief Jacobian of the error wrt the robot state:
189188
* \f$ J = \frac{\partial {\bf s}}{\partial {\bf q}}\f$ */
190-
SignalTimeDependent<dg::Matrix, int> jacobianSOUT;
189+
SignalTimeDependent<dynamicgraph::Matrix, int> jacobianSOUT;
191190

192191
/*! \brief Returns the dimension of the feature as an output signal. */
193192
SignalTimeDependent<unsigned int, int> dimensionSOUT;
@@ -196,7 +195,7 @@ public:
196195
FileName. */
197196
virtual std::ostream &writeGraph(std::ostream &os) const;
198197

199-
virtual SignalTimeDependent<dg::Vector, int> &getErrorDot() {
198+
virtual SignalTimeDependent<dynamicgraph::Vector, int> &getErrorDot() {
200199
return errordotSOUT;
201200
}
202201

include/sot/core/feature-generic.hh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
namespace dynamicgraph {
4040
namespace sot {
41-
namespace dg = dynamicgraph;
4241

4342
/*!
4443
\class FeatureGeneric
@@ -65,21 +64,21 @@ public:
6564
virtual const std::string &getClassName(void) const { return CLASS_NAME; }
6665

6766
protected:
68-
dg::Vector::Index dimensionDefault;
67+
dynamicgraph::Vector::Index dimensionDefault;
6968

7069
/* --- SIGNALS ------------------------------------------------------------ */
7170
public:
72-
/*! \name dg::Signals
71+
/*! \name dynamicgraph::Signals
7372
@{
7473
*/
7574
/*! \name Input signals
7675
@{
7776
*/
7877
/*! \brief Input for the error. */
79-
dg::SignalPtr<dg::Vector, int> errorSIN;
78+
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> errorSIN;
8079

8180
/*! \brief Input for the Jacobian. */
82-
dg::SignalPtr<dg::Matrix, int> jacobianSIN;
81+
dynamicgraph::SignalPtr<dynamicgraph::Matrix, int> jacobianSIN;
8382

8483
/*! @} */
8584

@@ -110,10 +109,10 @@ public:
110109

111110
/*! \brief Compute the error between the desired value and the value itself.
112111
*/
113-
virtual dg::Vector &computeError(dg::Vector &res, int time);
112+
virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res, int time);
114113

115114
/*! \brief Compute the Jacobian of the value according to the robot state.. */
116-
virtual dg::Matrix &computeJacobian(dg::Matrix &res, int time);
115+
virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res, int time);
117116

118117
/*! @} */
119118

include/sot/core/feature-posture.hh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class SOTFEATUREPOSTURE_EXPORT FeaturePosture : public FeatureAbstract {
5252
DYNAMIC_GRAPH_ENTITY_DECL();
5353

5454
public:
55-
typedef dynamicgraph::SignalPtr<dg::Vector, int> signalIn_t;
56-
typedef dynamicgraph::SignalTimeDependent<dg::Vector, int> signalOut_t;
55+
typedef dynamicgraph::SignalPtr<dynamicgraph::Vector, int> signalIn_t;
56+
typedef dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> signalOut_t;
5757

5858
DECLARE_NO_REFERENCE;
5959

@@ -63,9 +63,9 @@ public:
6363
void selectDof(unsigned dofId, bool control);
6464

6565
protected:
66-
virtual dg::Vector &computeError(dg::Vector &res, int);
67-
virtual dg::Matrix &computeJacobian(dg::Matrix &res, int);
68-
virtual dg::Vector &computeErrorDot(dg::Vector &res, int time);
66+
virtual dynamicgraph::Vector &computeError(dynamicgraph::Vector &res, int);
67+
virtual dynamicgraph::Matrix &computeJacobian(dynamicgraph::Matrix &res, int);
68+
virtual dynamicgraph::Vector &computeErrorDot(dynamicgraph::Vector &res, int time);
6969

7070
signalIn_t state_;
7171
signalIn_t posture_;

0 commit comments

Comments
 (0)