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.
- Ioannis Tsikelis (Centre Inria de l'Université de Lorraine) - [email protected]
- Konstantinos Chatzilygeroudis (University of Patras) - [email protected]
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}
}
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
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
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
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).
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.