CompilingI just start learning the Open Motion Planning Library (OMPL) to implement some new robot control ideas. Was able to build the current C++ version from Git without problems. However, building python binding did not went smooth because of missing dependencies and lack of required versions in standard Ubuntu repository. So I leave it because I am interesting in C++ anyway.
Running demosThe closest demo to what I need is RigidBodyPlanningWithODESolverAndControls.cpp . The first run produces result which I do not understand for 100%. It reach the goal, but trajectory looks strange to me.
Tailoring the demoIn my case the map has size somewhere around 1000x1000 in contrast to the size 2 (-1:1) used in demo. So I decide to adjust the demo by increasing the state space bounds correspondingly. In addition, I've made the car longer (5 instead of original 0.2). Also to let it drive faster, I've adjust control space bounds to 0:50 for the speed dimension. The following is reported by printSettings() function:
OMPL version: 1.3.0
Settings for the state space 'SE2CompoundSpace0'
- state validity check resolution: 3%
- valid segment count factor: 1
- state space:
Compound state space 'SE2CompoundSpace0' of dimension 3 (locked) [
Real vector state space 'RealVectorSpace1' of dimension 2 with bounds:
- min: 0 0
- max: 1000 1000
of weight 1
SO2 state space 'SO2Space2'
of weight 0.5
No registered projections
longest_valid_segment_fraction = 0.029999999999999999
valid_segment_count_factor = 1
Valid state sampler named uniform with parameters:
nr_attempts = 100
- control space:
Real vector control space 'RealVectorControl[SE2CompoundSpace0]' with bounds:
- min: 0 -0.3
- max: 50 0.3
- can propagate backward: yes
- propagation step size: 0
- propagation duration: [0, 0]
Warning: Assuming propagation will always have between 1 and 10 steps
at line 56 in /home/andrey/projects/piwars/ompl/src/ompl/control/src/SpaceInformation.cpp
Warning: The propagation step size is assumed to be 42.473531
at line 66 in /home/andrey/projects/piwars/ompl/src/ompl/control/src/SpaceInformation.cpp
Info: No planner specified. Using default.
Info: KPIECE1: Attempting to use default projection.
Info: KPIECE1: Starting planning with 1 states already in datastructure
Info: ProblemDefinition: Adding approximate solution from planner KPIECE1
Info: KPIECE1: Created 563 states in 165 cells (55 internal + 110 external)
Info: Solution found in 5.002863 seconds
OMPL was able to find solution. But again, similar to the original demo, the path is quite weird as could be seen on the following image:
I hear and I forget. I see and I remember. I do and I understand. (c) Confucius.Actually, my own robotics vehicle is differentially steered, not car-like as assumed in the OMPL example mentioned above. It looks like this:
|Rendering from CAD|
|The very first working prototype|
response from Mark Moll to my question in mail list. He states that with this implementation it is expected to get not optimal solution which confirms my experience so far. In addition, he suggests to try SST planner. This is what I am going to do next.