{"id":19134112,"url":"https://github.com/um-arm-lab/tampc","last_synced_at":"2025-05-06T19:28:08.233Z","repository":{"id":79651061,"uuid":"225480908","full_name":"UM-ARM-Lab/tampc","owner":"UM-ARM-Lab","description":"Trap aware model predictive control","archived":false,"fork":false,"pushed_at":"2024-04-01T22:28:53.000Z","size":5844,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-06T19:28:00.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UM-ARM-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-02T22:26:46.000Z","updated_at":"2022-03-17T18:36:08.000Z","dependencies_parsed_at":"2024-11-09T06:26:07.470Z","dependency_job_id":"37b68624-25ff-4492-a25a-aa17f0a3fbb1","html_url":"https://github.com/UM-ARM-Lab/tampc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Ftampc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Ftampc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Ftampc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Ftampc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UM-ARM-Lab","download_url":"https://codeload.github.com/UM-ARM-Lab/tampc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752241,"owners_count":21798759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T06:25:30.385Z","updated_at":"2025-05-06T19:28:08.190Z","avatar_url":"https://github.com/UM-ARM-Lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Requirements\n- python 3.6+\n- pytorch 1.5+\n\n## Installation\n1. install dependent library project: [pytorch utilities](https://github.com/UM-ARM-Lab/arm_pytorch_utilities), \n[pytorch mppi](https://github.com/LemonPi/pytorch_mppi)\n2. `pip3 install -e .`\n\n## Installation with ROS\n```\nconda create --name \u003cenv_name\u003e --channel conda-forge\n   ros-core \\\n   ros-actionlib \\\n   ros-dynamic-reconfigure\n   python=3.7.5 \n```\nUse the environment created with ROS if you need real robot experiments.\nThis could work well with a system-level ROS install. Either through the conda ROS\nor the system ROS, `catkin_make` the required messages from the `tampc_or_msgs` package\nand also install `tampc_or`. Also be sure to add the `devel` libraries to \nProject Structure (for PyCharm) so the IDE knows where the paths are.\nLastly, when running, add an environment variable `ROS_MASTER_URI` to point\nto the right ROS master.\n\n## Usage\n1. (optional and requires ROS) generate urdf files `python3 build_models.py`\n    \n2. (only for training models) open tensorboard server (see below)\n\n3. run scripts\n\n### Scripts\nScripts are located in `scripts`. Those with `_main` suffix are \nthe main simulation scripts that have methods for collecting data,\ntraining model, and testing trained models on novel environments.\n    \n### Tensorboard logging\n`pip3 install tensorboardX`\n\n(Also install `tensorboard`) To start the tensorboard server, \n\n`tensorboard --logdir scripts/runs`\n\n### Remove empty runs\n`python clean_empty_runs.py`\n\n\n# Reproducing Paper Results\nUse the `update_post_ral` branch of this repository (although master should work also).\nThe codebase is entirely in python, and it is recommended to create a new [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) environment and set up the dependencies with the following commands. For the 3rd line, replace 9.2 with your CUDA version from `nvcc --version`.\n```\nconda create --name tampc python=3.7.5\nconda activate tampc\nconda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=9.2 -c pytorch\npip install pybullet\npip install gpytorch==1.1.1\npip install tensorboardX\npip install gym\n```\n\nAt the time of writing, our `conda list` looks like (`tensorflow` is optional and only needed if you want the web client view of tensorboard)\n```\n# Name                    Version                   Build  Channel\n_libgcc_mutex             0.1                        main  \n_tflow_select             2.3.0                       mkl  \nabsl-py                   0.8.1                    py37_0  \narm-pytorch-utilities     0.2.0                     dev_0    \u003cdevelop\u003e\nastor                     0.8.0                    py37_0  \nbaselines                 0.1.6                     dev_0    \u003cdevelop\u003e\nblas                      1.0                         mkl  \nc-ares                    1.15.0            h7b6447c_1001  \nca-certificates           2020.6.24                     0  \ncertifi                   2020.6.20                py37_0  \ncffi                      1.13.2           py37h2e261b9_0  \nclick                     7.1.2                    pypi_0    pypi\ncloudpickle               1.2.2                    pypi_0    pypi\ncudatoolkit               9.2                           0  \ndill                      0.3.1.1                  pypi_0    pypi\nfasteners                 0.15                     pypi_0    pypi\nfreetype                  2.9.1                h8a8886c_1  \nfuture                    0.18.2                   pypi_0    pypi\ngast                      0.2.2                    py37_0  \nglfw                      1.10.0                   pypi_0    pypi\ngoogle-pasta              0.1.8                      py_0  \ngpytorch                  1.1.1                    pypi_0    pypi\ngrpcio                    1.16.1           py37hf8bcb03_1  \ngym                       0.15.4                   pypi_0    pypi\nh5py                      2.9.0            py37h7918eee_0  \nhdf5                      1.10.4               hb1b8bf9_0  \nimageio                   2.6.1                    pypi_0    pypi\nimageio-ffmpeg            0.3.0                    pypi_0    pypi\nimportlib-metadata        1.6.0                    pypi_0    pypi\nintel-openmp              2019.4                      243  \njpeg                      9b                   h024ee3a_2  \nkeras-applications        1.0.8                      py_0  \nkeras-preprocessing       1.1.0                      py_1  \nlibedit                   3.1.20181209         hc058e9b_0  \nlibffi                    3.2.1                hd88cf55_4  \nlibgcc-ng                 9.1.0                hdf63c60_0  \nlibgfortran-ng            7.3.0                hdf63c60_0  \nlibpng                    1.6.37               hbc83047_0  \nlibprotobuf               3.11.2               hd408876_0  \nlibstdcxx-ng              9.1.0                hdf63c60_0  \nlibtiff                   4.1.0                h2733197_0  \nmarkdown                  3.1.1                    py37_0  \nmeta-contact              0.0.0                     dev_0    \u003cdevelop\u003e\nmkl                       2019.4                      243  \nmkl-service               2.3.0            py37he904b0f_0  \nmkl_fft                   1.0.15           py37ha843d7b_0  \nmkl_random                1.1.0            py37hd6b4f25_0  \nmock                      3.0.5                    py37_0  \nmonotonic                 1.5                      pypi_0    pypi\nmujoco-py                 2.0.2.9                  pypi_0    pypi\nncurses                   6.1                  he6710b0_1  \nninja                     1.9.0            py37hfd86e86_0  \nnumpy                     1.17.4           py37hc1035e2_0  \nnumpy-base                1.17.4           py37hde5b4d6_0  \nolefile                   0.46                     py37_0  \nopencv-python             4.1.2.30                 pypi_0    pypi\nopenexr                   1.3.2                    pypi_0    pypi\nopenssl                   1.1.1g               h7b6447c_0  \nopt_einsum                3.1.0                      py_0  \npackaging                 20.4                     pypi_0    pypi\npatchelf                  0.10                 he6710b0_0  \npillow                    7.0.0            py37hb39fc2d_0  \npip                       20.1.1                   pypi_0    pypi\npluggy                    0.13.1                   pypi_0    pypi\nprotobuf                  3.11.2           py37he6710b0_0  \npybullet                  2.7.9                    pypi_0    pypi\npycocotools               2.0                      pypi_0    pypi\npycparser                 2.19                     py37_0  \npyglet                    1.3.2                    pypi_0    pypi\npytest                    5.4.2                    pypi_0    pypi\npython                    3.7.5                h0371630_0  \npytorch                   1.5.1           py3.7_cuda9.2.148_cudnn7.6.3_0    pytorch\npytorch-mppi              0.1.0                     dev_0    \u003cdevelop\u003e\nreadline                  7.0                  h7b6447c_5  \nscipy                     1.3.2            py37h7c811a0_0  \nsetuptools                44.0.0                   py37_0  \nsix                       1.13.0                   py37_0  \nsqlite                    3.30.1               h7b6447c_0  \ntensorboard               2.0.0              pyhb38c66f_1  \ntensorflow                2.0.0           mkl_py37h66b46cc_0  \ntensorflow-base           2.0.0           mkl_py37h9204916_0  \ntensorflow-estimator      2.0.0              pyh2649769_0  \ntermcolor                 1.1.0                    py37_1  \ntk                        8.6.8                hbc83047_0  \ntorchvision               0.6.1                 py37_cu92    pytorch\nwerkzeug                  0.16.0                     py_0  \nwheel                     0.33.6                   py37_0  \nwrapt                     1.11.2           py37h7b6447c_0  \nxz                        5.2.4                h14c3975_4  \nzipp                      3.1.0                    pypi_0    pypi\nzlib                      1.2.11               h7b6447c_3  \nzstd                      1.3.7                h0b5b093_0  \n```\n\n## Local packages\nClone and install (`cd \u003cdir\u003e` then `pip install -e .`) these repositories first: [arm_pytorch_utilities](https://github.com/UM-ARM-Lab/arm_pytorch_utilities) and [pytorch_mppi](https://github.com/LemonPi/pytorch_mppi). Then install this repository with `pip install -e .`\n\nFirst change working directory to `tampc/scripts`.\nMost steps can be applied in the same way to planar pushing (`push_main.py`) and peg-in-hole (`peg_main.py`) environments.  \nDifferences will be pointed out. When running the scripts, logs of the messages can be found under `tampc/logs`.\n\nNote that different versions of pytorch and gpytorch might yield slightly different results. The models we used are included in `tampc/checkpoints`.  \nIf you use these you can skip the representation learning and dynamics fine-tuning steps which can take a long time.  \nFor the block tasks, pass in `--rep_name saved` to use the saved learned representation and for peg tasks pass in `--rep_name saved_peg`.  \nA copy of the saved dynamics model is present with the name (copy) after it in case you override it with fine tuning.  \nThe estimated time for some steps is listed at the end of each line for you to consider if you wish to skip some steps.\n\nWhether you are running with CUDA or not will also affect exact reproducibility. We recommend reviewers run this on a CUDA enabled machine (although everything still works out of the box without CUDA, just that the results will be slightly different).\n\n1. (optional) collect nominal data  \n\t```\n\tpython push_main.py collect --seed 4\n\t```  \n\tyou can visualize the collection process by passing in `--gui` flag. Should take about 1 hour. The data is included as part of the repository, and this step is mainly for you to validate the collection process.\n2. (optional) learn dynamics representations and compare against feedforward baseline (reproduce figure 4)\n\t```\n\tpython push_main.py learn_representation --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --batch 2048 --rep_name eval\n\tpython push_main.py learn_representation --seed 0 1 2 3 4 5 6 7 8 9 --representation feedforward_baseline --batch 500 --rep_name eval\n    python plot_run_result.py \n\t```  \n\tlearning across the 10 seeds is only necessary for reproducing figure 4. Should take 1-2 hours per seed. If you only care to run the tasks, you can use the saved model with `--rep_name saved` for the block tasks and `--rep_name saved_peg` for the peg tasks. Alternatively, just learn the seed 1 for pushing and seed 0 for peg (default seeds). Should take about 1 hour per seed.\n3. (optional) fine tune dynamics  \n\t```\n\tpython push_main.py fine_tune_dynamics --representation learned_rex --rep_name saved\n\t```\n\tto select a different learned representation, for example pass in `--rep_name s1` to use the seed 1 model (`saved` for the one used in the paper).  \n\tIf you decide to not use the default name, then you will have to also pass the same `--rep_name` argument to other commands.  \n\tNote that 1 dynamics model is saved per representation type (`learned_rex`, `rex_ablation`, ...), so if you fine tune the dynamics on one representation model but forget to pass the `--rep_name` argument to the other commands, the resulting model will output garbage! If you want to use a different trained representation, you\"ll have to re-fine tune the dynamics. One hint is if the logged network error is higher than the least squares error (we check and log this at the start of running the controller). Note that you can also pass in `--seed 1` here to learn the dynamics with a different seed (only the first seed in the list is used). Should take about 3 minutes.\n4. also learn dynamics in original space for comparison later `python push_main.py fine_tune_dynamics --representation none`\n5. run task with options\n\t```\n\tpython push_main.py run --task \"Block-H\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved\n\tpython push_main.py run --task \"Block-D\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved\n\t```\n\t```\n\tpython peg_main.py run --task \"Peg-U\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved_peg --tampc_param dynamics_minimum_window=15 --mpc_param horizon=15 --run_prefix h15_larger_min_window\n\tpython peg_main.py run --task \"Peg-I\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved_peg --tampc_param trap_cost_annealing_rate=0.95 --mpc_param horizon=20 --run_prefix h20_less_anneal\n\tpython peg_main.py run --task \"Peg-T\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved_peg\n\tpython peg_main.py run --task \"Peg-T(T)\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved_peg\n\t```\n\tthere is a `--visualize_rollout` option to show what the planned MPC trajectory would take the state. Should take about 10 minutes per 500 frame run.\n6. run tasks with adaptive baseline with the `--adaptive_baseline` option; for example\n\t```\n\tpython push_main.py run --task \"Block-H\" --seed 0 1 2 3 4 5 6 7 8 9 --adaptive_baseline\n\t```\n7. run tasks with artificial potential field (APF) baselines; for example\n\t```\n\tpython peg_main.py run --task \"Peg-U\" --seed 0 1 2 3 4 5 6 7 8 9 --apfvo_baseline --representation learned_rex --rep_name saved_peg\n\tpython peg_main.py run --task \"Peg-U\" --seed 0 1 2 3 4 5 6 7 8 9 --apfsp_baseline --representation learned_rex --rep_name saved_peg\n\t```\n8. run tasks with random recovery policy ablation option; for example\n\t```\n\tpython push_main.py run --task \"Block-H\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --random_ablation --rep_name saved\n\tpython push_main.py run --task \"Block-D\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --random_ablation --rep_name saved\n\t```\n9. run tasks with non-adaptive baseline with the `--nonadaptive_baseline` option; for example\n\t```\n\tpython push_main.py run --task \"Block-H\" --seed 0 1 2 3 4 5 6 7 8 9 --nonadaptive_baseline\n\t```\n10. run Peg-T(T) with dynamics in the original space\n\t```\n\tpython peg_main.py run --task \"Peg-T(T)\" --seed 0 1 2 3 4 5 6 7 8 9 --representation none \n\t```\n11. run tasks with the no error estimation ablation with the `--never_estimate_error` option; for example\n\t```\n\tpython peg_main.py run --task \"Peg-T\" --seed 0 1 2 3 4 5 6 7 8 9 --representation learned_rex --rep_name saved_peg --never_estimate_error\n\t```\n12. evaluate the performance of the runs to prepare for visualization (saved to cache); for example (see the `_main.py` scripts' dictionary of runs to visualize for full list of names)\n\t```\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__NO_E__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__RANDOM__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__APFVO__NONE__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__APFSP__NONE__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__NONE__5__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__GP_KERNEL_INDEP_OUT__NONE__5__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\t```\n\t```\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__NO_E__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__RANDOM__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__APFVO__NONE__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__APFSP__NONE__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__NONE__NONE__6__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\tpython push_main.py evaluate --eval_run_prefix auto_recover__GP_KERNEL_INDEP_OUT__NONE__6__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\t```\n\t```\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__h15_larger_min_window__NONE__MAB__3__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__NO_E__3__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__RANDOM__3__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFVO__NONE__3__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFSP__NONE__3__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__NONE__3__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__GP_KERNEL_INDEP_OUT__NONE__3__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\t```\n\t```\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__h20_less_anneal__NONE__MAB__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__NO_E__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__RANDOM__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFVO__NONE__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFSP__NONE__5__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__NONE__5__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__GP_KERNEL_INDEP_OUT__NONE__5__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\t```\n\t```\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__NO_E__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__RANDOM__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFVO__NONE__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFSP__NONE__6__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__NONE__6__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__GP_KERNEL_INDEP_OUT__NONE__6__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\t```\n\t```\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__7__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__NO_E__7__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__MAB__7__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__RANDOM__7__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFVO__NONE__7__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__APFSP__NONE__7__REX_EXTRACT__SOMETRAP__NOREUSE__AlwaysSelectNominal__TRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__NONE__NONE__7__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\tpython peg_main.py evaluate --eval_run_prefix auto_recover__GP_KERNEL_INDEP_OUT__NONE__7__NO_TRANSFORM__SOMETRAP__NOREUSE__AlwaysSelectNominal__NOTRAPCOST\n\t```\n\talso run this for any other series you decide to perform (including the SAC baseline) with different names by passing in `--run_prefix myname`. \n13. plot the performance results (columns of figure 7); will also report the success rate for Table 1.\n\t```\n\tpython push_main.py visualize\n\tpython peg_main.py visualize1\n\tpython peg_main.py visualize2\n\t```\n\n## Controller parameters\nTo change matrix-valued controller parameters, modify the dictionaries after line 115 of `push_main.py` and 185 of `peg_main.py`. You can modify scalar values more simply by passing the arguments `--tampc_param p1name=p1value p2name=p2value` and simiarly for MPC parameters `--mpc_param ...`. See the lines mentioned above for the parameter names.\n\n## SAC baseline\nThis is implemented in the `soft-actor-critic` repository; see the README inside it for training and running instructions (training the nominal policy may take up to 10 hours, but saved models are provided).\nTo plot the SAC results together with the other results, copy the result files such as `sac__5*` to either `tampc/data/pushing/` or `tampc/data/peg/`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fum-arm-lab%2Ftampc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fum-arm-lab%2Ftampc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fum-arm-lab%2Ftampc/lists"}