Skip to content

Commit

Permalink
please update to last sdk2
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Sep 28, 2018
1 parent beb3118 commit 66ef80d
Show file tree
Hide file tree
Showing 7 changed files with 953 additions and 23 deletions.
18 changes: 3 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,8 @@ endif()

LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)

#mynteye-sdk2
if (DEFINED ENV{MYNTEYE_SDK2_ROOT})
set(MYNTEYE_SDK2_DIR $ENV{MYNTEYE_SDK2_ROOT})
endif()

set(MYNT_SDK2_LIB_DIR ${MYNTEYE_SDK2_DIR}/_install/lib)
include_directories(
${MYNTEYE_SDK2_DIR}/_install/include
${MYNTEYE_SDK2_DIR}/third_party/glog
)

find_package(glog 0.3.5 REQUIRED)



find_package(Glog REQUIRED)
find_package(OpenCV 3.0 QUIET)
if(NOT OpenCV_FOUND)
find_package(OpenCV 2.4.3 QUIET)
Expand Down Expand Up @@ -112,9 +99,10 @@ Examples/Stereo/stereo_euroc.cc)
target_link_libraries(stereo_euroc ${PROJECT_NAME})

#stereo camera for mynteye
message("GLOG_LIBRARIES: ${GLOG_LIBRARIES}")
add_executable(stereo_mynt
Examples/Stereo/stereo_mynt.cc)
target_link_libraries(stereo_mynt ${PROJECT_NAME} glog::glog ${MYNT_SDK2_LIB_DIR}/libmynteye.so.2)
target_link_libraries(stereo_mynt ${PROJECT_NAME} ${GLOG_LIBRARIES} mynteye)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/Monocular)

Expand Down
Binary file added Examples/Stereo/stereo_mynt
Binary file not shown.
12 changes: 9 additions & 3 deletions Examples/Stereo/stereo_mynt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@

MYNTEYE_USE_NAMESPACE

bool flag = true;
void exit_while(int sig)
{
flag = false;
}

class ImageGrabber
{
public:
Expand Down Expand Up @@ -151,18 +157,18 @@ int main(int argc, char** argv)

device->SetStreamCallback(
Stream::LEFT, [](const device::StreamData &data) {
CHECK_NOTNULL(data.img);
//CHECK_NOTNULL(data.img);
});
device->SetStreamCallback(
Stream::RIGHT, [](const device::StreamData &data) {
CHECK_NOTNULL(data.img);
//CHECK_NOTNULL(data.img);
});

// Enable this will cache the motion datas until you get them.
device->EnableMotionDatas();
device->Start(Source::ALL);

while (true)
while (flag)
{
device->WaitForStreams();

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

## If you wanna run ORB_SLAM2 with mynteye camera, please follow the steps:
1. Download [MYNT-EYE-SDK-2][] and follow steps to install.
2. Add **MYNT-EYE-SDK** path to the environment variable. Open .bashrc file and add at the end the following path. `export MYNTEYE_SDK2_ROOT=MYNT-EYE-SDK-2_INSTALL_PATH`
3. Follow the normal procedure to install ORB_SLAM2.
4. Update distortion_parameters and projection_parameters to `<ORB_SLAM2>/config/mynteye_*.yaml`
5. run examples by mynteye camera.
2. Follow the normal procedure to install ORB_SLAM2.
3. Update distortion_parameters and projection_parameters to `<ORB_SLAM2>/config/mynteye_*.yaml`
4. run examples by mynteye camera.

## Stereo Examples
* Calibrate a stereo camera with [ROS-StereoCalibration][] or opencv, and then update parameters to `<ORB_SLAM2>/config/mynteye_stereo.yaml`.
Expand Down
Loading

0 comments on commit 66ef80d

Please sign in to comment.