rsplan


Namersplan JSON
Version 1.0.10 PyPI version JSON
download
home_pagehttps://github.com/builtrobotics/rsplan
SummaryReeds-Shepp algorithm implementation in Python.
upload_time2023-08-31 13:39:38
maintainer
docs_urlNone
authorBuilt Robotics
requires_python
licenseMIT
keywords reeds-shepp path planning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## README

- [Overview](#overview)
- [Usage](#usage)
  - [Installation](#installation)
  - [Running](#running)
- [FAQ](#faq)
- [Exhibits](#exhibits)
- [References](#references)

## Overview
This package is a Reeds-Shepp library implementation with Python that is compatible with Python versions >= 3.9, including 3.11.

Contains the following files:
  - `planner`: Path planning code. `path` function outputs the optimal Reeds-Shepp path with or without a runway.
  - `curves`: Curve formulas for all of the curve types in the Reeds-Shepp paper.
  - `primitives`: Three class architectures (Waypoint, Segment, and Path).
    - Waypoint class (stores x, y, yaw of the waypoint and the curvature and length of the segment the waypoint is on as well as if the segment is a runway)
    - Segment class (stores left/right/straight type, forward/backward direction, length, and turn radius of the segment)
    - Path class (stores start and end points, turn radius, step size, and list of Segments. Also contains a cached waypoints function to get a list of Waypoints for the path)
  - `helpers`: Helper functions for planner, primitives, and curves files.
  - `demo`: Demo/visualization of paths.



## Usage

### Installation
You can install this software using pip:

`$ pip3 install -U rsplan`


### Running

See demo.py for example usage

path(start_pose, end_pose, turn_radius, runway_length, step_size, length_tolerance (optional))
- return a Reeds-Shepp path from start_pose to end_pose with specified turning radius and step_size between points. The length_tolerance default is 2 meters but can be set to user preference — if paths’ total lengths are within length tolerance of each other, the path function will choose the one with fewer segments as the optimal path. The runway_length is for the runway at the end of the path that helps improve accuracy in reaching the final position — this can be set to 0, or a positive or negative number for a forwards or backwards driving runway.
- start_pose and end_pose are in the format `Tuple[float, float, float]` of x, y, yaw values.


## FAQ

What are t, u, and v parameters?
- As a whole, t, u, v are segment parameters generated in each of the curve helper functions that represent the distance (angular distance for curved segments, linear distance for straight segments) of their respective segments.
- If there are 3 segments (ccc or csc), t is for segment 1, u is for segment 2, and v is for segment 3.
- If there are 4 or 5 segments, the format is:
  - t, u, u, v for cccc paths (2nd and 3rd segments have same angular distance)
  - t, pi/2, u, v for ccsc paths (2nd segment has angle pi/2)
  - t, u, pi/2, v for cscc paths (3rd segment has angle pi/2)
  - t, pi/2, u, pi/2, v for ccscc paths (2nd and 4th segments have angle pi/2)
- These are represented generally in the Segment class in the "distance" parameter, which we pass in t, u, v, or pi/2 for depending on the segment.


## Exhibits

### How to run the demo

- Clone this repository

- Update `_END_POSES` path coordinates in demo.py to the paths you would like to visualize

- In terminal in the rsplan subfolder of this rsplan repository, run:
  `$ python3 demo.py`

### Example paths visualized from demo.py:

Paths start from origin

Format: (end x, end y, yaw, turn radius, runway length)
1. (5, 6, np.pi, 1, 0)
2. (15, 3, np.pi / 2.0, 2, 6)
3. (-2, -4, np.pi, 4, 3)
4. (-7, 2, np.pi, 4, 0)
5. (-7, -7, 0.0, 6, 1)
6. (0.7, 1.8, 1, 1, 1)
7. (-5, 6, np.pi / 3.0, 2, 1)
8. (7, 2, 0.0, 6, 3)
9. (-4, -1, -np.pi / 2.0, 1, 3)

![Screenshot from 2023-07-18 11-50-32](https://github.com/builtrobotics/mariana/assets/44348827/eed5e06c-059e-48cb-9dc3-e56346f84476)




## References
Paper providing more information on the algorithm:
Reeds, J., & Shepp, L. (1990). Optimal paths for a car that goes both forwards and backwards. https://msp.org/pjm/1990/145-2/pjm-v145-n2-p06-s.pdf

Curve formulas can be found on page 390-391.
Inspiration for this Python implementation of the Reeds-Shepp algorithm:
https://github.com/boyali/reeds_and_shepp_curves/tree/master 



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/builtrobotics/rsplan",
    "name": "rsplan",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "reeds-shepp path planning",
    "author": "Built Robotics",
    "author_email": "engineering@builtrobotics.com",
    "download_url": "https://files.pythonhosted.org/packages/be/d6/824a43a939afba7ac03cacc9d687a9d93736d5a52be2f8c07b77d891d1ea/rsplan-1.0.10.tar.gz",
    "platform": null,
    "description": "## README\n\n- [Overview](#overview)\n- [Usage](#usage)\n  - [Installation](#installation)\n  - [Running](#running)\n- [FAQ](#faq)\n- [Exhibits](#exhibits)\n- [References](#references)\n\n## Overview\nThis package is a Reeds-Shepp library implementation with Python that is compatible with Python versions >= 3.9, including 3.11.\n\nContains the following files:\n  - `planner`: Path planning code. `path` function outputs the optimal Reeds-Shepp path with or without a runway.\n  - `curves`: Curve formulas for all of the curve types in the Reeds-Shepp paper.\n  - `primitives`: Three class architectures (Waypoint, Segment, and Path).\n    - Waypoint class (stores x, y, yaw of the waypoint and the curvature and length of the segment the waypoint is on as well as if the segment is a runway)\n    - Segment class (stores left/right/straight type, forward/backward direction, length, and turn radius of the segment)\n    - Path class (stores start and end points, turn radius, step size, and list of Segments. Also contains a cached waypoints function to get a list of Waypoints for the path)\n  - `helpers`: Helper functions for planner, primitives, and curves files.\n  - `demo`: Demo/visualization of paths.\n\n\n\n## Usage\n\n### Installation\nYou can install this software using pip:\n\n`$ pip3 install -U rsplan`\n\n\n### Running\n\nSee demo.py for example usage\n\npath(start_pose, end_pose, turn_radius, runway_length, step_size, length_tolerance (optional))\n- return a Reeds-Shepp path from start_pose to end_pose with specified turning radius and step_size between points. The length_tolerance default is 2 meters but can be set to user preference \u2014 if paths\u2019 total lengths are within length tolerance of each other, the path function will choose the one with fewer segments as the optimal path. The runway_length is for the runway at the end of the path that helps improve accuracy in reaching the final position \u2014 this can be set to 0, or a positive or negative number for a forwards or backwards driving runway.\n- start_pose and end_pose are in the format `Tuple[float, float, float]` of x, y, yaw values.\n\n\n## FAQ\n\nWhat are t, u, and v parameters?\n- As a whole, t, u, v are segment parameters generated in each of the curve helper functions that represent the distance (angular distance for curved segments, linear distance for straight segments) of their respective segments.\n- If there are 3 segments (ccc or csc), t is for segment 1, u is for segment 2, and v is for segment 3.\n- If there are 4 or 5 segments, the format is:\n  - t, u, u, v for cccc paths (2nd and 3rd segments have same angular distance)\n  - t, pi/2, u, v for ccsc paths (2nd segment has angle pi/2)\n  - t, u, pi/2, v for cscc paths (3rd segment has angle pi/2)\n  - t, pi/2, u, pi/2, v for ccscc paths (2nd and 4th segments have angle pi/2)\n- These are represented generally in the Segment class in the \"distance\" parameter, which we pass in t, u, v, or pi/2 for depending on the segment.\n\n\n## Exhibits\n\n### How to run the demo\n\n- Clone this repository\n\n- Update `_END_POSES` path coordinates in demo.py to the paths you would like to visualize\n\n- In terminal in the rsplan subfolder of this rsplan repository, run:\n  `$ python3 demo.py`\n\n### Example paths visualized from demo.py:\n\nPaths start from origin\n\nFormat: (end x, end y, yaw, turn radius, runway length)\n1. (5, 6, np.pi, 1, 0)\n2. (15, 3, np.pi / 2.0, 2, 6)\n3. (-2, -4, np.pi, 4, 3)\n4. (-7, 2, np.pi, 4, 0)\n5. (-7, -7, 0.0, 6, 1)\n6. (0.7, 1.8, 1, 1, 1)\n7. (-5, 6, np.pi / 3.0, 2, 1)\n8. (7, 2, 0.0, 6, 3)\n9. (-4, -1, -np.pi / 2.0, 1, 3)\n\n![Screenshot from 2023-07-18 11-50-32](https://github.com/builtrobotics/mariana/assets/44348827/eed5e06c-059e-48cb-9dc3-e56346f84476)\n\n\n\n\n## References\nPaper providing more information on the algorithm:\nReeds, J., & Shepp, L. (1990). Optimal paths for a car that goes both forwards and backwards. https://msp.org/pjm/1990/145-2/pjm-v145-n2-p06-s.pdf\n\nCurve formulas can be found on page 390-391.\nInspiration for this Python implementation of the Reeds-Shepp algorithm:\nhttps://github.com/boyali/reeds_and_shepp_curves/tree/master \n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Reeds-Shepp algorithm implementation in Python.",
    "version": "1.0.10",
    "project_urls": {
        "Homepage": "https://github.com/builtrobotics/rsplan"
    },
    "split_keywords": [
        "reeds-shepp",
        "path",
        "planning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9644958c338824aae30b60a4f99bacf51d0d4ad01266e630e2403e06b2351af4",
                "md5": "ef0e6c3ebaa2e23f1a983fc0edfccea1",
                "sha256": "31921e71883bc48aefd41c2aa0b414ca9d04f590f20de62f55d050b5da4d741c"
            },
            "downloads": -1,
            "filename": "rsplan-1.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef0e6c3ebaa2e23f1a983fc0edfccea1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18463,
            "upload_time": "2023-08-31T13:39:36",
            "upload_time_iso_8601": "2023-08-31T13:39:36.948377Z",
            "url": "https://files.pythonhosted.org/packages/96/44/958c338824aae30b60a4f99bacf51d0d4ad01266e630e2403e06b2351af4/rsplan-1.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bed6824a43a939afba7ac03cacc9d687a9d93736d5a52be2f8c07b77d891d1ea",
                "md5": "7d7cab9810567139c7f3d95846fa97a2",
                "sha256": "07c7202cc0d638f080d164563f9cec3c5d7c5159c43b24c340c40b53c29ebb91"
            },
            "downloads": -1,
            "filename": "rsplan-1.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "7d7cab9810567139c7f3d95846fa97a2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17631,
            "upload_time": "2023-08-31T13:39:38",
            "upload_time_iso_8601": "2023-08-31T13:39:38.248866Z",
            "url": "https://files.pythonhosted.org/packages/be/d6/824a43a939afba7ac03cacc9d687a9d93736d5a52be2f8c07b77d891d1ea/rsplan-1.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-31 13:39:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "builtrobotics",
    "github_project": "rsplan",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "rsplan"
}
        
Elapsed time: 0.12591s