Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-centroidal-dynamics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Humanoid Path Planner
hpp-centroidal-dynamics
Commits
2b5d56a8
Commit
2b5d56a8
authored
7 years ago
by
t steve
Browse files
Options
Downloads
Patches
Plain Diff
mass and gravity are public const
parent
a6b81668
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/centroidal-dynamics-lib/centroidal_dynamics.hh
+4
-2
4 additions, 2 deletions
include/centroidal-dynamics-lib/centroidal_dynamics.hh
src/centroidal_dynamics.cpp
+5
-4
5 additions, 4 deletions
src/centroidal_dynamics.cpp
with
9 additions
and
6 deletions
include/centroidal-dynamics-lib/centroidal_dynamics.hh
+
4
−
2
View file @
2b5d56a8
...
...
@@ -26,6 +26,10 @@ enum CENTROIDAL_DYNAMICS_DLLAPI EquilibriumAlgorithm
class
CENTROIDAL_DYNAMICS_DLLAPI
Equilibrium
{
public:
const
double
m_mass
;
/// mass of the system
const
Vector3
m_gravity
;
/// gravity vector
private:
static
bool
m_is_cdd_initialized
;
/// true if cdd lib has been initialized, false otherwise
...
...
@@ -35,8 +39,6 @@ private:
SolverLP
m_solver_type
;
/// type of LP solver
unsigned
int
m_generatorsPerContact
;
/// number of generators to approximate the friction cone per contact point
double
m_mass
;
/// mass of the system
Vector3
m_gravity
;
/// gravity vector
/** Gravito-inertial wrench generators (6 X numberOfContacts*generatorsPerContact) */
Matrix6X
m_G_centr
;
...
...
This diff is collapsed.
Click to expand it.
src/centroidal_dynamics.cpp
+
5
−
4
View file @
2b5d56a8
...
...
@@ -20,7 +20,9 @@ bool Equilibrium::m_is_cdd_initialized = false;
Equilibrium
::
Equilibrium
(
const
string
&
name
,
const
double
mass
,
const
unsigned
int
generatorsPerContact
,
const
SolverLP
solver_type
,
const
bool
useWarmStart
,
const
unsigned
int
max_num_cdd_trials
,
const
bool
canonicalize_cdd_matrix
)
:
m_is_cdd_stable
(
true
)
:
m_mass
(
mass
)
,
m_gravity
(
0.
,
0.
,
-
9.81
)
,
m_is_cdd_stable
(
true
)
,
max_num_cdd_trials
(
max_num_cdd_trials
)
,
canonicalize_cdd_matrix
(
canonicalize_cdd_matrix
)
{
...
...
@@ -43,9 +45,8 @@ Equilibrium::Equilibrium(const string& name, const double mass, const unsigned i
m_generatorsPerContact
=
3
;
}
m_mass
=
mass
;
m_gravity
.
setZero
();
m_gravity
(
2
)
=
-
9.81
;
/*m_gravity.setZero();
m_gravity(2) = -9.81;*/
m_d
.
setZero
();
m_d
.
head
<
3
>
()
=
m_mass
*
m_gravity
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment