New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to load constructed roadmap by PRM? #631
Comments
Original comment by Mark Moll (Bitbucket: mamoll, GitHub: mamoll). Please look at the Thunder tool. There is a ThunderLightning.cpp demo in the ompl/demos folder that shows how to use it. |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). Could you please post a little working example? |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). I am not able to successfully reuse the roadmap (no solution is found and I am not using any state validity checking for now.) |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). I was able to run PRM with thunder tool. But I cannot find a solution. The logs indicate that a graph is being constructed. I am pasting the logs below: **Info: Initializing Thunder Framework
Declared parameters: Info: Loading database from file: /home/ankur/Flytbase/scaircrow/project/src/i-o_files/thunder.db I am not able to understand where I went wrong. I am also pasting my code below:
|
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). Also, How do I use PRM planner's member functions with Thunder. It is little bit confusing. It will be helpful if you can post a little example of these functionalities. |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). Okay. And how do I integrate functionalities of PRM like constructRoadmap with the thunder tool? |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). I tried it with PRM in the following manner: Gist of what I did in the code below:
It returns a valid path. And when I run it again after removing the construction phase of PRM, I can see it in the logs that data from the thunder.db is being used. LOGS: Info: ThunderDB: Loaded planner data with 36 vertices 34 edges 0 start states 0 goal states Info: Adding plannerData to SPARSdb: Info: Loading PlannerData into SPARSdb Info: Loading vertices: Info: Loading edges: Info: 2 connected components Info: Loaded database from file in 0.000219 sec Debug: ParallelPlan.solveOne starting planner Thunder_Retrieve_Repair Debug: ParallelPlan.solveOne starting planner PRM Info: Looking for a node near the problem start Info: Looking for a node near the problem goal Info: PRM: Starting planning with 2 states already in datastructure Debug: Starting lazy collision checking Info: Done lazy collision checking Info: spars::getSimilarPaths() returned true - found a solution of size 20 Debug: ParallelPlan.solveOne: Solution found by Thunder_Retrieve_Repair in 0.000398 seconds Info: PRM: Created 2 states Info: Closest path is still start and goal Info: ParallelPlan::solve(): Solution found by one or more threads in 0.001280 seconds Info: Thunder Solve: Possible solution found in 0.001291 seconds Info: SimpleSetup: Path simplification took 0.004041 seconds and changed from 20 to 7 states Info: Solution path has 7 states and was generated from planner Thunder_Retrieve_Repair Info: THUNDER RESULTS: From Recall Info: NOT adding path to database because SPARS already has it Info: Performing post-processing SOLVED = 1 Info: Saving database to file: /home/ankur/Flytbase/scaircrow/project/src/i-o_files/thunder2.db Info: Get planner data from SPARS2 with 36 vertices 34 edges 0 start states 0 goal states |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). I made one observation - when I use the above code and give expPlanner_->solve '0.1' seconds to solve, it gives me an optimized path in that little amount of time. But when I again run the above code after commenting out the growing and expanding phase of PRM but using the previously saved db, it does not give me the same path(optimized) as it did in the first iteration. From this, I conclude that the search tree growth and expansion by PRM is not saved in db and hence not used in the second iteration. |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). Does this tool only use the stored database for the combination of start and goal states that have already been visited in an iteration? If that is the case, then is the solution to make the stored database generic(useful for all start and goal combinations) is to iterate the above code with multiple combinations and saving them in the database? |
Original comment by Mark Moll (Bitbucket: mamoll, GitHub: mamoll). Setting PRM as the planner in Thunder means it is used to "repair" partial solution paths found in the SPARSdb. It does not mean that Thunder will somehow inherit the roadmap from PRM. Please consult the Thunder conference paper and Dave Coleman's PhD thesis for a detailed description of how this works. |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). I have an idea for storing the PRM like roadmap. If I run mutliple iterations of the above code with different set of start and goal state, it would generate a sparse representation. Does this seem valid to you? |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). Sure, I'll keep that in mind. Just one last question, do nodes from different experiences(start and goal combination) connect with each other to generate a graph like structure. I ask this because I'll be using this to find path between start and goal states that were not recorded by any of the experiences stored in the database. |
Original comment by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ). |
Original report by ANKUR SATYA (Bitbucket: [Ankur Satya](https://bitbucket.org/Ankur Satya), ).
I am using PRM planner to construct the roadmap and I want to use it afterwards to be able to query for a path in real time. But I cannot see any API for that. Could you please tell me how to do it?
The text was updated successfully, but these errors were encountered: