File tree Expand file tree Collapse file tree 4 files changed +103
-12
lines changed
rapidly_exploring_random_tree Expand file tree Collapse file tree 4 files changed +103
-12
lines changed Original file line number Diff line number Diff line change 1
1
## Robot Path Planning
2
2
* [ Monte Carlo Tree Search] ( monte_carlo_tree_search/README.md )
3
- * [ Rapidly Exploring Random Tree (RRT)] ( rapidly_exploring_random_tree/README.md )
3
+ * [ Rapidly Exploring Random Tree (RRT)] ( rapidly_exploring_random_tree/README.md )
4
+
5
+ ### Appendix: Build & Run
6
+ ` CMakeList.txt ` mainly for github workflows' building process.
7
+
8
+ If you want to build manually using ` CMakeList.txt ` , use following commands:
9
+
10
+ ``` shell
11
+ # build
12
+ mkdir build && cd build
13
+ cmake ..
14
+ make
15
+ ```
16
+
17
+ Run:
18
+
19
+ ``` shell
20
+ # mcts
21
+ ./monte_carlo_tree_search/mcts.so
22
+ # rrt
23
+ ./rapidly_exploring_random_tree/rrt.so
24
+ ```
25
+
26
+ Clean:
27
+
28
+ ``` shell
29
+ make clean
30
+ ```
Original file line number Diff line number Diff line change @@ -29,20 +29,33 @@ add_compile_definitions(
29
29
CONFIG_C=${CONFIG_C}
30
30
)
31
31
32
- # source
33
- set (SRC
34
- src/main.cpp
35
- src/mcts.cpp
36
- src/state.cpp
32
+ # Set dir of include, src and obj
33
+ set (INCDIR ${CMAKE_SOURCE_DIR} /include )
34
+ set (SRCDIR ${CMAKE_SOURCE_DIR} /src )
35
+ set (OBJDIR ${CMAKE_BINARY_DIR} /obj )
36
+
37
+ # Set obj files and src files
38
+ set (SRCFILES ${CMAKE_CURRENT_LIST_DIR} /src/state.cpp ${CMAKE_CURRENT_LIST_DIR} /src/mcts.cpp ${CMAKE_CURRENT_LIST_DIR} /src/main.cpp )
39
+ set (OBJFILES ${OBJDIR} /mcts.o ${OBJDIR} /main.o )
40
+
41
+ # Include Dir
42
+ include_directories (${INCDIR} )
43
+
44
+ # Add an object library to control the generation of object files
45
+ add_library (mcts_objects OBJECT ${SRCFILES} )
46
+
47
+ # Set the output directory to the obj folder
48
+ set_target_properties (mcts_objects PROPERTIES
49
+ ARCHIVE_OUTPUT_DIRECTORY ${OBJDIR}
50
+ LIBRARY_OUTPUT_DIRECTORY ${OBJDIR}
51
+ RUNTIME_OUTPUT_DIRECTORY ${OBJDIR}
37
52
)
38
53
39
- # header
40
- include_directories (include )
41
-
42
54
# executable file
43
- add_executable (mcts.so ${SRC} )
55
+ add_executable (mcts.so $< TARGET_OBJECTS:mcts_objects > )
44
56
45
57
# clean
46
58
add_custom_target (clean_mcts
59
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${OBJDIR}
47
60
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR} /mcts.so
48
61
)
Original file line number Diff line number Diff line change 1
1
## Monte Carlo Tree Search
2
2
### Background: Algorithm Framework
3
+ [ Original Paper] ( paper/CG2006.pdf )
4
+
5
+ Algorithm Main Steps:
6
+
3
7
1 . Selection
4
8
2 . Expansion
5
9
3 . Simulation / Rollout
6
- 4 . Backpropagation
10
+ 4 . Backpropagation
11
+
12
+ ### Appendix: Build & Run
13
+ ` CMakeList.txt ` mainly for github workflows' building process.
14
+
15
+ If you want to build manually, use ` Makefile ` there.
16
+
17
+ * Build
18
+
19
+ ``` shell
20
+ make
21
+ ```
22
+
23
+ * Run:
24
+
25
+ ``` shell
26
+ ./mcts.so
27
+ ```
28
+
29
+ * Clean:
30
+
31
+ ``` shell
32
+ make clean
33
+ ```
Original file line number Diff line number Diff line change 1
- ## Rapidly Exploring Random Tree (RRT)
1
+ ## Rapidly Exploring Random Tree (RRT)
2
+ [ Original Paper] ( paper/Lav98c.pdf )
3
+
4
+ ### Appendix: Build & Run
5
+ ` CMakeList.txt ` mainly for github workflows' building process.
6
+
7
+ If you want to build manually, use ` Makefile ` there.
8
+
9
+ * Build
10
+
11
+ ``` shell
12
+ make
13
+ ```
14
+
15
+ * Run:
16
+
17
+ ``` shell
18
+ ./rrt.so
19
+ ```
20
+
21
+ * Clean:
22
+
23
+ ``` shell
24
+ make clean
25
+ ```
You can’t perform that action at this time.
0 commit comments