Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
tsid
Commits
342baae9
Commit
342baae9
authored
Sep 25, 2020
by
Jean-Baptiste Mouret
Browse files
put some space in templates to make non-compliant c++11 compiler happier
parent
d1e4a233
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/tsid/bindings/python/utils/container.hpp
View file @
342baae9
...
...
@@ -63,13 +63,13 @@ namespace tsid
}
inline
void
append_eq
(
double
num
,
std
::
shared_ptr
<
math
::
ConstraintEquality
>
i
){
m_std_const
.
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>>
(
num
,
i
));
m_std_const
.
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>
>
(
num
,
i
));
}
inline
void
append_ineq
(
double
num
,
std
::
shared_ptr
<
math
::
ConstraintInequality
>
i
){
m_std_const
.
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>>
(
num
,
i
));
m_std_const
.
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>
>
(
num
,
i
));
}
inline
void
append_bound
(
double
num
,
std
::
shared_ptr
<
math
::
ConstraintBound
>
i
){
m_std_const
.
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>>
(
num
,
i
));
m_std_const
.
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>
>
(
num
,
i
));
}
private:
ConstraintLevel
m_std_const
;
...
...
include/tsid/formulations/inverse-dynamics-formulation-acc-force.hpp
View file @
342baae9
...
...
@@ -150,10 +150,10 @@ namespace tsid
Data
m_data
;
HQPData
m_hqpData
;
std
::
vector
<
std
::
shared_ptr
<
TaskLevel
>>
m_taskMotions
;
std
::
vector
<
std
::
shared_ptr
<
TaskLevel
>>
m_taskContactForces
;
std
::
vector
<
std
::
shared_ptr
<
TaskLevel
>>
m_taskActuations
;
std
::
vector
<
std
::
shared_ptr
<
ContactLevel
>
>
m_contacts
;
std
::
vector
<
std
::
shared_ptr
<
TaskLevel
>
>
m_taskMotions
;
std
::
vector
<
std
::
shared_ptr
<
TaskLevel
>
>
m_taskContactForces
;
std
::
vector
<
std
::
shared_ptr
<
TaskLevel
>
>
m_taskActuations
;
std
::
vector
<
std
::
shared_ptr
<
ContactLevel
>
>
m_contacts
;
double
m_t
;
/// time
unsigned
int
m_k
;
/// number of contact-force variables
unsigned
int
m_v
;
/// number of acceleration variables
...
...
@@ -168,7 +168,7 @@ namespace tsid
Vector
m_f
;
Vector
m_tau
;
std
::
vector
<
std
::
shared_ptr
<
ContactTransitionInfo
>>
m_contactTransitions
;
std
::
vector
<
std
::
shared_ptr
<
ContactTransitionInfo
>
>
m_contactTransitions
;
};
}
...
...
include/tsid/solvers/fwd.hpp
View file @
342baae9
...
...
@@ -83,8 +83,8 @@ namespace tsid
{
return
aligned_pair
<
T1
,
T2
>
(
t1
,
t2
);
}
typedef
pinocchio
::
container
::
aligned_vector
<
aligned_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>>
>
ConstraintLevel
;
typedef
pinocchio
::
container
::
aligned_vector
<
aligned_pair
<
double
,
std
::
shared_ptr
<
const
math
::
ConstraintBase
>
>
>
ConstConstraintLevel
;
typedef
pinocchio
::
container
::
aligned_vector
<
aligned_pair
<
double
,
std
::
shared_ptr
<
math
::
ConstraintBase
>
>
>
ConstraintLevel
;
typedef
pinocchio
::
container
::
aligned_vector
<
aligned_pair
<
double
,
std
::
shared_ptr
<
const
math
::
ConstraintBase
>
>
>
ConstConstraintLevel
;
typedef
pinocchio
::
container
::
aligned_vector
<
ConstraintLevel
>
HQPData
;
typedef
pinocchio
::
container
::
aligned_vector
<
ConstConstraintLevel
>
ConstHQPData
;
...
...
src/formulations/inverse-dynamics-formulation-acc-force.cpp
View file @
342baae9
...
...
@@ -55,7 +55,7 @@ InverseDynamicsFormulationAccForce::InverseDynamicsFormulationAccForce(const std
m_in
=
0
;
m_hqpData
.
resize
(
2
);
m_Jc
.
setZero
(
m_k
,
m_v
);
m_hqpData
[
0
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>>
(
1.0
,
m_baseDynamics
));
m_hqpData
[
0
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>
>
(
1.0
,
m_baseDynamics
));
}
...
...
@@ -116,7 +116,7 @@ void InverseDynamicsFormulationAccForce::addTask(std::shared_ptr<TaskLevel> tl,
// don't use bounds for now because EiQuadProg doesn't exploit them anyway
// else
// tl->constraint = new ConstraintBound(c.name(), m_v+m_k);
m_hqpData
[
priorityLevel
].
push_back
(
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>>
(
weight
,
tl
->
constraint
));
m_hqpData
[
priorityLevel
].
push_back
(
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>
>
(
weight
,
tl
->
constraint
));
}
...
...
@@ -202,7 +202,7 @@ bool InverseDynamicsFormulationAccForce::addActuationTask(TaskActuation & task,
m_in
+=
c
.
rows
();
}
m_hqpData
[
priorityLevel
].
push_back
(
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>>
(
weight
,
tl
->
constraint
));
m_hqpData
[
priorityLevel
].
push_back
(
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>
>
(
weight
,
tl
->
constraint
));
return
true
;
}
...
...
@@ -240,15 +240,15 @@ bool InverseDynamicsFormulationAccForce::addRigidContact(ContactBase & contact,
const
ConstraintBase
&
motionConstr
=
contact
.
getMotionConstraint
();
cl
->
motionConstraint
=
std
::
make_shared
<
ConstraintEquality
>
(
contact
.
name
()
+
"_motion_task"
,
motionConstr
.
rows
(),
m_v
+
m_k
);
m_hqpData
[
motionPriorityLevel
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>>
(
motion_weight
,
cl
->
motionConstraint
));
m_hqpData
[
motionPriorityLevel
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>
>
(
motion_weight
,
cl
->
motionConstraint
));
const
ConstraintInequality
&
forceConstr
=
contact
.
getForceConstraint
();
cl
->
forceConstraint
=
std
::
make_shared
<
ConstraintInequality
>
(
contact
.
name
()
+
"_force_constraint"
,
forceConstr
.
rows
(),
m_v
+
m_k
);
m_hqpData
[
0
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>>
(
1.0
,
cl
->
forceConstraint
));
m_hqpData
[
0
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>
>
(
1.0
,
cl
->
forceConstraint
));
const
ConstraintEquality
&
forceRegConstr
=
contact
.
getForceRegularizationTask
();
cl
->
forceRegTask
=
std
::
make_shared
<
ConstraintEquality
>
(
contact
.
name
()
+
"_force_reg_task"
,
forceRegConstr
.
rows
(),
m_v
+
m_k
);
m_hqpData
[
1
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>>
(
force_regularization_weight
,
cl
->
forceRegTask
));
m_hqpData
[
1
].
push_back
(
solvers
::
make_pair
<
double
,
std
::
shared_ptr
<
ConstraintBase
>
>
(
force_regularization_weight
,
cl
->
forceRegTask
));
m_eq
+=
motionConstr
.
rows
();
m_in
+=
forceConstr
.
rows
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment