append readme

This commit is contained in:
PodmogilnyjIvan
2021-12-05 08:54:47 -08:00
parent 39c688019b
commit 23acb5817c
5 changed files with 43 additions and 9 deletions

View File

@@ -4,27 +4,49 @@
## Prerequisites ## Prerequisites
1. Install cmake: https://cmake.org/download/ 1. Install cmake: https://cmake.org/download/
2. Install Gstreamer. Download and follow the instructions guideline from DriveCast. 2. Install Gstreamer. Download and follow the instructions guideline from DriveCast. Follow the rules of installation STRICTLY.
3. Install OSCPack_1_1_0: http://www.rossbencina.com/code/oscpack 3. Install OSCPack_1_1_0: http://www.rossbencina.com/code/oscpack
4. Install vcpkg: https://vcpkg.io/en/getting-started.html 4. Install vcpkg: https://vcpkg.io/en/getting-started.html
5. Install Visual Studio 2019. Install the version of Windows SDK 10.0.20348.0 5. Install Visual Studio 2019. Install the version of Windows SDK 10.0.20348.0
6. Download and build changed ORB_SLAM3 library from here: https://git.drivecast.tech/PodmogilnyjIvan/ORB_SLAM3 For the build instructions refer to the repository. 6. Download and build Prerequisites for the changed ORB_SLAM3 library and the ORB_SLAM3 library itself from here:
## Build oscpack: ## Build OscPack:
1. In the extracted folder: `mkdir build && cd build` 1. In the extracted folder: `mkdir build && cd build`
2. `cmake ..` 2. `cmake ..`
3. Open `TestOscPack.sln` project in Visual Studio. Edit Preferences ONLY of oscpack 3. Open `TestOscPack.sln` project in Visual Studio. Edit Preferences ONLY of oscpack. Change buld type to `Release`
4. Change: General -> Configuration Type -> Static Library (.lib) 4. Change: General -> Configuration Type -> Static Library (.lib)
5. Also: Advanced -> Target File Extension -> .lib 5. Also: Advanced -> Target File Extension -> .lib
6. Build oscpack, OscReceiveTest, SimpleReceive, SimpleSend, OscSendTests 6. Build oscpack, OscReceiveTest, SimpleReceive, SimpleSend, OscSendTests
## !Build boost.
## Build ORB_SLAM3
- Instructions are here: https://git.drivecast.tech/PodmogilnyjIvan/ORB_SLAM3
- Save the path to your `vcpkg.cmake` file, you'll need it later.
- Don't forget to write `vcpkg integrate all` to use vcpkg in Visual Studio projects.
## Build MyGst ## Build MyGst
1. In `CMakeLists.txt` file
- Under `OSC BEGIN` section define your `OSC_DIR`
- Under `ORB_SLAM3 BEGIN` section define directories for all of the libraries mentioned in the file.
- Under `OpenCV BEGIN` section in `set(OpenCV_DIR XXX)` instead of XXX define your directory.
2. `mkdir build && cd build`
3. `cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/ivan/Source/Repos/ORB_SLAM3/Thirdparty/Pangolin/vcpkg/scripts/buildsystems/vcpkg.cmake ..` Instead of my path, you have to paste your path to `vcpkg.cmake`
4. You need to build `gst_get_ndi` and `my_ndi_source` projects. Before bulding edit the Preferences of these two projects...
- C/C++ -> Code Generation -> Runtime Library -> MT
- The path `Boost_DIR/stage/lib` paste to Linker -> General -> Additional Library Directories
1. put run_gst_loopthrough_capture.bat in the folder, where the binary is located. 5. Change Preferences of oscpack project:
3. open cmd, and run `activate-env.cmd` from Gstreamer, then run `mkdir build && cd build`, and finally `cmake -D_CMAKE_TOOLCHAIN_FILE=XXX ..`, - C/C++ -> Code Generation -> Runtime Library -> MT
where XXX is a path to VCPKG, example: C:/Users/ivan/Source/Repos/ORB_SLAM3/Thirdparty/Pangolin/vcpkg/scripts/buildsystems/vcpkg.cmake 6. Build `gst_get_ndi` and `my_ndi_source`
1. Install changed Gstreamer from DriveCast. ## Running
Along with the library, .cmd and .bat scripts are provided. Put them in the `Project_DIR/build/Release` directory. Project_DIR stands for the MyGst project itself.
1. In cmd 1, in `oscpack_DIR/build/Release` directory: run `OscReceiveTest.exe`
2. In cmd 2, in the `Project_DIR/build/Release` directory: run `set-env.bat`, then Run `run_source.cmd`
3. In cmd 3, in the `Project_DIR/build/Release` directory: run `set-env.bat`, then Run `run_gst_loopthrough_capture.cmd`
You should now be able to see RoboRace video, and in cmd_1 you should be able to see the receiving of the processed data.

4
run_capture_ndi.cmd Normal file
View File

@@ -0,0 +1,4 @@
rem set "PATH=%PATH%;C:\AnacondaGst_x64\Library\bin;C:\Program Files\NDI\NDI 5 SDK\Bin\x64"
call ..\PyGstTools\set-env.bat
my_ndi.exe -h
cmd.exe

View File

@@ -1,6 +1,6 @@
rem set "PATH=%PATH%;C:\AnacondaGst_x64\Library\bin;C:\Program Files\NDI\NDI 5 SDK\Bin\x64" rem set "PATH=%PATH%;C:\AnacondaGst_x64\Library\bin;C:\Program Files\NDI\NDI 5 SDK\Bin\x64"
call ..\PyGstTools\set-env.bat call ..\PyGstTools\set-env.bat
set "STREAM_NAME=Ball" set "STREAM_NAME=my_ndi_source"
FOR /F "tokens=* USEBACKQ" %%F IN (`hostname`) DO (SET THIS_HOST=%%F) FOR /F "tokens=* USEBACKQ" %%F IN (`hostname`) DO (SET THIS_HOST=%%F)
ECHO %THIS_HOST% ECHO %THIS_HOST%
ECHO "%THIS_HOST% (%STREAM_NAME%)" ECHO "%THIS_HOST% (%STREAM_NAME%)"

4
run_source.cmd Normal file
View File

@@ -0,0 +1,4 @@
call set-env.bat
set "GST_DEBUG=4"
my_ndi_source.exe
cmd.exe

4
set-env.bat Normal file
View File

@@ -0,0 +1,4 @@
call C:\AnacondaGst_x64\Scripts\activate.bat
set "GST_PLUGIN_PATH=C:\AnacondaGst_x64\Library\lib\gstreamer-1.0"
set "QT_PLUGIN_PATH=C:\AnacondaGst_x64\Library\plugins"