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
Humanoid Path Planner
hpp-centroidal-dynamics
Commits
c7bef7ad
Unverified
Commit
c7bef7ad
authored
Feb 23, 2021
by
stonneau
Committed by
GitHub
Feb 23, 2021
Browse files
Merge pull request #11 from JasonChmn/Topic/AddDestructor
[Fix] add destructor to avoid memory leak.
parents
c84717bc
1cdd40bf
Pipeline
#13267
passed with stage
in 1 minute and 49 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
include/hpp/centroidal-dynamics/centroidal_dynamics.hh
View file @
c7bef7ad
...
...
@@ -97,6 +97,8 @@ class CENTROIDAL_DYNAMICS_DLLAPI Equilibrium {
Equilibrium
(
const
Equilibrium
&
other
);
~
Equilibrium
();
/**
* @brief Returns the useWarmStart flag.
* @return True if the LP solver is allowed to use warm start, false otherwise.
...
...
include/hpp/centroidal-dynamics/solver_LP_abstract.hh
View file @
c7bef7ad
...
...
@@ -51,6 +51,8 @@ class CENTROIDAL_DYNAMICS_DLLAPI Solver_LP_abstract {
m_useWarmStart
=
true
;
}
virtual
~
Solver_LP_abstract
()
{}
/**
* @brief Create a new LP solver of the specified type.
* @param solverType Type of LP solver.
...
...
include/hpp/centroidal-dynamics/solver_LP_qpoases.hh
View file @
c7bef7ad
...
...
@@ -25,6 +25,8 @@ class CENTROIDAL_DYNAMICS_DLLAPI Solver_LP_qpoases : public Solver_LP_abstract {
public:
Solver_LP_qpoases
();
virtual
~
Solver_LP_qpoases
()
{}
/** Solve the linear program
* minimize c' x
* subject to Alb <= A x <= Aub
...
...
src/centroidal_dynamics.cpp
View file @
c7bef7ad
...
...
@@ -72,6 +72,10 @@ Equilibrium::Equilibrium(const string& name, const double mass, const unsigned i
m_D
.
block
<
3
,
3
>
(
3
,
0
)
=
crossMatrix
(
-
m_mass
*
m_gravity
);
}
Equilibrium
::~
Equilibrium
(){
delete
m_solver
;
}
bool
Equilibrium
::
computeGenerators
(
Cref_matrixX3
contactPoints
,
Cref_matrixX3
contactNormals
,
double
frictionCoefficient
,
const
bool
perturbate
)
{
long
int
c
=
contactPoints
.
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