Repo for testing sampling-based optimization methods.
Use conda and install via:
conda env create -f environment.yml
conda activate env_sboscripts/: Contains the main scripts for running experiments and testing optimization methods.srb/: Contains the scripts for Single Rigid Body (SRB) non-linear trajectory optimization.models/: Contains various dynamical system models described by an XML file. You can view a model usingvisualize_model_mujoco.py.utils/: Contains utility functions and classes used throughout the codebase. For example, parallel simulation, optimization methods, and splines.results/: Directory to store results from experiments. To view results, runview_results.pywhich will load the data, visualize it, and plot. Just change theexperimentandxml pathat the top of the file to view different results. Similarly, you can useview_results_srb.pyto view results from the SRB optimization.logs/: Directory to store tensorboard logs from experiments. View withtensorboard --logdir=./logs.
All scripts are run from the root directory. The main scripts are located in the scripts/ directory.
If you can't run a particular script, try running it as a module. For example, for scripts/cartpole/cartpole_cem.py, use:
python -m scripts.cartpole.cartpole_ceminstead of:
python scripts/cartpole/cartpole_cem.pyOptimization results are saved in results/. To view, run view_results.py which will load the data, visualize it, and plot. Just change the experiment and xml_path at the top of the file to view different results. Similarly, you can use view_results_srb.py to view results from the SRB optimization.
To view tensorboard logs for optimization progress, run:
tensorboard --logdir=./logsand open the provided URL in your browser (e.g., http://localhost:6006). To enable logging for a task, pass a Logger_Config to the optimizer.