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
38553b3f
Commit
38553b3f
authored
3 years ago
by
Pierre-Alexandre Leziart
Browse files
Options
Downloads
Patches
Plain Diff
Example of walking gait
parent
9cb07cd6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Gait.cpp
+1
-1
1 addition, 1 deletion
src/Gait.cpp
src/config_solo12.yaml
+2
-2
2 additions, 2 deletions
src/config_solo12.yaml
src/main.cpp
+2
-2
2 additions, 2 deletions
src/main.cpp
with
5 additions
and
5 deletions
src/Gait.cpp
+
1
−
1
View file @
38553b3f
...
@@ -30,7 +30,7 @@ void Gait::initialize(double dt_in, double T_gait_in, double T_mpc_in, int N_gai
...
@@ -30,7 +30,7 @@ void Gait::initialize(double dt_in, double T_gait_in, double T_mpc_in, int N_gai
if
((
n_steps_
>
N_gait
)
||
((
int
)
std
::
lround
(
T_gait_in
/
dt_in
)
>
N_gait
))
if
((
n_steps_
>
N_gait
)
||
((
int
)
std
::
lround
(
T_gait_in
/
dt_in
)
>
N_gait
))
throw
std
::
invalid_argument
(
"Sizes of matrices are too small for considered durations. Increase N_gait in config file."
);
throw
std
::
invalid_argument
(
"Sizes of matrices are too small for considered durations. Increase N_gait in config file."
);
create_
trot
();
create_
walk
();
create_gait_f
();
create_gait_f
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/config_solo12.yaml
+
2
−
2
View file @
38553b3f
...
@@ -9,8 +9,8 @@ robot:
...
@@ -9,8 +9,8 @@ robot:
envID
:
0
# Identifier of the environment to choose in which one the simulation will happen
envID
:
0
# Identifier of the environment to choose in which one the simulation will happen
velID
:
2
# Identifier of the reference velocity profile to choose which one will be sent to the robot
velID
:
2
# Identifier of the reference velocity profile to choose which one will be sent to the robot
dt_mpc
:
0.02
# Time step of the model predictive control
dt_mpc
:
0.02
# Time step of the model predictive control
T_gait
:
0.
32
# Duration of one gait period
T_gait
:
0.
64
# Duration of one gait period
T_mpc
:
0.
32
# Duration of the prediction horizon
T_mpc
:
0.
64
# Duration of the prediction horizon
N_SIMULATION
:
3000
# Number of simulated wbc time steps
N_SIMULATION
:
3000
# Number of simulated wbc time steps
type_MPC
:
true
# Which MPC solver you want to use: True to have PA's MPC, to False to have Thomas's MPC
type_MPC
:
true
# Which MPC solver you want to use: True to have PA's MPC, to False to have Thomas's MPC
use_flat_plane
:
true
# If True the ground is flat, otherwise it has bumps
use_flat_plane
:
true
# If True the ground is flat, otherwise it has bumps
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
2
−
2
View file @
38553b3f
...
@@ -190,7 +190,7 @@ int main(int argc, char** argv) {
...
@@ -190,7 +190,7 @@ int main(int argc, char** argv) {
std::cout << desiredGait_ << std::endl;
std::cout << desiredGait_ << std::endl;
std::cout << "##" << std::endl;
std::cout << "##" << std::endl;
*/
*/
Gait
gait
=
Gait
();
/*
Gait gait = Gait();
gait.initialize(0.02, 0.32, 0.16);
gait.initialize(0.02, 0.32, 0.16);
std::cout << gait.getPastGait() << std::endl << "##" << std::endl;
std::cout << gait.getPastGait() << std::endl << "##" << std::endl;
...
@@ -204,7 +204,7 @@ int main(int argc, char** argv) {
...
@@ -204,7 +204,7 @@ int main(int argc, char** argv) {
std::cout << gait.getPastGait() << std::endl << "##" << std::endl;
std::cout << gait.getPastGait() << std::endl << "##" << std::endl;
std::cout << gait.getCurrentGait() << std::endl << "##" << std::endl;
std::cout << gait.getCurrentGait() << std::endl << "##" << std::endl;
std::cout << gait.getDesiredGait() << std::endl << "##" << std::endl;
std::cout << gait.getDesiredGait() << std::endl << "##" << std::endl;
}
}
*/
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
else
{
}
else
{
...
...
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