Skip to content

Commit 92bfb60

Browse files
committed
Fix MAB-RRT demo: update include paths and remove MAB_RRT_DEBUG references
- Changed include from disassemblyrrt to rrt directory - Removed MAB_RRT_DEBUG references (not available in this branch) - Fixed duplicate CMakeLists.txt entry - Demo now uses standard MAB_RRT planner
1 parent 0de471c commit 92bfb60

4 files changed

Lines changed: 15 additions & 31 deletions

File tree

demos/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ if (OMPL_BUILD_DEMOS)
3737
3838
add_ompl_demo(demo_OptimalPlanning OptimalPlanning.cpp)
3939
add_ompl_demo(demo_PlannerProgressProperties PlannerProgressProperties.cpp)
40-
add_ompl_demo(demo_MAB_RRT MAB_RRT_Demo.cpp)
4140
add_ompl_demo(demo_CForestCircleGridBenchmark CForestCircleGridBenchmark.cpp)
4241
4342
add_ompl_demo(demo_Diagonal Diagonal.cpp)
@@ -60,7 +59,7 @@ if (OMPL_BUILD_DEMOS)
6059
add_ompl_demo(demo_SpaceTimePlanning SpaceTimePlanning.cpp)
6160
6261
# MAB-RRT Demo - Multi-Armed Bandit RRT planner
63-
add_ompl_demo(demo_MAB_RRT disassembly/MAB_RRT_Demo.cpp)
62+
add_ompl_demo(demo_MAB_RRT MAB_RRT_Demo.cpp)
6463
target_link_libraries(demo_MAB_RRT PRIVATE yaml-cpp::yaml-cpp)
6564
6665
# MAB-RRT Benchmark - Compare planners on occupancy grid

demos/MAB_RRT_Demo.cpp

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
#include <ompl/geometric/PathGeometric.h>
6666

6767
// MAB-RRT planner
68-
#include <ompl/geometric/planners/disassemblyrrt/MAB_RRT.h>
69-
#include <ompl/geometric/planners/disassemblyrrt/MAB_RRT_DEBUG.h>
68+
#include <ompl/geometric/planners/rrt/MAB_RRT.h>
7069

