Skip to content

Conversation

@Jaeyoung-Lim
Copy link
Contributor

@Jaeyoung-Lim Jaeyoung-Lim commented Jul 24, 2023

Problem Description
Currently, the Dubins distance computation is done by going through all six path types exhaustively. This is quite inefficient for applications such as sampling-based planners, as the Dubins distance need to be computed many times repeatedly.

It has been proposed by Shkel(2001) that certain Dubins path types can be excluded by looking at the start and end configurations of the path. While the current OMPL implementation of DubinsStateSpace references the paper from Shkel(2001), the implementation goes through every Dubins path type exhaustively. This was discussed previously in an issue: #1014 with @zkingston and @mamoll

Proposed Solution
The proposed solution is to implement the Dubins Set Classification theme in the DubinsStateSpace.

While trying to implement the Dubins Set Classification method, I ran into some issues where the Dubins Set Classification results were not correct for some cases.

I realized these were related to some issues with the original Dubins set classifications scheme proposed in Shkel(2001), and presented the corrections in the Workshop on Energy Efficient Robotic Systems at ICRA 2023

This work was done with @acfloria @nrjl @rikba

This PR adds an implementation of the DubinsSetClassification including the corrections regarding the long path case classification and the classification of Dubins Path types for equivalency group a_12, a_21, a_34, a_43

Evaluation
The following shows a comparison between the Dubins Set Classification and exhaustive Dubins calculations. (Ours being the Dubins set classification)
image

The results show that the set classification takes 42% of the time compared to exhaustive Dubins calculations, while always returning the same answer with the exhaustive Dubins path calculations

@mamoll
Copy link
Member

mamoll commented Jul 25, 2023

I am running demo_GeometricCarPlanning --dubins --distance to visualize the results as a basic sanity check. There are several erroneous results. Can you confirm that the distance between (0,0,0) and (1.9,.2,-pi) is 1.79769e+308 (or something like that)? My first guess would be a divide by 0 somewhere, but I don't see anything obvious. Let me know if you also see weird values in the output of demo_GeometricCarPlanning --dubins --distance.

This adds dubins set classification in the DubinsStateSpace in order to make the dubins path computation more efficient. 


The classifications scheme is based on Shkel, Andrei M., and Vladimir Lumelsky. "Classification of the Dubins set." Robotics and Autonomous Systems 34.4 (2001): 179-202.

Additional correction is required for the classification scheme, where work from Lim, Jaeyoung, et al. "Circling Back: Dubins set Classification Revisited." Workshop on Energy Efficient Aerial Robotic Systems, International Conference on Robotics and Automation 2023. 2023. has been used.
@Jaeyoung-Lim Jaeyoung-Lim force-pushed the pr-dubins-set-classification branch from 31359b0 to 1e463c8 Compare July 25, 2023 13:28
@Jaeyoung-Lim
Copy link
Contributor Author

Jaeyoung-Lim commented Jul 25, 2023

@mamoll Indeed, I could reproduce the issues. The problem was that in some cases, alpha and beta were not in the range of [0, 2pi], which was not really part of my test script.

I have hardened this in the last commit by running a mod2pi in the Dubins calculation and it seems to be fixed on my side. Would you be able to check the fix? Thank you in advance!

The alpha, beta ranges need to be in the range of [0, 2pi]
@Jaeyoung-Lim Jaeyoung-Lim force-pushed the pr-dubins-set-classification branch from 3687e6a to 1c3abac Compare July 25, 2023 13:54
Copy link
Member

@mamoll mamoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great work. I did some testing to confirm that the old and new code are input/output equivalent and this appears to be the case. I also confirmed that the new code provides a significant performance improvement. Thank you for your contribution.

I have one small stylistic comment. Let me know if you agree.

DUBINS_RIGHT = 2
};

enum DubinsClass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move this to DubinsStateSpace.cpp inside an anonymous namespace, since it is only used internally and not in the public API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

This addresses a review comment moving the DubinsClass into the anonymous namespace
@Jaeyoung-Lim Jaeyoung-Lim force-pushed the pr-dubins-set-classification branch from ed3d009 to b6319a7 Compare July 27, 2023 06:53
@mamoll mamoll merged commit fed2f3e into ompl:main Jul 27, 2023
@mamoll
Copy link
Member

mamoll commented Jul 27, 2023

Thanks again, @Jaeyoung-Lim!

@Jaeyoung-Lim Jaeyoung-Lim deleted the pr-dubins-set-classification branch July 27, 2023 20:50
@Jaeyoung-Lim
Copy link
Contributor Author

@mamoll Happy to contribute! Thanks for the merge!

twill777 pushed a commit to robotic-esp/ompl that referenced this pull request Oct 3, 2025
…DubinsStateSpace (ompl#1080)

This adds dubins set classification in the DubinsStateSpace in order to make the dubins path computation more efficient. 

The classifications scheme is based on Shkel, Andrei M., and Vladimir Lumelsky. "Classification of the Dubins set." Robotics and Autonomous Systems 34.4 (2001): 179-202.

Additional correction is required for the classification scheme, where work from Lim, Jaeyoung, et al. "Circling Back: Dubins set Classification Revisited." Workshop on Energy Efficient Aerial Robotic Systems, International Conference on Robotics and Automation 2023. 2023. has been used.
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