Skip to content

Conversation

zarmars
Copy link
Contributor

@zarmars zarmars commented Mar 2, 2021

…mpared. Optimal path may be discarded.

Reference issue

What does this implement/fix?

  1. Function 'mod' in numpy library behaves differently from 'fmod' in c++ and it should be treated specially in the implementation of the function 'mod2pi'.
  2. In the implementation of function 'set_path', the basis of path length comparison should be the sum of the absolute value of its segment length, otherwise the optimal path may be lost.
    E.g. start point (0, 0, 0), end point defined as follows:
    t, u, w = -math.pi / 6., math.pi / 2., math.pi / 3.
    end_x = math.sin(w - u + t) + 2. * math.sin(u - t) + 2. * math.sin(t)
    end_y = -math.cos(w - u + t) + 2. * math.cos(u - t) - 2. * math.cos(t) + 1.
    end_yaw = w - u + t
    and the optimal path is 'L_t' + 'R_u' + 'L_w' which gives minimum path length math.pi(i.e. 3.14) while the original program presents a non-optimal path with path length 4.18.

Additional information

@zarmars
Copy link
Contributor Author

zarmars commented Mar 2, 2021

@zarmars zarmars closed this Mar 2, 2021
@zarmars zarmars deleted the dev/fix-reeds-shepp-error-discard-optimal branch March 2, 2021 10:03
@zarmars zarmars restored the dev/fix-reeds-shepp-error-discard-optimal branch March 2, 2021 10:13
@zarmars zarmars reopened this Mar 2, 2021
@zarmars zarmars changed the title Fix the problem that the length of candidate path is not correctly co… Fix the problem optimal path may lost. Mar 2, 2021
@zarmars zarmars changed the title Fix the problem optimal path may lost. Fix the problem that the optimal path may be discarded. Mar 2, 2021
@AtsushiSakai AtsushiSakai merged commit d53ec93 into AtsushiSakai:master Mar 16, 2021
@AtsushiSakai
Copy link
Owner

Indeed. Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants