Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
quadruped-reactive-walking
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
Gepetto
quadruped-reactive-walking
Commits
00b81c77
Commit
00b81c77
authored
3 years ago
by
thomascbrs
Browse files
Options
Downloads
Patches
Plain Diff
Use the reference trajectory of the Com (True) or not (False) for shoulder/contact cost
parent
aa1056fa
No related branches found
No related tags found
1 merge request
!8
Merge devel_croco 26/08/2021
Pipeline
#15814
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/crocoddyl_class/MPC_crocoddyl_planner.py
+6
-2
6 additions, 2 deletions
scripts/crocoddyl_class/MPC_crocoddyl_planner.py
with
6 additions
and
2 deletions
scripts/crocoddyl_class/MPC_crocoddyl_planner.py
+
6
−
2
View file @
00b81c77
...
@@ -22,7 +22,7 @@ class MPC_crocoddyl_planner():
...
@@ -22,7 +22,7 @@ class MPC_crocoddyl_planner():
self
.
T_mpc
=
params
.
T_mpc
# Period of the MPC
self
.
T_mpc
=
params
.
T_mpc
# Period of the MPC
self
.
n_nodes
=
int
(
self
.
T_mpc
/
self
.
dt
)
# Number of nodes
self
.
n_nodes
=
int
(
self
.
T_mpc
/
self
.
dt
)
# Number of nodes
self
.
mass
=
params
.
mass
# Mass of the robot
self
.
mass
=
params
.
mass
# Mass of the robot
self
.
max_iteration
=
1
0
# Max iteration ddp solver
self
.
max_iteration
=
2
0
# Max iteration ddp solver
self
.
gI
=
np
.
array
(
params
.
I_mat
.
tolist
()).
reshape
((
3
,
3
))
# Inertia matrix in ody frame
self
.
gI
=
np
.
array
(
params
.
I_mat
.
tolist
()).
reshape
((
3
,
3
))
# Inertia matrix in ody frame
# Friction coefficient
# Friction coefficient
...
@@ -35,6 +35,7 @@ class MPC_crocoddyl_planner():
...
@@ -35,6 +35,7 @@ class MPC_crocoddyl_planner():
# Weights Vector : States
# Weights Vector : States
self
.
w_x
=
0.3
self
.
w_x
=
0.3
# self.w_y = 0.3
self
.
w_y
=
0.3
self
.
w_y
=
0.3
self
.
w_z
=
20
self
.
w_z
=
20
self
.
w_roll
=
0.9
self
.
w_roll
=
0.9
...
@@ -54,8 +55,9 @@ class MPC_crocoddyl_planner():
...
@@ -54,8 +55,9 @@ class MPC_crocoddyl_planner():
self
.
heuristicWeights
=
0.
*
np
.
array
(
4
*
[
0.03
,
0.04
])
# Weights on the heuristic term
self
.
heuristicWeights
=
0.
*
np
.
array
(
4
*
[
0.03
,
0.04
])
# Weights on the heuristic term
self
.
stepWeights
=
0.
*
np
.
full
(
8
,
0.005
)
# Weight on the step command (distance between steps)
self
.
stepWeights
=
0.
*
np
.
full
(
8
,
0.005
)
# Weight on the step command (distance between steps)
self
.
stopWeights
=
0.
*
np
.
ones
(
8
)
# Weights to stop the optimisation at the end of the flying phase
self
.
stopWeights
=
0.
*
np
.
ones
(
8
)
# Weights to stop the optimisation at the end of the flying phase
self
.
shoulderContactWeight
=
0.5
*
np
.
full
(
4
,
1.
)
# Weight for shoulder-to-contact penalty
self
.
shoulderContactWeight
=
1.
*
np
.
full
(
4
,
1.
)
# Weight for shoulder-to-contact penalty
self
.
shoulder_hlim
=
0.235
self
.
shoulder_hlim
=
0.235
self
.
shoulderReferencePosition
=
True
# Use the reference trajectory of the Com (True) or not (False) for shoulder/contact cost
# TODO : create a proper warm-start with the previous optimisation
# TODO : create a proper warm-start with the previous optimisation
self
.
warm_start
=
True
self
.
warm_start
=
True
...
@@ -339,6 +341,8 @@ class MPC_crocoddyl_planner():
...
@@ -339,6 +341,8 @@ class MPC_crocoddyl_planner():
model
.
relative_forces
=
True
model
.
relative_forces
=
True
model
.
shoulderContactWeight
=
self
.
shoulderContactWeight
model
.
shoulderContactWeight
=
self
.
shoulderContactWeight
model
.
shoulder_hlim
=
self
.
shoulder_hlim
model
.
shoulder_hlim
=
self
.
shoulder_hlim
model
.
shoulderReferencePosition
=
self
.
shoulderReferencePosition
# print(model.referenceShoulderPosition)
# Weights vectors
# Weights vectors
model
.
stateWeights
=
self
.
stateWeights
model
.
stateWeights
=
self
.
stateWeights
...
...
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