{"id":19134233,"url":"https://github.com/um-arm-lab/pytorch_rrt","last_synced_at":"2026-06-23T05:32:00.790Z","repository":{"id":79651043,"uuid":"358728645","full_name":"UM-ARM-Lab/pytorch_rrt","owner":"UM-ARM-Lab","description":"Kinodynamic RRT implemented in pytorch","archived":false,"fork":false,"pushed_at":"2021-04-16T22:01:20.000Z","size":4,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-11-13T05:03:59.441Z","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":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":"2021-04-16T21:57:10.000Z","updated_at":"2025-09-03T06:21:44.000Z","dependencies_parsed_at":"2023-06-17T05:45:56.409Z","dependency_job_id":null,"html_url":"https://github.com/UM-ARM-Lab/pytorch_rrt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UM-ARM-Lab/pytorch_rrt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fpytorch_rrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fpytorch_rrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fpytorch_rrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fpytorch_rrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UM-ARM-Lab","download_url":"https://codeload.github.com/UM-ARM-Lab/pytorch_rrt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UM-ARM-Lab%2Fpytorch_rrt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34677382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:56.412Z","updated_at":"2026-06-23T05:32:00.765Z","avatar_url":"https://github.com/UM-ARM-Lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTorch Kinodynamic RRT Implementation\nThis repository implements Kinodynamic Rapidly-exploring Random Tree (RRT) \nwith black-box dynamics and constraints in pytorch. RRT is a motion planning algorithm\nthat returns a trajectory.\n\n# Usage\nClone repository somewhere, then `pip3 install -e .` to install in editable mode.\nSee `tests/twod.py` for example usage. \n\n```python\nfrom pytorch_rrt import UniformActionSpace, ActionDescription, \\\n    UniformStateSpace, State, StateDescription, \\\n    KinodynamicRRT\nfrom typing import Iterable\nimport torch\n\n# define action and state space\nclass TwoDActionSpace(UniformActionSpace):\n    MAX_ACTION = 0.3\n\n    @classmethod\n    def description(cls) -\u003e Iterable[ActionDescription]:\n        return [ActionDescription(\"dx\", -cls.MAX_ACTION, cls.MAX_ACTION),\n                ActionDescription(\"dy\", -cls.MAX_ACTION, cls.MAX_ACTION)]\n\n\nclass TwoDStateSpace(UniformStateSpace):\n    MAX_STATE = 3\n\n    @classmethod\n    def description(cls) -\u003e Iterable[StateDescription]:\n        return [StateDescription(\"x\", -cls.MAX_STATE, cls.MAX_STATE),\n                StateDescription(\"y\", -cls.MAX_STATE, cls.MAX_STATE)]\n\n    def distance(self, s1: State, s2: State) -\u003e torch.tensor:\n        return (s1 - s2).view(-1, self.dim()).norm(dim=1)\n\nstate_space = TwoDStateSpace()\naction_space = TwoDActionSpace()\n\n# given external dynamics and trajectory cost\nrrt = KinodynamicRRT(state_space, action_space, dynamics, traj_cost)\n```\n\nCan use RRT to plan open-loop (assuming gym-like `env`)\n```python\nres = rrt.plan(state, goal_check, goal=goal, timeout=5.0)\nactions = res.trajectory.actions\nfor action in actions:\n    env.step(action.cpu().numpy())\n```\n\nor in a closed-loop manner\n```python\nwhile True:\n    res = rrt.plan(state, goal_check, goal=goal, timeout=1.0)\n    action = res.trajectory.actions[0]\n    # step in environment\n    state, reward, done, _  = env.step(action.cpu().numpy())\n    if done:\n        break\n```\n\n# Requirements\n- pytorch (\u003e= 1.0)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fum-arm-lab%2Fpytorch_rrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fum-arm-lab%2Fpytorch_rrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fum-arm-lab%2Fpytorch_rrt/lists"}