Merge branch 'doc/dev_setup' into 'master'
Added initial development documentation See merge request slam/basalt!6
This commit is contained in:
		
						commit
						696587058d
					
				
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,7 +1,6 @@ | ||||
| cmake-build* | ||||
| .idea | ||||
| CMakeLists.txt.user | ||||
| build | ||||
| thirdparty/build-* | ||||
| build* | ||||
| scripts/eval/eval_* | ||||
| scripts/eval_full/eval_* | ||||
|  | ||||
| @ -60,6 +60,9 @@ NOTE: It is possible to compile the code on Ubuntu 16.04, but you need to instal | ||||
| * [Visual-inertial odometry and mapping.](doc/VioMapping.md) | ||||
| * [Simulation tools to test different components of the system.](doc/Simulation.md) | ||||
| 
 | ||||
| ## Development | ||||
| * [Development environment setup.](doc/DevSetup.md) | ||||
| 
 | ||||
| ## Licence | ||||
| The code is provided under a BSD 3-clause license. See the LICENSE file for details. | ||||
| Note also the different licenses of thirdparty submodules. | ||||
|  | ||||
							
								
								
									
										55
									
								
								doc/DevSetup.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								doc/DevSetup.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | ||||
| 
 | ||||
| 
 | ||||
| ### Clang-format | ||||
| We use clang-format to maintain a consistent formating of the code. Since there are small differences between different version of clang-format we use version 8 on all platforms. | ||||
| 
 | ||||
| On **Ubuntu 18.04** run the following commands to install clang-format-8 | ||||
| ``` | ||||
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - | ||||
| sudo sh -c 'echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main" > /etc/apt/sources.list.d/llvm8.list' | ||||
| sudo apt-get install clang-format-8 | ||||
| ``` | ||||
| 
 | ||||
| On **MacOS** [Homebrew](https://brew.sh/) should install the right version of clang-format: | ||||
| ``` | ||||
| brew install clang-format | ||||
| ``` | ||||
| 
 | ||||
| ### Install and configure QtCreator | ||||
| Download and install QtCreator. On **Ubuntu 18.04** run: | ||||
| ``` | ||||
| wget https://download.qt.io/official_releases/qtcreator/4.9/4.9.0/qt-creator-opensource-linux-x86_64-4.9.0.run | ||||
| chmod +x qt-creator-opensource-linux-x86_64-4.9.0.run | ||||
| ./qt-creator-opensource-linux-x86_64-4.9.0.run | ||||
| ``` | ||||
| 
 | ||||
| On **MacOS** run: | ||||
| ``` | ||||
| wget https://download.qt.io/official_releases/qtcreator/4.9/4.9.0/qt-creator-opensource-mac-x86_64-4.9.0.dmg | ||||
| open qt-creator-opensource-mac-x86_64-4.9.0.dmg | ||||
| ``` | ||||
| 
 | ||||
| After installation, go to `Help` -> `About plugins...` in the menu and enable Beautifier plugin (formats the code automatically on save): | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| Go to `Tools` -> `Options` and select the Beautifier tab. There select ClangFormat as the tool in `General` tab. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| Select file as predefined style in `Clang Format` tab. Also select `None` as the fallback style. For **Ubuntu 18.04** change the executable name to `/usr/bin/clang-format-8`. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Build project | ||||
| First, clone the project repository. | ||||
| ``` | ||||
| git clone --recursive https://gitlab.com/VladyslavUsenko/basalt.git | ||||
| ``` | ||||
| 
 | ||||
| After that, in QtCreator open to the `CMakeLists.txt` in the `basalt` folder and configure the project with `Release with Debug Info` configuration. The build directory should point to `/<your_installation_path>/basalt/build`. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| Finally, you should be able to build and run the project. | ||||
| 
 | ||||
							
								
								
									
										
											BIN
										
									
								
								doc/img/qt_creator_beautifier_clang_format.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/img/qt_creator_beautifier_clang_format.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 84 KiB | 
							
								
								
									
										
											BIN
										
									
								
								doc/img/qt_creator_beautifier_general.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/img/qt_creator_beautifier_general.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 73 KiB | 
							
								
								
									
										
											BIN
										
									
								
								doc/img/qt_creator_configure_project.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/img/qt_creator_configure_project.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 186 KiB | 
							
								
								
									
										
											BIN
										
									
								
								doc/img/qt_creator_plugins.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								doc/img/qt_creator_plugins.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 169 KiB | 
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user