7170
namespace ob = ompl::base;
7271
namespace og = ompl::geometric;
@@ -558,14 +557,12 @@ void runBugTrapDemo(const std::string& configPath, double timeout = 10.0, bool d
558557
std::cout << "[INFO] Config file: " << configPath << std::endl;
559558

560559
std::shared_ptr<og::MAB_RRT> planner;
561-
std::shared_ptr<og::MAB_RRT_DEBUG> debugPlanner;
562560

561+
// Note: MAB_RRT_DEBUG is not available in this branch, using standard MAB_RRT
563562
if (debug) {
564-
debugPlanner = std::make_shared<og::MAB_RRT_DEBUG>(si, configPath);
565-
planner = debugPlanner; // MAB_RRT_DEBUG inherits from MAB_RRT (note: class names not yet renamed)
566-
} else {
567-
planner = std::make_shared<og::MAB_RRT>(si, configPath);
563+
std::cout << "[WARNING] Debug mode requested but MAB_RRT_DEBUG not available. Using standard MAB_RRT." << std::endl;
568564
}
565+
planner = std::make_shared<og::MAB_RRT>(si, configPath);
569566

570567
planner->setProblemDefinition(pdef);
571568
planner->setup();
@@ -651,10 +648,9 @@ void runBugTrapDemo(const std::string& configPath, double timeout = 10.0, bool d
651648
std::cout << "\n[STATS] Tree vertices: " << pdata.numVertices() << std::endl;
652649
std::cout << "[STATS] Tree edges: " << pdata.numEdges() << std::endl;
653650

654-
// Export debug data if in debug mode (always to demos/disassembly/)
655-
if (debug && debugPlanner) {
656-
debugPlanner->exportSampleData("bugtrap_samples_debug.csv");
657-
std::cout << "[DEBUG] Sample data exported to: demos/disassembly/bugtrap_samples_debug.csv" << std::endl;
651+
// Export debug data if in debug mode (MAB_RRT_DEBUG not available in this branch)
652+
if (debug) {
653+
std::cout << "[WARNING] Debug data export not available - MAB_RRT_DEBUG not in this branch" << std::endl;
658654
}
659655

660656
std::cout << "\n==================================================" << std::endl;
@@ -754,17 +750,13 @@ void runOccupancyGridDemo(const std::string& configPath,
754750
std::cout << "[INFO] Config file: " << configPath << std::endl;
755751

756752
std::shared_ptr<og::MAB_RRT> planner;
757-
std::shared_ptr<og::MAB_RRT_DEBUG> debugPlanner;
758753

754+
// Note: MAB_RRT_DEBUG is not available in this branch, using standard MAB_RRT
759755
if (debug) {
760-
std::cout << "[DEBUG] Creating MAB_RRT_DEBUG planner instance..." << std::endl;
761-
debugPlanner = std::make_shared<og::MAB_RRT_DEBUG>(si, configPath);
762-
planner = debugPlanner;
763-
std::cout << "[DEBUG] MAB_RRT_DEBUG planner created successfully" << std::endl;
764-
} else {
765-
std::cout << "[INFO] Creating standard MAB_RRT planner (non-debug)" << std::endl;
766-
planner = std::make_shared<og::MAB_RRT>(si, configPath);
756+
std::cout << "[WARNING] Debug mode requested but MAB_RRT_DEBUG not available. Using standard MAB_RRT." << std::endl;
767757
}
758+
std::cout << "[INFO] Creating MAB_RRT planner..." << std::endl;
759+
planner = std::make_shared<og::MAB_RRT>(si, configPath);
768760

769761
planner->setProblemDefinition(pdef);
770762
planner->setup();
@@ -831,11 +823,9 @@ void runOccupancyGridDemo(const std::string& configPath,
831823
std::cout << "\n[STATS] Tree vertices: " << pdata.numVertices() << std::endl;
832824
std::cout << "[STATS] Tree edges: " << pdata.numEdges() << std::endl;
833825

834-
// Export debug data if in debug mode
835-
if (debug && debugPlanner) {
836-
std::string samplesFile = "bugtrap_samples_debug.csv";
837-
debugPlanner->exportSampleData(samplesFile);
838-
std::cout << "[DEBUG] Sample data exported to: " << samplesFile << std::endl;
826+
// Export debug data if in debug mode (MAB_RRT_DEBUG not available in this branch)
827+
if (debug) {
828+
std::cout << "[WARNING] Debug data export not available - MAB_RRT_DEBUG not in this branch" << std::endl;
839829
}
840830

841831
std::cout << "\n==================================================" << std::endl;

demos/disassembly/MAB_SSRRT_WORKFLOW.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,10 +721,6 @@ Output: newMotion (if valid), solutionFound
721721

722722
### 10.3 Burn-In Parameters
723723
- `adaptive_quasirandom_sample_size`: Number of samples per radius test
724-
- `adaptive_start_radius`: Initial sampling radius
725-
- `adaptive_min_radius`: Minimum radius threshold
726-
- `adaptive_shrink_step`: Radius reduction factor
727-
- `adaptive_grow_step`: Radius increase factor
728724
- `adaptive_min_expected_validity_rate`: Lower bound for target range
729725
- `adaptive_max_expected_validity_rate`: Upper bound for target range
730726
- `adaptive_burnin_max_steps`: Maximum iterations

demos/disassembly/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ The demo requires a YAML configuration file. The default configuration is locate
158158

159159
Key parameters:
160160
- `adaptive_quasirandom_sample_size`: Number of samples during burn-in
161-
- `adaptive_start_radius`: Initial sampling radius
162161
- `mab_uniform_sphere_window_size`: MAB sliding window size
163162
- `uniform_goal_bias`: Goal bias for uniform sampling
164163
- `sphere_goal_bias`: Goal bias for cylinder sampling

0 commit comments

Comments
 (0)