SRM Vision Project 2022 is the first well established visual project from SRM. Using deeplearning model detection, kalman prediction etc.
To build this project, all of these libraries should be pre-installed:
- G++ compiler 8.x with binary
g++-8
available. - CUDA 11.x, cuDNN and TensorRT 7+.
- OpenCV 4.5.x.
- Ceres Solver 2.x.
- FMT Library 8.x.
- HikRobots MVS and DaHeng imaging camera drivers.
Steps to build with CMake:
- Open
CMakeLists.txt
, check paths after# Custom library path.
can be reached, or correct them to fit your system environment. - Make a new directory naming
build
and go there:mkdir -p build && cd build
- Run cmake initialization command. To build a debug binary for performance testing and debugging,
use
-DCMAKE_BUILD_TYPE=Debug
flag, otherwise use-DCMAKE_BUILD_TYPE=Release
flag. Here is an example of building a release binary:Do not miss the lastcmake -DCMAKE_BUILD_TYPE=Release ..
..
. - If no error occurs, run
make -jn
(replacen
with your cpu core number likemake -j4
) to build executable file. - Run
./SRM2021 --type=controller_type
to run, withcontroller_type
replaced with a valid type in this list:- infantry
- Hero
- Sentry (lower gimbal)
Some math algorithms in this project support x86_64 SSE2 and ARMv8 NEON for hardware acceleration. To benchmark these
algorithms, build all targets with CMake and run executables in benchmark
folder. Here are all benchmark items:
rsqrt
includes hardware acceleration, "magic number" 0x5f375a86 and standard inverse square root algorithms.trigonometric
includes hardware acceleration and standard trigonometric functions.sse2
is an x86-only basic benchmark for float performance.
All of these accelerated method are based on SSEMath ( under Zlib license) and SSE2NEON ( under MIT license) open source projects.
Note that when building benchmark targets on mismatching architectures, targets will be empty to avoid errors.
This project uses doxygen for documentation. All docs in code follow doxygen documentation rules and can be identified by IDEs and doxygen tools.
A default PDF doc file refman.pdf
is placed at docs directory. Directly open it to read all docs of this project. Note
that this file is automatically generated by programs, so, duplicate and useless information may be included in it.
A default doxygen config file is provided in directory docs. Here are steps to build it:
- Run
doxywizard
and import this config file. - Select the root directory of project in "Step 1" of doxygen GUI window.
- Custom your config, turn to "Run" page and click "Run doxygen" button.
- All source files will be generated in a minute. Now HTML files are ready to use.
- (Optional) Open terminal at
docs/latex
and runmake -jn
(replacen
with your cpu core number) to build PDF file. You must install TeXLive (or something else to runtex
) in your system first to use it.