Skip to content

Commit

Permalink
removed -j4 flag, may cause error for some computer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayonga committed Jul 20, 2018
1 parent a3679a9 commit 44d1c04
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cassie Gait Library Optimization using C-FROST

This repository contains an example using C-FROST to generate a library of walking gaits for Cassie series robot. The code depends on [FROST](https://github.com/ayonga/frost-dev) and [C-FROST](https://github.com/UMich-BipedLab/C-Frost). The Cassie model used in this example can be found [here](https://github.com/UMich-BipedLab/Cassie_Model). These dependant packages are also included as [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for convenience.
This repository contains an example using C-FROST to generate a library of walking gaits for Cassie series robot. The code depends on [FROST](https://github.com/ayonga/frost-dev) and [C-FROST](https://github.com/UMich-BipedLab/C-Frost). The Cassie model used in this example can be found [here](https://github.com/UMich-BipedLab/Cassie_Model). These dependant packages are also included as [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for convenience.

This example has been tested on Ubuntu 16.04 and Windows Subsystem on Linux (WSL).

Expand All @@ -24,15 +24,15 @@ To run the optimization using C-FROST, first needs to set up the problem in MATL

## Generate functions for system dynamics ##

First, run [`gen_lib.m`](https://github.com/UMich-BipedLab/Cassie_CFROST/blob/master/Cassie_Example/cassie_dynamics_library/gen_lib.m) script in MATLAB. This process may take a while to finish. By default, we drop the velocity terms ($C(q)\dot{q}$) from the dynamics equation. To include them, set `OMIT_CORIOLIS` to `false` in `gen_lib.m` script, and re-run the script. After successfully run the script in matlab, you should find three new directories, `src`, `include`, and `mex`.
First, run [`gen_lib.m`](https://github.com/UMich-BipedLab/Cassie_CFROST/blob/master/Cassie_Example/cassie_dynamics_library/gen_lib.m) script in MATLAB. This process may take a while to finish. By default, we drop the velocity terms ($C(q)\dot{q}$) from the dynamics equation. To include them, set `OMIT_CORIOLIS` to `false` in `gen_lib.m` script, and re-run the script. After successfully run the script in matlab, you should find three new directories, `src`, `include`, and `mex`.

In terminal, run the following to compile the static library:
``` shell
cd ~/Cassie_CFROST/Cassie_Example/cassie_dynamics-library
mkdir build
cd build
cmake ..
make -j4
make
make install
```

Expand All @@ -56,7 +56,7 @@ cd ~/Cassie_CFROST/Cassie_Example/opt_two_step/periodic/c_code
mkdir build
cd build
cmake ..
make -j4
make
make install
cd ..
```
Expand All @@ -80,7 +80,7 @@ C-FROST will export the optimization results to the specified JSON file. This ca

With C-FROST, it is easy to run multiple gait optimization in parallel. You do not need to recompile the program as long as these optimizations use the same problem strcuture (same set of variables, constraints and cost functions). To run multiple optimization with different bounds, you would need to generate the bound JSON files for all optimization a priori.

In this example, we generate 11x11x11=1,331 gaits with different walking speeds and ground inclinations. This can be done by changing the constraints bounds in the same optimization problem.
In this example, we generate 11x11x11=1,331 gaits with different walking speeds and ground inclinations. This can be done by changing the constraints bounds in the same optimization problem.

In MATLAB, run [`generate_multiple_bounds.m`](https://github.com/UMich-BipedLab/Cassie_CFROST/blob/master/Cassie_example/opt_two_step/generate_multiple_bounds.m) script to generate all bound files first. The process may take a while to finish.

Expand All @@ -95,5 +95,3 @@ time parallel ./program --initial 'res/init.json' --options '../ipopt.opt' --dat
```

The optimization results will be saved to `local/output/` folder, and the terminal outputs will be save to `local/log` folder. The scripts [`export_all_gaits.m`](https://github.com/UMich-BipedLab/Cassie_CFROST/blob/master/Cassie_example/opt_two_step/export_all_gaits.m) and [`check_logs.m`](https://github.com/UMich-BipedLab/Cassie_CFROST/blob/master/Cassie_example/opt_two_step/check_logs.m) can be used to import the resuls into MATLAB and check the log files.


0 comments on commit 44d1c04

Please sign in to comment.