nathanlct / reeds-shepp-curves

A simple Python implementation of the Reeds-Shepp curves formulas.
MIT License
127 stars 45 forks source link

Refactoring and Fixes #3

Closed benjaminbecker closed 3 years ago

benjaminbecker commented 3 years ago

In Issue #2 two bugs have been reported:

  1. Negative values for PathElements are ignored in the calculation
  2. Lists of PathElements are copied and their element are changed afterward. This leads to changes in the original lists.

This pull request fixes these bugs. The length in PathElements remains positive, but if the constructor gets a negative value for param it reverses the gear.

Furthermore I wrote some tests and did some refactorings, which hopefully improve code quality.