Skip to content

CrEGOpt: Gait Optimization for Legged Systems Through Mixed Distribution Cross-Entropy Optimization

License

Notifications You must be signed in to change notification settings

NOSALRO/cregopt

Repository files navigation

CrEGOpt: Cross Entropy Gait Optimization For Legged Systems

Official code implementation of the paper entitled Gait Optimization for Legged Systems Through Mixed Distribution Cross-Entropy Optimization by Ioannis Tsikelis and Konstantinos Chatzilygeroudis.

See more at https://nosalro.github.io/cregopt.

concept_figure

Maintainers

Citing CrEGOpt

If you use this code in a scientific publication, please use the following citation:

@inproceedings{tsikelis2024gait,
      title={Gait Optimization for Legged Systems Through Mixed Distribution Cross-Entropy Optimization},
      author={Tsikelis, Ioannis and Chatzilygeroudis, Konstantinos},
      booktitle={IEEE-RAS International Conference on Humanoid Robots (Humanoids)},
      year={2024}
    }

Replicating the paper results

Download code and set up docker

Clone this repository.

git clone [email protected]:NOSALRO/cregopt.git

The required libraries are added as submodules.

cd cregopt/.ci/
git submodule init
git submodule update

*This code uses the HSL_MA97 parallel solver package for IPOPT, which is licensed (more info here). If you have the .zip file, you should extract its contents in .ci/coinshl/.

Build the docker image.

docker build -t ipopt .

Start the docker container.

cd .. # cd to the project root directory
docker run --rm -it --net=host -e DISPLAY -v ${HOME}/.Xauthority:/home/robot/.Xauthority -v "$(pwd)":/home/robot/code --entrypoint /bin/bash ipopt

Run the experiments

In the docker container build the experiment executables and run the bash script that generates and stores the results:

cd code/
mkdir build && cd build
cmake ..
make -j
cd ..# cd to project's root directory
cd tools/

./run_experiment_1 # Run 1st paper experiment.
./run_experiment_2 # Run 2nd paper experiment.
./run_experiment_3 # Run 3rd paper experiment.

The run_experiment scripts save their results in tools/results/.

For each run there are for files:

  • results.txt : the results of the cregopt loop used for the comparisons (wall time, success and number of iterations)
  • best_discrete.csv : with the best solution of the discrete CEM-MD distribution
  • best_continuous.csv : with the best solution of the continuous CEM-MD distribution
  • trajectory.txt : samples of the generated SRBD trajectory for use in the pyhton visualization script

Vizualize the results

In the docker container, run the python visualization script with the robot and results file of your choice:

cd code/
cd python/viz/
python viz.py --robot [biped, quad, hex] --data[path_to_trajectory.txt] --terrain [flat,step]

To see all available options of the visualization script run:

python viz.py -h

Acknowledgments

This work was supported by the Hellenic Foundation for Research and Innovation (H.F.R.I.) under the "3rd Call for H.F.R.I. Research Projects to support Post-Doctoral Researchers" (Project Acronym: NOSALRO, Project Number: 7541).

logo_elidek

This work was conducted within the Laboratory of Automation and Robotics (LAR), Department of Electrical and Computer Engineering, and the Computational Intelligence Lab (CILab), Department of Mathematics at the University of Patras, Greece.

logo_lar
logo_cilab logo_upatras

About

CrEGOpt: Gait Optimization for Legged Systems Through Mixed Distribution Cross-Entropy Optimization

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published