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
5e351f9f
Commit
5e351f9f
authored
3 years ago
by
odri
Browse files
Options
Downloads
Patches
Plain Diff
Kp and Kd are now vectors of size 3 + Ngait is automatically chosen
parent
2583ba5d
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/qrw/Params.hpp
+4
-4
4 additions, 4 deletions
include/qrw/Params.hpp
src/Params.cpp
+5
-11
5 additions, 11 deletions
src/Params.cpp
with
9 additions
and
15 deletions
include/qrw/Params.hpp
+
4
−
4
View file @
5e351f9f
...
...
@@ -56,15 +56,13 @@ class Params {
// General control parameters
std
::
vector
<
double
>
q_init
;
// Initial articular positions
double
dt_wbc
;
// Time step of the whole body control
int
N_gait
;
// Number of rows in the gait matrix. Arbitrary value that should be set high enough so that there is
// always at least one empty line at the end of the gait matrix
double
dt_mpc
;
// Time step of the model predictive control
double
T_gait
;
// Duration of one gait period
double
T_mpc
;
// Duration of the prediction horizon
int
type_MPC
;
// Which MPC solver you want to use: 0 for OSQP MPC, 1, 2, 3 for Crocoddyl MPCs
bool
kf_enabled
;
// Use complementary filter (False) or kalman filter (True) for the estimator
double
Kp_main
;
// Proportional gains for the PD+
double
Kd_main
;
// Derivative gains for the PD+
std
::
vector
<
double
>
Kp_main
;
// Proportional gains for the PD+
std
::
vector
<
double
>
Kd_main
;
// Derivative gains for the PD+
double
Kff_main
;
// Feedforward torques multiplier for the PD+
// Parameters of Estimator
...
...
@@ -94,6 +92,8 @@ class Params {
double
Fz_min
;
// Minimal vertical contact force [N]
// Not defined in yaml
int
N_gait
;
// Number of rows in the gait matrix. Arbitrary value that should be set high enough so that there is
// always at least one empty line at the end of the gait matrix
double
mass
;
// Mass of the robot
std
::
vector
<
double
>
I_mat
;
// Inertia matrix
double
h_ref
;
// Reference height for the base
...
...
This diff is collapsed.
Click to expand it.
src/Params.cpp
+
5
−
11
View file @
5e351f9f
...
...
@@ -19,14 +19,13 @@ Params::Params()
q_init
(
12
,
0.0
),
// Fill with zeros, will be filled with values later
dt_wbc
(
0.0
),
N_gait
(
0
),
dt_mpc
(
0.0
),
T_gait
(
0.0
),
T_mpc
(
0.0
),
type_MPC
(
0
),
kf_enabled
(
false
),
Kp_main
(
0.0
),
Kd_main
(
0.0
),
Kp_main
(
3
,
0.0
),
Kd_main
(
3
,
0.0
),
Kff_main
(
0.0
),
fc_v_esti
(
0.0
),
...
...
@@ -49,6 +48,7 @@ Params::Params()
Fz_max
(
0.0
),
Fz_min
(
0.0
),
N_gait
(
0
),
mass
(
0.0
),
I_mat
(
9
,
0.0
),
// Fill with zeros, will be filled with values later
h_ref
(
0.0
),
...
...
@@ -84,9 +84,6 @@ void Params::initialize(const std::string& file_path) {
assert_yaml_parsing
(
robot_node
,
"robot"
,
"dt_wbc"
);
dt_wbc
=
robot_node
[
"dt_wbc"
].
as
<
double
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"N_gait"
);
N_gait
=
robot_node
[
"N_gait"
].
as
<
int
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"envID"
);
envID
=
robot_node
[
"envID"
].
as
<
int
>
();
...
...
@@ -117,9 +114,6 @@ void Params::initialize(const std::string& file_path) {
assert_yaml_parsing
(
robot_node
,
"robot"
,
"predefined_vel"
);
predefined_vel
=
robot_node
[
"predefined_vel"
].
as
<
bool
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"kf_enabled"
);
kf_enabled
=
robot_node
[
"kf_enabled"
].
as
<
bool
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"enable_pyb_GUI"
);
enable_pyb_GUI
=
robot_node
[
"enable_pyb_GUI"
].
as
<
bool
>
();
...
...
@@ -133,10 +127,10 @@ void Params::initialize(const std::string& file_path) {
perfect_estimator
=
robot_node
[
"perfect_estimator"
].
as
<
bool
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"Kp_main"
);
Kp_main
=
robot_node
[
"Kp_main"
].
as
<
double
>
();
Kp_main
=
robot_node
[
"Kp_main"
].
as
<
std
::
vector
<
double
>
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"Kd_main"
);
Kd_main
=
robot_node
[
"Kd_main"
].
as
<
double
>
();
Kd_main
=
robot_node
[
"Kd_main"
].
as
<
std
::
vector
<
double
>
>
();
assert_yaml_parsing
(
robot_node
,
"robot"
,
"Kff_main"
);
Kff_main
=
robot_node
[
"Kff_main"
].
as
<
double
>
();
...
...
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