{"id":24741192,"url":"https://github.com/hybridrobotics/ilqr-iterative-tasks","last_synced_at":"2025-06-11T17:06:24.598Z","repository":{"id":186910190,"uuid":"529989600","full_name":"HybridRobotics/ilqr-iterative-tasks","owner":"HybridRobotics","description":"i2LQR: Iterative LQR for Iterative Tasks in Dynamic Environments (CDC 2023) https://arxiv.org/abs/2302.14246","archived":false,"fork":false,"pushed_at":"2024-03-18T03:30:31.000Z","size":22,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T19:07:57.171Z","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/HybridRobotics.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}},"created_at":"2022-08-28T21:59:38.000Z","updated_at":"2025-03-28T21:00:46.000Z","dependencies_parsed_at":"2023-08-08T07:45:08.040Z","dependency_job_id":null,"html_url":"https://github.com/HybridRobotics/ilqr-iterative-tasks","commit_stats":null,"previous_names":["hybridrobotics/ilqr-iterative-tasks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HybridRobotics/ilqr-iterative-tasks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HybridRobotics%2Filqr-iterative-tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HybridRobotics%2Filqr-iterative-tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HybridRobotics%2Filqr-iterative-tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HybridRobotics%2Filqr-iterative-tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HybridRobotics","download_url":"https://codeload.github.com/HybridRobotics/ilqr-iterative-tasks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HybridRobotics%2Filqr-iterative-tasks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259302591,"owners_count":22837178,"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":"2025-01-27T23:49:30.146Z","updated_at":"2025-06-11T17:06:24.551Z","avatar_url":"https://github.com/HybridRobotics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"iterative-ilqr-tasks\r\n==========\r\n\r\nThis repository provides a toolkit to test a novel control strategy called Iterative Linear Quadratic Regulator for Iterative Tasks (i2LQR). The strategy aims to improve closed-loop performance with local trajectory optimization for iterative tasks in a dynamic environment.\r\n\r\n\r\n## References\r\nIf you find this project useful in your work, please consider citing following paper [[arXiv]](https://arxiv.org/abs/2302.14246) | [[IEEE]](https://ieeexplore.ieee.org/document/10383960):\r\n```\r\n@inproceedings{zeng2023i2lqr,\r\n  title={i2LQR: Iterative LQR for Iterative Tasks in Dynamic Environments},\r\n  author={Zeng, Yifan and He, Suiyi and Nguyen, Han Hoang and Li, Yihan and Li, Zhongyu and Sreenath, Koushil and Zeng, Jun},\r\n  booktitle={2023 62nd IEEE Conference on Decision and Control (CDC)},\r\n  pages={5255--5260},\r\n  year={2023},\r\n  organization={IEEE}\r\n}\r\n```\r\n\r\n## Installation\r\n* We recommend creating a new conda environment:\r\n```\r\nconda env create -f environment.yml\r\nconda activate iterative-ilqr\r\n```\r\n\r\nRun following command in terminal to install the iterative-ilqr package.\r\n```\r\npip install -e .\r\n```\r\n\r\n## Auto Testing\r\n\r\nIn this project, `pytest` is used to test the code autonomously after pushing new code to the repository. Currently, files in the `tests` folder are used for testing i2LQR controller and nonlinear learning based MPC (NLMPC) controller, respectively. To test other features, add files to the `tests` folder and update the `tests.yml` file under the `.github/workflows` folder.\r\n\r\n## Contributing\r\nExecute `pre-commit install` to install git hooks in your `.git/` directory, which allows auto-formatting if you are willing to contribute to this repository.\r\n\r\nPlease contact major contributors of this repository for additional information.\r\n\r\n## Quick-Demos\r\n\r\n## Docs\r\nThe following documentation contains documentation and common terminal commands for simulations and testing.\r\n\r\n#### Nonlinear LMPC\r\nRun\r\n```\r\npython iterative_ilqr/tests/nlmpc_test.py --lap-number 10 --num-ss-iters 2 --num-ss-points 8 --ss-option space\r\n```\r\nThis allows to test the nonlinear lmpc controller. The argparse arguments are listed as follow,\r\n| name | type | choices | description |\r\n| :---: | :---: | :---: | :---: |\r\n| `lap_number` | int | any number that is greater than `2` | number of laps that will be simulated |\r\n| `num_ss_iters` | int | any number that is greater than `1` | iterations used for learning |\r\n| `num_ss_points` | int | any number that is greater than `1` | history states used for learning |\r\n| `ss_option` | string | `space`, `time` or `all` | criteria for history states selection |\r\n|   `plotting`   | action |               `store_true`                |                    save plotting if true                     |\r\n|   `save_trajectory`   | action |               `store_true`                |                    save simulator will store the history states and inputs if true                     |\r\n\r\n\r\n#### Iterative lqr for iterative tasks\r\nRun\r\n```\r\npython iterative_ilqr/tests/ilqr_test.py --lap-number 10 --num-ss-iters 2 --num-ss-points 8\r\n```\r\n\r\nThis allows to test the iterative ilqr controller. The argparse arguments are listed as follow,\r\n\r\n| name | type | choices | description |\r\n| :---: | :---: | :---: | :---: |\r\n| `lap_number` | int | any number that is greater than `2` | number of laps that will be simulated |\r\n| `num_ss_iters` | int | any number that is greater than `1` | iterations used for learning |\r\n| `num_ss_points` | int | any number that is greater than `1` | history states used for learning |\r\n|   `plotting`   | action |               `store_true`                |                    save plotting if true                     |\r\n|   `save_trajectory`   | action |               `store_true`                |                    save simulator will store the history states and inputs if true                     |\r\n\r\n#### Known Issues\r\n- To change the simulation timestep, the number of prediction horizons and the number of history states used for learning should be adjusted.\r\n- No noise is added to the simulation during the dynamics update. The presence of noise may lead to failure when the robotics approaches the terminal point.\r\n- The current discretization time for system dynamics update is the same as the simulation timestep. Decreasing this value may also result in failure.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridrobotics%2Filqr-iterative-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhybridrobotics%2Filqr-iterative-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridrobotics%2Filqr-iterative-tasks/lists"}