{"id":19855202,"url":"https://github.com/leggedrobotics/mpc-net","last_synced_at":"2025-08-19T19:07:59.269Z","repository":{"id":83356445,"uuid":"224674864","full_name":"leggedrobotics/MPC-Net","owner":"leggedrobotics","description":"Accompanying code for the publication \"MPC-Net: A First Principles Guided Policy Search\"","archived":false,"fork":false,"pushed_at":"2020-03-03T02:21:25.000Z","size":10,"stargazers_count":89,"open_issues_count":3,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-06T20:46:29.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leggedrobotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-28T14:50:39.000Z","updated_at":"2025-04-03T19:58:44.000Z","dependencies_parsed_at":"2023-03-12T17:45:44.833Z","dependency_job_id":null,"html_url":"https://github.com/leggedrobotics/MPC-Net","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/leggedrobotics%2FMPC-Net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leggedrobotics%2FMPC-Net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leggedrobotics%2FMPC-Net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leggedrobotics%2FMPC-Net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leggedrobotics","download_url":"https://codeload.github.com/leggedrobotics/MPC-Net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251969278,"owners_count":21673184,"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-12T14:12:00.590Z","updated_at":"2025-05-02T01:30:45.151Z","avatar_url":"https://github.com/leggedrobotics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPC-Net\n\nThis package contains supplementary code and implementation details for the [publication](https://doi.org/10.1109/LRA.2020.2974653)\n\u003e J. Carius, F. Farshidian and M. Hutter, \"MPC-Net: A First Principles Guided Policy Search,\" in IEEE Robotics and Automation Letters, vol. 5, no. 2, pp. 2897-2904, April 2020.\n\nA preprint is available on [arxiv](https://arxiv.org/pdf/1909.05197.pdf).\n\nWhile licensing restrictions do not allow us to release the ANYmal model,\nwe are providing our training script with an alternative ball-balancing robot.\n\n## Dependencies\n * [OCS2 Toolbox](https://bitbucket.org/leggedrobotics/ocs2/)\n * [Pybind11](https://github.com/pybind/pybind11)\n * [Pytorch](https://pytorch.org/)\n * [TensorboardX](https://pypi.org/project/tensorboardX/)\n * [Matplotlib](https://matplotlib.org/)\n\n## Setup Instructions\n* Build and install Pybind11 according to the instructions in their documentation.\nMake sure CMake can locate the Pybind11 installation, for example by adding the install path to your `CMAKE_PREFIX_PATH`.\n\n* Clone [OCS2](https://bitbucket.org/leggedrobotics/ocs2/) into the source folder of a catkin workspace.\nThen build the python bindings for the optimal control solver with\u003cbr\u003e\n`catkin build ocs2_ballbot_example --cmake-args -DUSE_PYBIND_PYTHON_3=ON`\n* Install required python packages\u003cbr\u003e\n`pip3 install torch tensorboardX matplotlib`\u003cbr\u003e\nNote that we use python3 as it is required for pytorch.\n\n## Running the Policy Training\nMake sure your catkin workspace is sourced in the current terminal.\nThe policy training can then be started with the command\u003cbr\u003e\n`python3 ballbot_learner.py`\n\nTo monitor progress, execute tensorboard\u003cbr\u003e\n`tensorboard --logdir runs`\n\nDuring training, the policy will be saved to disk in regular intervals.\nThe performance of the policy on the internal model can be visualized by running the script\u003cbr\u003e\n`python3 ballbot_evaluation.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleggedrobotics%2Fmpc-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleggedrobotics%2Fmpc-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleggedrobotics%2Fmpc-net/lists"}