{"id":20220669,"url":"https://github.com/tp5uiuc/kinematic_snake","last_synced_at":"2025-06-12T06:11:45.586Z","repository":{"id":62574210,"uuid":"227893345","full_name":"tp5uiuc/kinematic_snake","owner":"tp5uiuc","description":"Simulations for snake kinematics with anisotropic friction.","archived":false,"fork":false,"pushed_at":"2022-01-01T19:17:06.000Z","size":189,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T12:13:43.662Z","etag":null,"topics":["elasticity","locomotion","simulation","snake"],"latest_commit_sha":null,"homepage":"","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/tp5uiuc.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}},"created_at":"2019-12-13T17:47:30.000Z","updated_at":"2024-01-22T19:46:53.000Z","dependencies_parsed_at":"2022-11-03T18:42:17.966Z","dependency_job_id":null,"html_url":"https://github.com/tp5uiuc/kinematic_snake","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tp5uiuc/kinematic_snake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tp5uiuc%2Fkinematic_snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tp5uiuc%2Fkinematic_snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tp5uiuc%2Fkinematic_snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tp5uiuc%2Fkinematic_snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tp5uiuc","download_url":"https://codeload.github.com/tp5uiuc/kinematic_snake/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tp5uiuc%2Fkinematic_snake/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259410155,"owners_count":22852972,"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":["elasticity","locomotion","simulation","snake"],"created_at":"2024-11-14T06:47:14.288Z","updated_at":"2025-06-12T06:11:45.549Z","avatar_url":"https://github.com/tp5uiuc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Snake Locomotion Kinematics\n\u0026middot;\n[![CI](https://github.com/tp5uiuc/kinematic_snake/actions/workflows/ci.yml/badge.svg)](https://github.com/tp5uiuc/kinematic_snake/actions/workflows/ci.yml)\n[![license](https://img.shields.io/badge/license-MIT-green)](https://mit-license.org/)\n[![pyversion](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue.svg)](https://www.python.org/)\n=====\n\nA kinematic model of snake-locomotion, with and without lifting, following our publication[](). \nCan run single specified cases or many independent cases in parallel to generate a phase-space.\n\n\u003e :rocket: Before installing the package, check out an interactive, online version [at this link](https://gazzolalab.github.io/kinematic_snake_sandbox/).\n\n## Installation\nFor a system wide install, use\n```sh\npython3 -m pip install kinematic-snake\n```\nFor a local install, please clone this repository and execute the following in the repository directory.\n```sh\npython3 -m pip install --user .\n```\nYou can then use one of the [examples](examples) for running a single simulation or\na parameter sweep of simulations. For more information see [Usage and examples](#usage-and-examples)\n\n### Extras\nIf you want to take full advantage of the package (such as running a phase-space of cases in parallel), \nplease execute\n```sh\npython3 -m pip install kinematic-snake[extras]\n```\n\n## Usage and examples\nThe simplest example runs a [single simulation](examples/run_single_snake.py) and produces output \nplots. For convenience, the same code is also listed below.\n```python\nfrom kinematic_snake import run_and_visualize, Snake\n\nsnake, sol_history, time_period = run_and_visualize(\n    froude=1, # The froude number\n    time_interval=[0.0, 10.0], # Time interval of simulation\n    snake_type=Snake, # Type of snake, can be Snake\n    mu_f=1.0, # Forward friction coefficient ratio, determined from `froude`\n    mu_b=1.5, # Backward friction coefficient\n    mu_lat=2.0, # Lateral friction coefficient\n)\n```\nMore examples including the one above are given in that example file. The code is designed to \nencourage the user to play around with the model of the snake using \nany activation function (for both the snake gait, specified by curvature, and the lifting). The documented examples\nprovided in the `examples` folder should get you started.\n\n## Numerical algorithms\nDetails on the algorithms employed can be found in our following paper. If you are using this package, \nplease cite the work below :)\n\n\u003cstrong\u003eFriction modulation in limbless, three-dimensional gaits and heterogeneous terrains\u003c/strong\u003e, doi : [10.1038/s41467-021-26276-x](https://doi.org/10.1038/s41467-021-26276-x)\n\n```\n@Article{Zhang2021,\nauthor={Zhang, Xiaotian\nand Naughton, Noel\nand Parthasarathy, Tejaswin\nand Gazzola, Mattia},\ntitle={Friction modulation in limbless, three-dimensional gaits and heterogeneous terrains},\njournal={Nature Communications},\nyear={2021},\nmonth={Oct},\nday={19},\nvolume={12},\nnumber={1},\npages={6076},\nissn={2041-1723},\ndoi={10.1038/s41467-021-26276-x},\nurl={https://doi.org/10.1038/s41467-021-26276-x}\n}\n```\n\n## Running tests\nCheck [Installation](#installation) to see how to install the package. Once that is done, install the test requirements\nusing \n``` sh\npython3 -m pip install -r tests/requirements.txt\n```\nThis package uses `py.test` for running unit and integration tests. To run the tests, execute \n```sh\npython3 -m pytest\n```\nfrom the repository directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftp5uiuc%2Fkinematic_snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftp5uiuc%2Fkinematic_snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftp5uiuc%2Fkinematic_snake/lists"}