Skip to content

Commit

Permalink
Completed Top Level README
Browse files Browse the repository at this point in the history
  • Loading branch information
DanMcGann committed Jun 13, 2024
1 parent c111f87 commit 5bd9902
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ target_include_directories(ScanContext PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/scan_


# If testing is configured, setup the tests
if (${SCAN_CONTEXT_ENABLE_TESTS})
if (${SCAN_CONTEXT_BUILD_TESTS})
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/tests")
endif()


# If python bindings are configured, build the python bindings
if (${SCAN_CONTEXT_ENABLE_PYTHON})
if (${SCAN_CONTEXT_BUILD_PYTHON})
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/python")
endif()
62 changes: 54 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,63 @@ This library provides a simple and light weight implementation of the ScanContex
* `python/` - Contains definitions for python wrappers of the modules above.
* `tests/` - Provides unit tests to validate the implementation.

Code is currently documented with in-line comments (doxygen coming soon!). For example usage please see the unit tests in `tests/`
Code is currently documented with in-line comments (doxygen coming soon!). For example usage please see the unit tests in `tests/`.

[TODO] Document Install

[TODO] Document PointCloud Usage
#### Pointcloud Definitions
This library defines the input pointcloud very generically to enable developers to use it within existing systems. Specifically, we only assume that PointClouds are `std::vectors` of structures of templated type T. The user can use any T so long as it includes x, y, z elements. The only thing the user has to do is to provide the correct Accessor function to extract this elements from T.

[TODO] Document independence to other libraries
We provide 3 common Accessor functions (`scan_context/include/scan_context/types.h`), and example usage can be found in the unit tests.

Since we expect most people to use ScanContext along side PCL who's point structures are accessed with fields, we set the default accessor to `fieldAccessor`.

#### Dependencies
The following libraries are dependencies of ScanContext:
* Eigen3 [Matrix Math] - Must be installed on the system
* nanoflann [KDTrees in Database] - Included automatically via fetch content
* Pybind11 [Python Bindings] - Enables python bindings (ONLY if `-DSCAN_CONTEXT_ENABLE_PYTHON=TRUE`)
* gtest [Unit Testing Framework] - Provides unit testing framework (ONLY if `-DSCAN_CONTEXT_ENABLE_TEST=TRUE`)
* Eigen3 [Matrix Math] - Must be installed on the system.
* nanoflann [KDTrees in Database] - Included automatically via fetch content.
* Pybind11 [Python Bindings] - Enables python bindings.
* Required ONLY if `-DSCAN_CONTEXT_BUILD_PYTHON=TRUE`.
* gtest [Unit Testing Framework] - Provides unit testing framework.
* Required ONLY if `-DSCAN_CONTEXT_BUILD_TESTS=TRUE`.

#### Installation
##### C++
We do not provide infrastructure to install this library. It is only ever going to be used in the context of another project, so we heavily suggest incorporating it into your CMake based project via `FetchContent`. An example of the CMake code required to do so can be found below and an example of this being used in a larger project is coming soon!

```
include(FetchContent)
FetchContent_Declare(
scan_context
GIT_REPOSITORY git@github.com:DanMcGann/scan_context.git
GIT_TAG main
)
FetchContent_MakeAvailable(scan_context)
```

##### Python
Unfortunately, python does not provide the same level of convenience to include in existing projects. To install the python bindings...
* Clone this repository
* `git clone git@github.com:DanMcGann/scan_context.git`
* Build the code
* `cd scan_context && mkdir build && cd build`
* `cmake .. -DSCAN_CONTEXT_BUILD_PYTHON=TRUE`
* `make`
* Install the Python Bindings
* `make python-install`

Note: The CMake target `python-install` uses `pip` under the hood, this means that you can specifically install `scan_context` within conda or similar environments.


#### Testing
To run the unit tests:
* Clone this repository
* `git clone git@github.com:DanMcGann/scan_context.git`
* Build the code
* `cd scan_context && mkdir build && cd build`
* `cmake .. -DSCAN_CONTEXT_BUILD_PYTHON=TRUE`
* `make`
* Run the Unit tests
* `make test`

# Issues
If you have any issues with this library please submit a github ticket. If you are reporting a bug please provide a unit test that demonstrates the bug!

0 comments on commit 5bd9902

Please sign in to comment.