Skip to content

Commit

Permalink
Add legend
Browse files Browse the repository at this point in the history
  • Loading branch information
mattalvarado committed Nov 21, 2024
1 parent 09e2c23 commit 0c7b21e
Showing 1 changed file with 108 additions and 97 deletions.
205 changes: 108 additions & 97 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,113 @@
# LibMultiSense

- [Hello World](#libmultisense-hello-world)
- [OpenCV Integration](#opencv-integration)
- [Copy-Free Buffer Reservations](#copy-free-operations-image-buffer-reservations)
- [Installation](#installation)
- [Doccumentation](#doccumentation)
- [Support](#support)

LibMultiSense is a C++ library used to interface with the MultiSense S
family of sensors from Carnegie Robotics. For more information on the
various MultiSense products please visit
http://carnegierobotics.com/products/

### Installation

#### Linux

LibMultiSense uses CMake for its build system.

To build the standalone LibMultiSense library and demonstration applications.

# Note this only needs to be run once before building
> sudo apt install build-essential

> git clone https://github.com/carnegierobotics/LibMultiSense.git
> cd LibMultiSense
> mkdir build
> cd build && cmake -DCMAKE_INSTALL_PREFIX=../install ..
> make install
> cd ../install

To build the standalone LibMultiSense library without the demonstration applications,
set the cmake variable `-DMULTISENSE_BUILD_UTILITIES=OFF`

Integrating LibMultiSense into an existing CMake project is easy. There are two
primary methods for integration: a local install on your system, or a submodule
clone within your repository

##### Local Installation

LibMultiSense is installed on your system (i.e. in a location like /opt/multisense)

find_package(MultiSense)
target_link_libraries(<your-library-or-binary> MultiSense)

When running CMake, make sure to specify the location of the LibMultiSense install
via `-DCMAKE_PREFIX_PATH`

##### Git Submodule

Clone the LibMultiSense repository into the existing project's source tree.
In the main CMakeLists.txt file of the project, add the following lines:

include_directories(LibMultiSense/source/LibMultiSense)
add_subdirectory(LibMultiSense/source/LibMultiSense)

#### Windows

LibMultiSense uses CMake to create a Microsoft Visual Studio project file used
to build the LibMultiSense DLL.

Download and install CMake on Windows (http://www.cmake.org/download/), making
sure CMake is included included in the system PATH.

Clone LibMultiSense to the Windows machine using a Windows Git client.

Open a command prompt and execute the following commands:

> cd <LibMultiSense_checkout_directory>
> mkdir build
> cd build
> cmake ..

This will create a LibMultiSense.sln Visual Studio Solution file in the build directory.
Open the solution file with Visual Studio (http://msdn.microsoft.com/en-us/vstudio/aa718325.aspx)
and build the Solution.

### Documentation

Doccumentation of high-level LibMutliSense concepts can be found
[here](https://docs.carnegierobotics.com/docs/software/libmultisense.html)

Doxygen documentation can be built for LibMultisense by running the Doxygen
configuration file located in the docs directory

> cd LibMultiSense/docs
> doxygen Doxyfile

HTML and LaTex documentation will be generated in the docs directory.

Usage examples are included in the Doxygen documentation.

### Support

To report an issue with this library or request a new feature,
please use the [GitHub issues system](https://github.com/carnegierobotics/LibMultiSense/issues)

For product support, please see the [support section of our website](https://carnegierobotics.com/support)
Individual support requests can be created in our [support portal](https://support.carnegierobotics.com/hc/en-us)


### LibMultiSense Hello World

LibMultiSense builds as a single shared library which can be linked into
any existing project.

The two header files MultiSenseChannel.hh and MultiSenseTypes.hh contain
all the declarations necessary to interface with a MultiSense sensor.

#### test.cpp
```c++
#include <iostream>
Expand Down Expand Up @@ -108,95 +209,14 @@ install(TARGETS test
> make
### Installation
#### Linux
LibMultiSense uses CMake for its build system.
To build the standalone LibMultiSense library and demonstration applications.
# Note this only needs to be run once before building
> sudo apt install build-essential
> git clone https://github.com/carnegierobotics/LibMultiSense.git
> cd LibMultiSense
> mkdir build
> cd build && cmake -DCMAKE_INSTALL_PREFIX=../install ..
> make install
> cd ../install
To build the standalone LibMultiSense library without the demonstration applications,
set the cmake variable `-DMULTISENSE_BUILD_UTILITIES=OFF`
Integrating LibMultiSense into an existing CMake project is easy. There are two
primary methods for integration: a local install on your system, or a submodule
clone within your repository
##### Local Installation
LibMultiSense is installed on your system (i.e. in a location like /opt/multisense)
find_package(MultiSense)
target_link_libraries(<your-library-or-binary> MultiSense)
When running CMake, make sure to specify the location of the LibMultiSense install
via `-DCMAKE_PREFIX_PATH`
##### Git Submodule
Clone the LibMultiSense repository into the existing project's source tree.
In the main CMakeLists.txt file of the project, add the following lines:
include_directories(LibMultiSense/source/LibMultiSense)
add_subdirectory(LibMultiSense/source/LibMultiSense)
#### Windows
LibMultiSense uses CMake to create a Microsoft Visual Studio project file used
to build the LibMultiSense DLL.
Download and install CMake on Windows (http://www.cmake.org/download/), making
sure CMake is included included in the system PATH.
Clone LibMultiSense to the Windows machine using a Windows Git client.
Open a command prompt and execute the following commands:
> cd <LibMultiSense_checkout_directory>
> mkdir build
> cd build
> cmake ..
This will create a LibMultiSense.sln Visual Studio Solution file in the build directory.
Open the solution file with Visual Studio (http://msdn.microsoft.com/en-us/vstudio/aa718325.aspx)
and build the Solution.
### Documentation
LibMultiSense builds as a single shared library which can be linked into
any existing project.
The two header files MultiSenseChannel.hh and MultiSenseTypes.hh contain
all the declarations necessary to interface with a MultiSense sensor.
Doxygen documentation can be built for LibMultisense by running the Doxygen
configuration file located in the docs directory
> cd LibMultiSense/docs
> doxygen Doxyfile
HTML and LaTex documentation will be generated in the docs directory.
Usage examples are included in the Doxygen documentation.
#### OpenCV Integration
### OpenCV Integration
To display the images received from the camera in a OpenCV window, the image callback function
and CMakeLists.txt outlined in the [Hello World](#LibMultiSense Hello World) example can be
and CMakeLists.txt outlined in the [Hello World](#libmultisense-hello-orld) example can be
updated to the following
##### image_callback function
#### image_callback function
```c++
#include <opencv2/highgui.hpp>
Expand All @@ -216,7 +236,7 @@ void image_callback(const image::Header& header, void* user_data)
}
```

##### CMakeLists.txt
#### CMakeLists.txt

```
find_package(MultiSense REQUIRED)
Expand All @@ -228,14 +248,14 @@ target_link_libraries(test MultiSense
opencv_imgproc)
```

#### Copy-free Operations Image Buffer Reservations
### Copy-free Operations Image Buffer Reservations

Many use cases require multiple MultiSense image sources to be combined into artifacts
like color images or point clouds. By default, the memory underlying a Header object
is only valid in the scope of a callback. LibMultiSense offers a reservation mechanism
to extend the lifetime of data underlying Header objects for as long as the user would like.

The following modified version of the [Hello World](#LibMultiSense Hello World) example,
The following modified version of the [Hello World](#libmultisense-hello-world) example,
highlights how to perform this reservation operation to create and display color aux images.

Note, there are a limited number of buffers which LibMultiSense internally manages to store
Expand All @@ -244,7 +264,7 @@ frequency of the MultiSense, there could be situations where all the internal bu
actively reserved. The `Channel::setLargeBuffers` member function can be used to increased
the number of available internal buffers.

##### test.cc
#### test.cc

```c++
#include <iostream>
Expand Down Expand Up @@ -375,13 +395,4 @@ int main()
// Destroy the channel instance
Channel::Destroy(channel);
}

```
### Support
To report an issue with this library or request a new feature,
please use the [GitHub issues system](https://github.com/carnegierobotics/LibMultiSense/issues)
For product support, please see the [support section of our website](https://carnegierobotics.com/support)
Individual support requests can be created in our [support portal](https://support.carnegierobotics.com/hc/en-us)

0 comments on commit 0c7b21e

Please sign in to comment.