Skip to content

Commit 27b4edc

Browse files
Fix dg namespace pb.
1 parent 3a2714c commit 27b4edc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+308
-376
lines changed

include/sot/core/binary-int-to-uint.hh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,16 @@
3535

3636
namespace dynamicgraph {
3737
namespace sot {
38-
namespace dg = dynamicgraph;
3938

40-
class SOTBINARYINTTOUINT_EXPORT BinaryIntToUint : public dg::Entity {
39+
class SOTBINARYINTTOUINT_EXPORT BinaryIntToUint : public dynamicgraph::Entity {
4140
public:
4241
static const std::string CLASS_NAME;
4342
virtual const std::string &getClassName(void) const { return CLASS_NAME; }
4443

4544
/* --- SIGNALS ------------------------------------------------------------ */
4645
public:
47-
dg::SignalPtr<int, int> binaryIntSIN;
48-
dg::SignalTimeDependent<unsigned, int> binaryUintSOUT;
46+
dynamicgraph::SignalPtr<int, int> binaryIntSIN;
47+
dynamicgraph::SignalTimeDependent<unsigned, int> binaryUintSOUT;
4948

5049
public:
5150
BinaryIntToUint(const std::string &name);

include/sot/core/clamp-workspace.hh

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
/* Matrix */
1717
#include <dynamic-graph/linear-algebra.h>
18-
namespace dg = dynamicgraph;
1918

2019
/* SOT */
2120
#include <dynamic-graph/all-signals.h>
@@ -39,44 +38,43 @@ namespace dg = dynamicgraph;
3938

4039
namespace dynamicgraph {
4140
namespace sot {
42-
namespace dg = dynamicgraph;
4341

4442
/* --------------------------------------------------------------------- */
4543
/* --- CLASS ----------------------------------------------------------- */
4644
/* --------------------------------------------------------------------- */
4745

48-
class SOTCLAMPWORKSPACE_EXPORT ClampWorkspace : public dg::Entity {
46+
class SOTCLAMPWORKSPACE_EXPORT ClampWorkspace : public dynamicgraph::Entity {
4947
public:
5048
static const std::string CLASS_NAME;
5149
virtual const std::string &getClassName(void) const { return CLASS_NAME; }
5250

5351
/* --- SIGNALS ------------------------------------------------------------ */
5452
public:
55-
dg::SignalPtr<MatrixHomogeneous, int> positionrefSIN;
56-
dg::SignalPtr<MatrixHomogeneous, int> positionSIN;
57-
dg::SignalTimeDependent<dg::Matrix, int> alphaSOUT;
58-
dg::SignalTimeDependent<dg::Matrix, int> alphabarSOUT;
59-
dg::SignalTimeDependent<MatrixHomogeneous, int> handrefSOUT;
53+
dynamicgraph::SignalPtr<MatrixHomogeneous, int> positionrefSIN;
54+
dynamicgraph::SignalPtr<MatrixHomogeneous, int> positionSIN;
55+
dynamicgraph::SignalTimeDependent<dynamicgraph::Matrix, int> alphaSOUT;
56+
dynamicgraph::SignalTimeDependent<dynamicgraph::Matrix, int> alphabarSOUT;
57+
dynamicgraph::SignalTimeDependent<MatrixHomogeneous, int> handrefSOUT;
6058

6159
public:
6260
ClampWorkspace(const std::string &name);
6361
virtual ~ClampWorkspace(void) {}
6462

6563
void update(int time);
6664

67-
virtual dg::Matrix &computeOutput(dg::Matrix &res, int time);
68-
virtual dg::Matrix &computeOutputBar(dg::Matrix &res, int time);
65+
virtual dynamicgraph::Matrix &computeOutput(dynamicgraph::Matrix &res, int time);
66+
virtual dynamicgraph::Matrix &computeOutputBar(dynamicgraph::Matrix &res, int time);
6967
virtual MatrixHomogeneous &computeRef(MatrixHomogeneous &res, int time);
7068

7169
virtual void display(std::ostream &) const;
7270

7371
private:
7472
int timeUpdate;
7573

76-
dg::Matrix alpha;
77-
dg::Matrix alphabar;
74+
dynamicgraph::Matrix alpha;
75+
dynamicgraph::Matrix alphabar;
7876
MatrixHomogeneous prefMp;
79-
dg::Vector pd;
77+
dynamicgraph::Vector pd;
8078
MatrixRotation Rd;
8179
MatrixHomogeneous handref;
8280

include/sot/core/com-freezer.hh

Lines changed: 6 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 <dynamic-graph/all-signals.h>
@@ -39,19 +38,17 @@ namespace dg = dynamicgraph;
3938
namespace dynamicgraph {
4039
namespace sot {
4140

42-
namespace dg = dynamicgraph;
43-
4441
/* --------------------------------------------------------------------- */
4542
/* --- CLASS ----------------------------------------------------------- */
4643
/* --------------------------------------------------------------------- */
4744

48-
class SOTCOMFREEZER_EXPORT CoMFreezer : public dg::Entity {
45+
class SOTCOMFREEZER_EXPORT CoMFreezer : public dynamicgraph::Entity {
4946
public:
5047
static const std::string CLASS_NAME;
5148
virtual const std::string &getClassName() const { return CLASS_NAME; }
5249

5350
private:
54-
dg::Vector m_lastCoM;
51+
dynamicgraph::Vector m_lastCoM;
5552
bool m_previousPGInProcess;
5653
int m_lastStopTime;
5754

@@ -60,12 +57,12 @@ public: /* --- CONSTRUCTION --- */
6057
virtual ~CoMFreezer(void);
6158

6259
public: /* --- SIGNAL --- */
63-
dg::SignalPtr<dg::Vector, int> CoMRefSIN;
64-
dg::SignalPtr<unsigned, int> PGInProcessSIN;
65-
dg::SignalTimeDependent<dg::Vector, int> freezedCoMSOUT;
60+
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> CoMRefSIN;
61+
dynamicgraph::SignalPtr<unsigned, int> PGInProcessSIN;
62+
dynamicgraph::SignalTimeDependent<dynamicgraph::Vector, int> freezedCoMSOUT;
6663

6764
public: /* --- FUNCTION --- */
68-
dg::Vector &computeFreezedCoM(dg::Vector &freezedCoM, const int &time);
65+
dynamicgraph::Vector &computeFreezedCoM(dynamicgraph::Vector &freezedCoM, const int &time);
6966

7067
public: /* --- PARAMS --- */
7168
virtual void display(std::ostream &os) const;

include/sot/core/control-gr.hh

Lines changed: 5 additions & 7 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 <dynamic-graph/entity.h>
@@ -40,7 +39,6 @@ namespace dg = dynamicgraph;
4039
namespace dynamicgraph {
4140
namespace sot {
4241

43-
namespace dg = dynamicgraph;
4442

4543
/* --------------------------------------------------------------------- */
4644
/* --- CLASS ----------------------------------------------------------- */
@@ -70,14 +68,14 @@ protected:
7068
double _dimension;
7169

7270
public: /* --- SIGNALS --- */
73-
SignalPtr<dg::Matrix, int> matrixASIN;
74-
SignalPtr<dg::Vector, int> accelerationSIN;
75-
SignalPtr<dg::Vector, int> gravitySIN;
76-
SignalTimeDependent<dg::Vector, int> controlSOUT;
71+
SignalPtr<dynamicgraph::Matrix, int> matrixASIN;
72+
SignalPtr<dynamicgraph::Vector, int> accelerationSIN;
73+
SignalPtr<dynamicgraph::Vector, int> gravitySIN;
74+
SignalTimeDependent<dynamicgraph::Vector, int> controlSOUT;
7775

7876
protected:
7977
double &setsize(int dimension);
80-
dg::Vector &computeControl(dg::Vector &tau, int t);
78+
dynamicgraph::Vector &computeControl(dynamicgraph::Vector &tau, int t);
8179
};
8280

8381
} // namespace sot

include/sot/core/control-pd.hh

Lines changed: 14 additions & 15 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 <dynamic-graph/entity.h>
@@ -67,22 +66,22 @@ protected:
6766
double TimeStep;
6867

6968
public: /* --- SIGNALS --- */
70-
SignalPtr<dg::Vector, int> KpSIN;
71-
SignalPtr<dg::Vector, int> KdSIN;
72-
SignalPtr<dg::Vector, int> positionSIN;
73-
SignalPtr<dg::Vector, int> desiredpositionSIN;
74-
SignalPtr<dg::Vector, int> velocitySIN;
75-
SignalPtr<dg::Vector, int> desiredvelocitySIN;
76-
SignalTimeDependent<dg::Vector, int> controlSOUT;
77-
SignalTimeDependent<dg::Vector, int> positionErrorSOUT;
78-
SignalTimeDependent<dg::Vector, int> velocityErrorSOUT;
69+
SignalPtr<dynamicgraph::Vector, int> KpSIN;
70+
SignalPtr<dynamicgraph::Vector, int> KdSIN;
71+
SignalPtr<dynamicgraph::Vector, int> positionSIN;
72+
SignalPtr<dynamicgraph::Vector, int> desiredpositionSIN;
73+
SignalPtr<dynamicgraph::Vector, int> velocitySIN;
74+
SignalPtr<dynamicgraph::Vector, int> desiredvelocitySIN;
75+
SignalTimeDependent<dynamicgraph::Vector, int> controlSOUT;
76+
SignalTimeDependent<dynamicgraph::Vector, int> positionErrorSOUT;
77+
SignalTimeDependent<dynamicgraph::Vector, int> velocityErrorSOUT;
7978

8079
protected:
81-
dg::Vector &computeControl(dg::Vector &tau, int t);
82-
dg::Vector position_error_;
83-
dg::Vector velocity_error_;
84-
dg::Vector &getPositionError(dg::Vector &position_error, int t);
85-
dg::Vector &getVelocityError(dg::Vector &velocity_error, int t);
80+
dynamicgraph::Vector &computeControl(dynamicgraph::Vector &tau, int t);
81+
dynamicgraph::Vector position_error_;
82+
dynamicgraph::Vector velocity_error_;
83+
dynamicgraph::Vector &getPositionError(dynamicgraph::Vector &position_error, int t);
84+
dynamicgraph::Vector &getVelocityError(dynamicgraph::Vector &velocity_error, int t);
8685
};
8786

8887
} // namespace sot

include/sot/core/derivator-impl.hh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
namespace dynamicgraph {
3535
namespace sot {
36-
namespace dg = dynamicgraph;
3736

3837
#ifdef WIN32
3938
#define DECLARE_SPECIFICATION(className, sotSigType) \
@@ -47,8 +46,8 @@ namespace dg = dynamicgraph;
4746
#endif
4847

4948
DECLARE_SPECIFICATION(DerivatorDouble, double)
50-
DECLARE_SPECIFICATION(DerivatorVector, dg::Vector)
51-
DECLARE_SPECIFICATION(DerivatorMatrix, dg::Matrix)
49+
DECLARE_SPECIFICATION(DerivatorVector, dynamicgraph::Vector)
50+
DECLARE_SPECIFICATION(DerivatorMatrix, dynamicgraph::Matrix)
5251
DECLARE_SPECIFICATION(DerivatorVectorQuaternion, VectorQuaternion)
5352
} /* namespace sot */
5453
} /* namespace dynamicgraph */

include/sot/core/derivator.hh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@
2929

3030
namespace dynamicgraph {
3131
namespace sot {
32-
namespace dg = dynamicgraph;
3332

3433
/* --------------------------------------------------------------------- */
3534
/* --- CLASS ----------------------------------------------------------- */
3635
/* --------------------------------------------------------------------- */
3736

38-
template <class T> class Derivator : public dg::Entity {
37+
template <class T> class Derivator : public dynamicgraph::Entity {
3938
DYNAMIC_GRAPH_ENTITY_DECL();
4039

4140
protected:
@@ -48,7 +47,7 @@ public: /* --- CONSTRUCTION --- */
4847
static std::string getTypeName(void) { return "Unknown"; }
4948

5049
Derivator(const std::string &name)
51-
: dg::Entity(name), memory(), initialized(false),
50+
: dynamicgraph::Entity(name), memory(), initialized(false),
5251
timestep(TIMESTEP_DEFAULT),
5352
SIN(NULL, "sotDerivator<" + getTypeName() + ">(" + name + ")::input(" +
5453
getTypeName() + ")::sin"),
@@ -65,9 +64,9 @@ public: /* --- CONSTRUCTION --- */
6564
virtual ~Derivator(void){};
6665

6766
public: /* --- SIGNAL --- */
68-
dg::SignalPtr<T, int> SIN;
69-
dg::SignalTimeDependent<T, int> SOUT;
70-
dg::Signal<double, int> timestepSIN;
67+
dynamicgraph::SignalPtr<T, int> SIN;
68+
dynamicgraph::SignalTimeDependent<T, int> SOUT;
69+
dynamicgraph::Signal<double, int> timestepSIN;
7170

7271
protected:
7372
T &computeDerivation(T &res, int time) {

include/sot/core/device.hh

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/* -- MaaL --- */
1919
#include <dynamic-graph/linear-algebra.h>
20-
namespace dg = dynamicgraph;
20+
2121
/* SOT */
2222
#include "sot/core/api.hh"
2323
#include "sot/core/periodic-call.hh"
@@ -55,10 +55,10 @@ public:
5555
};
5656

5757
protected:
58-
dg::Vector state_;
59-
dg::Vector velocity_;
58+
dynamicgraph::Vector state_;
59+
dynamicgraph::Vector velocity_;
6060
bool sanityCheck_;
61-
dg::Vector vel_control_;
61+
dynamicgraph::Vector vel_control_;
6262
ControlInput controlInputType_;
6363
bool withForceSignals[4];
6464
PeriodicCall periodicCallBefore_;
@@ -81,9 +81,9 @@ public:
8181
virtual ~Device();
8282

8383
virtual void setStateSize(const unsigned int &size);
84-
virtual void setState(const dg::Vector &st);
84+
virtual void setState(const dynamicgraph::Vector &st);
8585
void setVelocitySize(const unsigned int &size);
86-
virtual void setVelocity(const dg::Vector &vel);
86+
virtual void setVelocity(const dynamicgraph::Vector &vel);
8787
virtual void setSecondOrderIntegration();
8888
virtual void setNoIntegration();
8989
virtual void setControlInputType(const std::string &cit);
@@ -107,20 +107,20 @@ public: /* --- DISPLAY --- */
107107
}
108108

109109
public: /* --- SIGNALS --- */
110-
dynamicgraph::SignalPtr<dg::Vector, int> controlSIN;
111-
dynamicgraph::SignalPtr<dg::Vector, int> attitudeSIN;
112-
dynamicgraph::SignalPtr<dg::Vector, int> zmpSIN;
110+
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> controlSIN;
111+
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> attitudeSIN;
112+
dynamicgraph::SignalPtr<dynamicgraph::Vector, int> zmpSIN;
113113

114114
/// \name Device current state.
115115
/// \{
116-
dynamicgraph::Signal<dg::Vector, int> stateSOUT;
117-
dynamicgraph::Signal<dg::Vector, int> velocitySOUT;
116+
dynamicgraph::Signal<dynamicgraph::Vector, int> stateSOUT;
117+
dynamicgraph::Signal<dynamicgraph::Vector, int> velocitySOUT;
118118
dynamicgraph::Signal<MatrixRotation, int> attitudeSOUT;
119119
/*! \brief The current state of the robot from the command viewpoint. */
120-
dynamicgraph::Signal<dg::Vector, int> motorcontrolSOUT;
121-
dynamicgraph::Signal<dg::Vector, int> previousControlSOUT;
120+
dynamicgraph::Signal<dynamicgraph::Vector, int> motorcontrolSOUT;
121+
dynamicgraph::Signal<dynamicgraph::Vector, int> previousControlSOUT;
122122
/*! \brief The ZMP reference send by the previous controller. */
123-
dynamicgraph::Signal<dg::Vector, int> ZMPPreviousControllerSOUT;
123+
dynamicgraph::Signal<dynamicgraph::Vector, int> ZMPPreviousControllerSOUT;
124124
/// \}
125125

126126
/// \name Real robot current state
@@ -129,19 +129,19 @@ public: /* --- SIGNALS --- */
129129
/// does *not* match the state control input signal.
130130
/// \{
131131
/// Motor positions
132-
dynamicgraph::Signal<dg::Vector, int> robotState_;
132+
dynamicgraph::Signal<dynamicgraph::Vector, int> robotState_;
133133
/// Motor velocities
134-
dynamicgraph::Signal<dg::Vector, int> robotVelocity_;
134+
dynamicgraph::Signal<dynamicgraph::Vector, int> robotVelocity_;
135135
/// The force torque sensors
136-
dynamicgraph::Signal<dg::Vector, int> *forcesSOUT[4];
136+
dynamicgraph::Signal<dynamicgraph::Vector, int> *forcesSOUT[4];
137137
/// Motor torques
138138
/// \todo why pseudo ?
139-
dynamicgraph::Signal<dg::Vector, int> pseudoTorqueSOUT;
139+
dynamicgraph::Signal<dynamicgraph::Vector, int> pseudoTorqueSOUT;
140140
/// \}
141141

142142
protected:
143143
/// Compute roll pitch yaw angles of freeflyer joint.
144-
void integrateRollPitchYaw(dg::Vector &state, const dg::Vector &control,
144+
void integrateRollPitchYaw(dynamicgraph::Vector &state, const dynamicgraph::Vector &control,
145145
double dt);
146146
/// Store Position of free flyer joint
147147
MatrixHomogeneous ffPose_;
@@ -164,13 +164,13 @@ protected:
164164
const MatrixHomogeneous &freeFlyerPose() const;
165165

166166
public:
167-
virtual void setRoot(const dg::Matrix &root);
167+
virtual void setRoot(const dynamicgraph::Matrix &root);
168168

169169
virtual void setRoot(const MatrixHomogeneous &worldMwaist);
170170

171171
private:
172172
// Intermediate variable to avoid dynamic allocation
173-
dg::Vector forceZero6;
173+
dynamicgraph::Vector forceZero6;
174174
};
175175
} // namespace sot
176176
} // namespace dynamicgraph

0 commit comments

Comments
 (0)