Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit d5062fa

Browse files
committed
1 parent 4d0349b commit d5062fa

17 files changed

+172
-634
lines changed

include/sot-dynamic-pinocchio/angle-estimator.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ class SOTANGLEESTIMATOR_EXPORT AngleEstimator
114114
public: /* --- PARAMS --- */
115115
void fromSensor(const bool& fs) { fromSensor_ = fs; }
116116
bool fromSensor() const { return fromSensor_; }
117-
virtual void commandLine( const std::string& cmdLine,
118-
std::istringstream& cmdArgs,
119-
std::ostream& os );
120117
private:
121118
bool fromSensor_;
122119

include/sot-dynamic-pinocchio/dynamic-pinocchio.h

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,20 @@
6767
#endif
6868

6969

70-
namespace dynamicgraph {
70+
namespace dynamicgraph {
7171
namespace sot {
7272
namespace dg = dynamicgraph;
73-
73+
7474
namespace command {
7575
class SetFile;
7676
class CreateOpPoint;
7777
}
7878
/* --------------------------------------------------------------------- */
7979
/* --- CLASS ----------------------------------------------------------- */
8080
/* --------------------------------------------------------------------- */
81-
82-
83-
81+
82+
83+
8484
/*! @ingroup signals
8585
\brief This class provides an inverse dynamic model of the robot.
8686
More precisely it wraps the newton euler algorithm implemented
@@ -92,8 +92,8 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
9292
friend class sot::command::SetFile;
9393
friend class sot::command::CreateOpPoint;
9494
// friend class sot::command::InitializeRobot;
95-
96-
public:
95+
96+
public:
9797
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
9898
DYNAMIC_GRAPH_ENTITY_DECL();
9999

@@ -110,15 +110,15 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
110110
dg::SignalTimeDependent< dg::Matrix,int >&
111111
createJacobianSignal( const std::string& signame, const std::string& );
112112
void destroyJacobianSignal( const std::string& signame );
113-
113+
114114
dg::SignalTimeDependent< MatrixHomogeneous,int >&
115115
createPositionSignal( const std::string&,const std::string& );
116116
void destroyPositionSignal( const std::string& signame );
117-
117+
118118
dg::SignalTimeDependent< dg::Vector,int >&
119119
createVelocitySignal( const std::string&,const std::string& );
120120
void destroyVelocitySignal( const std::string& signame );
121-
121+
122122
dg::SignalTimeDependent< dg::Vector,int >&
123123
createAccelerationSignal( const std::string&, const std::string& );
124124
void destroyAccelerationSignal( const std::string& signame );
@@ -137,7 +137,7 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
137137
dg::SignalPtr<dg::Vector,int> freeFlyerVelocitySIN;
138138
dg::SignalPtr<dg::Vector,int> jointAccelerationSIN;
139139
dg::SignalPtr<dg::Vector,int> freeFlyerAccelerationSIN;
140-
140+
141141
dg::SignalTimeDependent<dg::Vector,int> pinocchioPosSINTERN;
142142
dg::SignalTimeDependent<dg::Vector,int> pinocchioVelSINTERN;
143143
dg::SignalTimeDependent<dg::Vector,int> pinocchioAccSINTERN;
@@ -151,17 +151,17 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
151151
int& computeForwardKinematics(int& dummy,const int& time );
152152
int& computeCcrba( int& dummy,const int& time );
153153
int& computeJacobians( int& dummy,const int& time );
154-
154+
155155
dg::SignalTimeDependent<dg::Vector,int> zmpSOUT;
156156
dg::SignalTimeDependent<dg::Matrix,int> JcomSOUT;
157157
dg::SignalTimeDependent<dg::Vector,int> comSOUT;
158158
dg::SignalTimeDependent<dg::Matrix,int> inertiaSOUT;
159-
159+
160160
dg::SignalTimeDependent<dg::Matrix,int>& jacobiansSOUT( const std::string& name );
161161
dg::SignalTimeDependent<MatrixHomogeneous,int>& positionsSOUT( const std::string& name );
162162
dg::SignalTimeDependent<dg::Vector,int>& velocitiesSOUT( const std::string& name );
163163
dg::SignalTimeDependent<dg::Vector,int>& accelerationsSOUT( const std::string& name );
164-
164+
165165
dg::SignalTimeDependent<double,int> footHeightSOUT;
166166
dg::SignalTimeDependent<dg::Vector,int> upperJlSOUT;
167167
dg::SignalTimeDependent<dg::Vector,int> lowerJlSOUT;
@@ -184,14 +184,14 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
184184

185185
/* --- MODEL CREATION --- */
186186

187-
188-
void displayModel() const
187+
188+
void displayModel() const
189189
{ assert(m_model); std::cout<<(*m_model)<<std::endl; };
190190

191191
void setModel(se3::Model*);
192192

193193
void setData(se3::Data*);
194-
194+
195195
/* --- GETTERS --- */
196196

197197
/// \brief Get joint position lower limits
@@ -228,7 +228,7 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
228228
dg::Matrix& computeGenericEndeffJacobian(const bool isFrame,
229229
const int jointId,
230230
dg::Matrix& res,const int& time );
231-
MatrixHomogeneous& computeGenericPosition(const bool isFrame,
231+
MatrixHomogeneous& computeGenericPosition(const bool isFrame,
232232
const int jointId,
233233
MatrixHomogeneous& res,const int& time );
234234
dg::Vector& computeGenericVelocity(const int jointId,dg::Vector& res,const int& time );
@@ -246,9 +246,6 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
246246
dg::Vector& computeTorqueDrift( dg::Vector& res,const int& time );
247247

248248
public: /* --- PARAMS --- */
249-
virtual void commandLine( const std::string& cmdLine,
250-
std::istringstream& cmdArgs,
251-
std::ostream& os );
252249
void cmd_createOpPointSignals ( const std::string& sig,const std::string& j );
253250
void cmd_createJacobianWorldSignal ( const std::string& sig,const std::string& j );
254251
void cmd_createJacobianEndEffectorSignal( const std::string& sig,const std::string& j );
@@ -258,11 +255,11 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
258255

259256
private:
260257
/// \brief map of joints in construction.
261-
/// map: jointName -> (jointType,jointPosition (in parent frame), function_ptr to pinocchio Joint)
258+
/// map: jointName -> (jointType,jointPosition (in parent frame), function_ptr to pinocchio Joint)
262259
dg::Vector& getPinocchioPos(dg::Vector& q,const int& time);
263260
dg::Vector& getPinocchioVel(dg::Vector& v, const int& time);
264261
dg::Vector& getPinocchioAcc(dg::Vector& a, const int&time);
265-
262+
266263
//\brief Index list for the first dof of (spherical joints)/ (spherical part of free-flyer joint).
267264
std::vector<int> sphericalJoints;
268265

include/sot-dynamic-pinocchio/force-compensation.h

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
/* --- API ------------------------------------------------------------- */
4444
/* --------------------------------------------------------------------- */
4545

46-
#if defined (WIN32)
46+
#if defined (WIN32)
4747
# if defined (force_compensation_EXPORTS)
4848
# define SOTFORCECOMPENSATION_EXPORT __declspec(dllexport)
49-
# else
49+
# else
5050
# define SOTFORCECOMPENSATION_EXPORT __declspec(dllimport)
51-
# endif
51+
# endif
5252
#else
5353
# define SOTFORCECOMPENSATION_EXPORT
5454
#endif
@@ -70,12 +70,12 @@ namespace dynamicgraph { namespace sot {
7070

7171
public:
7272
ForceCompensation( void );
73-
static MatrixForce& computeHandXworld(
73+
static MatrixForce& computeHandXworld(
7474
const MatrixRotation & worldRhand,
7575
const dynamicgraph::Vector & transSensorCom,
7676
MatrixForce& res );
7777

78-
78+
7979
static MatrixForce& computeHandVsensor( const MatrixRotation & sensorRhand,
8080
MatrixForce& res );
8181
static MatrixForce& computeSensorXhand( const MatrixRotation & sensorRhand,
@@ -106,7 +106,7 @@ namespace dynamicgraph { namespace sot {
106106
static dynamicgraph::Vector& computeDeadZone( const dynamicgraph::Vector& torqueInput,
107107
const dynamicgraph::Vector& deadZoneLimit,
108108
dynamicgraph::Vector& res );
109-
109+
110110
public: // CALIBRATION
111111

112112
std::list<dynamicgraph::Vector> torsorList;
@@ -115,15 +115,15 @@ namespace dynamicgraph { namespace sot {
115115
void clearCalibration( void );
116116
void addCalibrationValue( const dynamicgraph::Vector& torsor,
117117
const MatrixRotation & worldRhand );
118-
118+
119119
dynamicgraph::Vector calibrateTransSensorCom( const dynamicgraph::Vector& gravity,
120120
const MatrixRotation& handRsensor );
121121
dynamicgraph::Vector calibrateGravity( const MatrixRotation& handRsensor,
122122
bool precompensationCalibration = false,
123123
const MatrixRotation& hand0Rsensor = I3 );
124124

125-
126-
125+
126+
127127
};
128128

129129
/* --------------------------------------------------------------------- */
@@ -147,50 +147,43 @@ namespace dynamicgraph { namespace sot {
147147
public: /* --- SIGNAL --- */
148148

149149
/* --- INPUTS --- */
150-
dg::SignalPtr<dynamicgraph::Vector,int> torsorSIN;
151-
dg::SignalPtr<MatrixRotation,int> worldRhandSIN;
150+
dg::SignalPtr<dynamicgraph::Vector,int> torsorSIN;
151+
dg::SignalPtr<MatrixRotation,int> worldRhandSIN;
152152

153153
/* --- CONSTANTS --- */
154-
dg::SignalPtr<MatrixRotation,int> handRsensorSIN;
155-
dg::SignalPtr<dynamicgraph::Vector,int> translationSensorComSIN;
156-
dg::SignalPtr<dynamicgraph::Vector,int> gravitySIN;
157-
dg::SignalPtr<dynamicgraph::Vector,int> precompensationSIN;
158-
dg::SignalPtr<dynamicgraph::Matrix,int> gainSensorSIN;
159-
dg::SignalPtr<dynamicgraph::Vector,int> deadZoneLimitSIN;
160-
dg::SignalPtr<dynamicgraph::Vector,int> transSensorJointSIN;
161-
dg::SignalPtr<dynamicgraph::Matrix,int> inertiaJointSIN;
162-
163-
dg::SignalPtr<dynamicgraph::Vector,int> velocitySIN;
164-
dg::SignalPtr<dynamicgraph::Vector,int> accelerationSIN;
154+
dg::SignalPtr<MatrixRotation,int> handRsensorSIN;
155+
dg::SignalPtr<dynamicgraph::Vector,int> translationSensorComSIN;
156+
dg::SignalPtr<dynamicgraph::Vector,int> gravitySIN;
157+
dg::SignalPtr<dynamicgraph::Vector,int> precompensationSIN;
158+
dg::SignalPtr<dynamicgraph::Matrix,int> gainSensorSIN;
159+
dg::SignalPtr<dynamicgraph::Vector,int> deadZoneLimitSIN;
160+
dg::SignalPtr<dynamicgraph::Vector,int> transSensorJointSIN;
161+
dg::SignalPtr<dynamicgraph::Matrix,int> inertiaJointSIN;
162+
163+
dg::SignalPtr<dynamicgraph::Vector,int> velocitySIN;
164+
dg::SignalPtr<dynamicgraph::Vector,int> accelerationSIN;
165165

166166
/* --- INTERMEDIATE OUTPUTS --- */
167-
dg::SignalTimeDependent<MatrixForce,int> handXworldSOUT;
168-
dg::SignalTimeDependent<MatrixForce,int> handVsensorSOUT;
169-
dg::SignalPtr<dynamicgraph::Vector,int> torsorDeadZoneSIN;
167+
dg::SignalTimeDependent<MatrixForce,int> handXworldSOUT;
168+
dg::SignalTimeDependent<MatrixForce,int> handVsensorSOUT;
169+
dg::SignalPtr<dynamicgraph::Vector,int> torsorDeadZoneSIN;
170170

171171
dg::SignalTimeDependent<MatrixForce,int> sensorXhandSOUT;
172172
//dg::SignalTimeDependent<dynamicgraph::Matrix,int> inertiaSensorSOUT;
173-
dg::SignalTimeDependent<dynamicgraph::Vector,int> momentumSOUT;
174-
dg::SignalPtr<dynamicgraph::Vector,int> momentumSIN;
173+
dg::SignalTimeDependent<dynamicgraph::Vector,int> momentumSOUT;
174+
dg::SignalPtr<dynamicgraph::Vector,int> momentumSIN;
175175

176176
/* --- OUTPUTS --- */
177-
dg::SignalTimeDependent<dynamicgraph::Vector,int> torsorCompensatedSOUT;
177+
dg::SignalTimeDependent<dynamicgraph::Vector,int> torsorCompensatedSOUT;
178178
dg::SignalTimeDependent<dynamicgraph::Vector,int> torsorDeadZoneSOUT;
179179

180180
typedef int sotDummyType;
181-
dg::SignalTimeDependent<sotDummyType,int> calibrationTrigerSOUT;
181+
dg::SignalTimeDependent<sotDummyType,int> calibrationTrigerSOUT;
182182

183183
public: /* --- COMMANDLINE --- */
184184

185185
sotDummyType& calibrationTriger( sotDummyType& dummy,int time );
186186

187-
188-
virtual void commandLine( const std::string& cmdLine,
189-
std::istringstream& cmdArgs,
190-
std::ostream& os );
191-
192-
193-
194187
};
195188

196189

include/sot-dynamic-pinocchio/integrator-force-exact.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
/* --- API ------------------------------------------------------------- */
4545
/* --------------------------------------------------------------------- */
4646

47-
#if defined (WIN32)
47+
#if defined (WIN32)
4848
# if defined (integrator_force_exact_EXPORTS)
4949
# define SOTINTEGRATORFORCEEXACT_EXPORT __declspec(dllexport)
50-
# else
50+
# else
5151
# define SOTINTEGRATORFORCEEXACT_EXPORT __declspec(dllimport)
52-
# endif
52+
# endif
5353
#else
5454
# define SOTINTEGRATORFORCEEXACT_EXPORT
5555
#endif
@@ -81,12 +81,6 @@ class SOTINTEGRATORFORCEEXACT_EXPORT IntegratorForceExact
8181
public: /* --- FUNCTIONS --- */
8282
dynamicgraph::Vector& computeVelocityExact( dynamicgraph::Vector& res,
8383
const int& time );
84-
85-
/* public: /\* --- PARAMS --- *\/ */
86-
/* virtual void commandLine( const std::string& cmdLine, */
87-
/* std::istringstream& cmdArgs, */
88-
/* std::ostream& os ); */
89-
9084

9185
};
9286

include/sot-dynamic-pinocchio/integrator-force-rk4.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
/* --- API ------------------------------------------------------------- */
4545
/* --------------------------------------------------------------------- */
4646

47-
#if defined (WIN32)
47+
#if defined (WIN32)
4848
# if defined (integrator_force_rk4_EXPORTS)
4949
# define SOTINTEGRATORFORCERK4_EXPORT __declspec(dllexport)
50-
# else
50+
# else
5151
# define SOTINTEGRATORFORCERK4_EXPORT __declspec(dllimport)
52-
# endif
52+
# endif
5353
#else
5454
# define SOTINTEGRATORFORCERK4_EXPORT
5555
#endif
@@ -81,12 +81,6 @@ class SOTINTEGRATORFORCERK4_EXPORT IntegratorForceRK4
8181
public: /* --- FUNCTIONS --- */
8282
dynamicgraph::Vector& computeDerivativeRK4( dynamicgraph::Vector& res,
8383
const int& time );
84-
85-
/* public: /\* --- PARAMS --- *\/ */
86-
/* virtual void commandLine( const std::string& cmdLine, */
87-
/* std::istringstream& cmdArgs, */
88-
/* std::ostream& os ); */
89-
9084

9185
};
9286

include/sot-dynamic-pinocchio/integrator-force.h

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
/* --- API ------------------------------------------------------------- */
4444
/* --------------------------------------------------------------------- */
4545

46-
#if defined (WIN32)
46+
#if defined (WIN32)
4747
# if defined (integrator_force_EXPORTS)
4848
# define SOTINTEGRATORFORCE_EXPORT __declspec(dllexport)
49-
# else
49+
# else
5050
# define SOTINTEGRATORFORCE_EXPORT __declspec(dllimport)
51-
# endif
51+
# endif
5252
#else
5353
# define SOTINTEGRATORFORCE_EXPORT
5454
#endif
@@ -80,18 +80,18 @@ class SOTINTEGRATORFORCE_EXPORT IntegratorForce
8080

8181
public: /* --- SIGNAL --- */
8282

83-
dg::SignalPtr<dynamicgraph::Vector,int> forceSIN;
84-
dg::SignalPtr<dynamicgraph::Matrix,int> massInverseSIN;
85-
dg::SignalPtr<dynamicgraph::Matrix,int> frictionSIN;
83+
dg::SignalPtr<dynamicgraph::Vector,int> forceSIN;
84+
dg::SignalPtr<dynamicgraph::Matrix,int> massInverseSIN;
85+
dg::SignalPtr<dynamicgraph::Matrix,int> frictionSIN;
8686

8787
/* Memory of the previous iteration. The sig is fed by the previous
8888
* computations. */
89-
dg::SignalPtr<dynamicgraph::Vector,int> velocityPrecSIN;
90-
dg::SignalTimeDependent<dynamicgraph::Vector,int> velocityDerivativeSOUT;
91-
dg::SignalTimeDependent<dynamicgraph::Vector,int> velocitySOUT;
89+
dg::SignalPtr<dynamicgraph::Vector,int> velocityPrecSIN;
90+
dg::SignalTimeDependent<dynamicgraph::Vector,int> velocityDerivativeSOUT;
91+
dg::SignalTimeDependent<dynamicgraph::Vector,int> velocitySOUT;
9292

93-
dg::SignalPtr<dynamicgraph::Matrix,int> massSIN;
94-
dg::SignalTimeDependent<dynamicgraph::Matrix,int> massInverseSOUT;
93+
dg::SignalPtr<dynamicgraph::Matrix,int> massSIN;
94+
dg::SignalTimeDependent<dynamicgraph::Matrix,int> massInverseSOUT;
9595

9696
public: /* --- FUNCTIONS --- */
9797
dynamicgraph::Vector& computeDerivative( dynamicgraph::Vector& res,
@@ -102,13 +102,6 @@ class SOTINTEGRATORFORCE_EXPORT IntegratorForce
102102
dynamicgraph::Matrix& computeMassInverse( dynamicgraph::Matrix& res,
103103
const int& time );
104104

105-
106-
public: /* --- PARAMS --- */
107-
virtual void commandLine( const std::string& cmdLine,
108-
std::istringstream& cmdArgs,
109-
std::ostream& os );
110-
111-
112105
};
113106

114107

0 commit comments

Comments
 (0)