hbanzhaf / steering_functions

Apache License 2.0
229 stars 94 forks source link

How to integrate with OMPL, needs some detailed description. #8

Closed BenMSK closed 3 years ago

BenMSK commented 4 years ago

Hello, hbanzhaf! First of all, I am really into your amazing work. Thank you for sharing it.

I have tried to implement your steering function, specifically 'HC steer', into OMPL for using it as StateSpace with RRT*!

I tried to replace the 'Reeds-Shepps State Space function' in 'ompl::base::StateSpacePtr', but it seems that I need to define a new custom State Space function which is your HC steering function.

I am confused about where I start, so could you explain or describe a blueprint for implementing your steering function in OMPL?

Thank you,

palmieri commented 4 years ago

Hi,

you will need indeed to create a new StateSpace definition as it is done by OMPL for the Reeds-Shepp steering function, have a look here: https://ompl.kavrakilab.org/ReedsSheppStateSpace_8h_source.html .

In your case you will need to create a class that derives from compound state space, the latter having two main components a SE2StateSpace one and a R^2 one (this one to be used for the curvature and turning radius). Here a tutorial from OMPL https://ompl.kavrakilab.org/implementingStateSpaces.html. Hope this helps.

BenMSK commented 4 years ago

Hello, palmieri!

Thank you for a detailed description.

I am going to try what you have suggested!

Thanks,

-Minsoo

BenMSK commented 3 years ago

Hello!

I have reopened the issue because I am stuck within declaring a new state space. Currently, I am combining two state spaces, 1) SE2 (for x,y,yaw) and 2) R^2 (for curvature, sharpness) in my project (not adding a new source in OMPL). After I am declaring this new state space, I am confused about how to set the pre-defined 'distance' and 'interpolate' function of HC steer provided by in this repo..

Is there any way that I set the pre-defined 'distance' and 'interpolate' function of HC steer? like calling the 'steering function' and combining it with OMPL state space in the project, without adding a new source code in OMPL and building it. ( I expected that there is any function, for example, setStateDistanceFunction(distance_f_hc_steer) )

Or Do I have to add a new source code in the OMPL src for HC steer, and build it? like ReedsSheppStateSpace.h and ReedsSheppStateSpace.cpp in the OMPL src?

Thank you!