diff --git a/CMakeLists.txt b/CMakeLists.txt index 2056b4b..ad6c304 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,39 +117,11 @@ endif() ## libmynteye -<<<<<<< HEAD -if(NOT WITH_GLOG) -======= if(NOT WITH_GLOG AND NOT OS_WIN) ->>>>>>> origin/develop set(__MINIGLOG_FLAGS "-Wno-unused-parameter -Wno-format -Wno-return-type") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${__MINIGLOG_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${__MINIGLOG_FLAGS}") unset(__MINIGLOG_FLAGS) -<<<<<<< HEAD -endif() - -set(MYNTEYE_PUBLIC_H - ${CMAKE_CURRENT_SOURCE_DIR}/include/mynteye/callbacks.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/mynteye/global.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/mynteye/logger.h - ${CMAKE_CURRENT_BINARY_DIR}/include/mynteye/mynteye.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/mynteye/types.h - ${CMAKE_CURRENT_SOURCE_DIR}/include/mynteye/utils.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/device/context.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/device/device.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/internal/files.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/internal/strings.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/internal/times.h -) -if(WITH_API) - list(APPEND MYNTEYE_PUBLIC_H - ${CMAKE_CURRENT_SOURCE_DIR}/src/api/api.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/api/plugin.h - ${CMAKE_CURRENT_SOURCE_DIR}/src/api/processor/object.h - ) -======= ->>>>>>> origin/develop endif() if(NOT WITH_GLOG) list(APPEND MYNTEYE_PUBLIC_H @@ -201,11 +173,7 @@ if(WITH_API) ) endif() if(NOT WITH_GLOG) -<<<<<<< HEAD - list(APPEND MYNTEYE_SRCS src/public/miniglog.cc) -======= list(APPEND MYNTEYE_SRCS src/mynteye/miniglog.cc) ->>>>>>> origin/develop endif() set(MYNTEYE_LINKLIBS ${UVC_LIB}) @@ -222,11 +190,7 @@ endif() add_library(${MYNTEYE_NAME} SHARED ${MYNTEYE_SRCS}) target_link_libraries(${MYNTEYE_NAME} ${MYNTEYE_LINKLIBS}) -<<<<<<< HEAD -option(WITH_GLOG "Include glog support" OFF) -======= target_link_threads(${MYNTEYE_NAME}) ->>>>>>> origin/develop if(OS_WIN) target_compile_definitions(${MYNTEYE_NAME} diff --git a/Makefile b/Makefile index 640dd2d..9ce54af 100644 --- a/Makefile +++ b/Makefile @@ -73,10 +73,7 @@ cleandoc: submodules: @git submodule update --init -<<<<<<< HEAD -======= ->>>>>>> origin/develop .PHONY: submodules # init diff --git a/include/mynteye/types.h b/include/mynteye/types.h index b34a8a7..201a497 100644 --- a/include/mynteye/types.h +++ b/include/mynteye/types.h @@ -198,7 +198,6 @@ enum class Option : std::uint8_t { /** Erase chip */ ERASE_CHIP, /** -<<<<<<< HEAD * min exposure time, valid if auto-exposure * * range: [0,1000], default: 0 @@ -208,17 +207,11 @@ enum class Option : std::uint8_t { * The range of accelerometer * * values: {6,12,24,48}, default: 6 -======= - * The range of accelerometer - * - * values: {4,8,16,32}, default: 8 ->>>>>>> origin/develop */ ACCELEROMETER_RANGE, /** * The range of gyroscope * -<<<<<<< HEAD * values: {250,500,1000,2000,4000}, default: 1000 */ GYROSCOPE_RANGE, @@ -234,11 +227,6 @@ enum class Option : std::uint8_t { * values: {23,64}, default: 64 */ GYROSCOPE_LOW_PASS_FILTER, -======= - * values: {500,1000,2000,4000}, default: 1000 - */ - GYROSCOPE_RANGE, ->>>>>>> origin/develop /** Last guard */ LAST }; diff --git a/samples/device/camera.cc b/samples/device/camera.cc index d16fda0..0737ced 100644 --- a/samples/device/camera.cc +++ b/samples/device/camera.cc @@ -15,17 +15,9 @@ #include #include "mynteye/logger.h" -<<<<<<< HEAD - -#include "mynteye/device.h" -#include "mynteye/utils.h" - -#include "mynteye/times.h" -======= #include "mynteye/device/device.h" #include "mynteye/device/utils.h" #include "mynteye/util/times.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/control/auto_exposure.cc b/samples/tutorials/control/auto_exposure.cc index 50cef7e..0a18547 100644 --- a/samples/tutorials/control/auto_exposure.cc +++ b/samples/tutorials/control/auto_exposure.cc @@ -13,13 +13,8 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop #include "util/cv_painter.h" diff --git a/samples/tutorials/control/framerate.cc b/samples/tutorials/control/framerate.cc index 1149f0a..3236bf0 100644 --- a/samples/tutorials/control/framerate.cc +++ b/samples/tutorials/control/framerate.cc @@ -11,15 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include - -#include - -#include "mynteye/api.h" -#include "mynteye/logger.h" -#include "mynteye/times.h" -======= #include #include @@ -27,7 +18,6 @@ #include "mynteye/logger.h" #include "mynteye/api/api.h" #include "mynteye/util/times.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/control/infrared.cc b/samples/tutorials/control/infrared.cc index 6910aee..a6310a7 100644 --- a/samples/tutorials/control/infrared.cc +++ b/samples/tutorials/control/infrared.cc @@ -13,13 +13,8 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/control/manual_exposure.cc b/samples/tutorials/control/manual_exposure.cc index 6c354e2..16ce32e 100644 --- a/samples/tutorials/control/manual_exposure.cc +++ b/samples/tutorials/control/manual_exposure.cc @@ -13,13 +13,8 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop #include "util/cv_painter.h" diff --git a/samples/tutorials/data/get_depth.cc b/samples/tutorials/data/get_depth.cc index 9275cf2..e973967 100644 --- a/samples/tutorials/data/get_depth.cc +++ b/samples/tutorials/data/get_depth.cc @@ -13,12 +13,7 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_device_info.cc b/samples/tutorials/data/get_device_info.cc index 62f7c53..5217c36 100644 --- a/samples/tutorials/data/get_device_info.cc +++ b/samples/tutorials/data/get_device_info.cc @@ -11,13 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_disparity.cc b/samples/tutorials/data/get_disparity.cc index 1f77329..243d81e 100644 --- a/samples/tutorials/data/get_disparity.cc +++ b/samples/tutorials/data/get_disparity.cc @@ -13,13 +13,7 @@ // limitations under the License. #include -<<<<<<< HEAD - -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_from_callbacks.cc b/samples/tutorials/data/get_from_callbacks.cc index a422502..27c30a4 100644 --- a/samples/tutorials/data/get_from_callbacks.cc +++ b/samples/tutorials/data/get_from_callbacks.cc @@ -11,25 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include - -======= ->>>>>>> origin/develop #include #include #include #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop #include "util/cv_painter.h" diff --git a/samples/tutorials/data/get_img_params.cc b/samples/tutorials/data/get_img_params.cc index d2faddb..f84642e 100644 --- a/samples/tutorials/data/get_img_params.cc +++ b/samples/tutorials/data/get_img_params.cc @@ -11,13 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_imu.cc b/samples/tutorials/data/get_imu.cc index 4c017e3..a449f6e 100644 --- a/samples/tutorials/data/get_imu.cc +++ b/samples/tutorials/data/get_imu.cc @@ -13,13 +13,8 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop #include "util/cv_painter.h" diff --git a/samples/tutorials/data/get_imu_params.cc b/samples/tutorials/data/get_imu_params.cc index db66183..7757611 100644 --- a/samples/tutorials/data/get_imu_params.cc +++ b/samples/tutorials/data/get_imu_params.cc @@ -11,13 +11,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_points.cc b/samples/tutorials/data/get_points.cc index 28d1f67..28294f5 100644 --- a/samples/tutorials/data/get_points.cc +++ b/samples/tutorials/data/get_points.cc @@ -13,12 +13,7 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/api/api.h" ->>>>>>> origin/develop #include "util/pc_viewer.h" diff --git a/samples/tutorials/data/get_stereo.cc b/samples/tutorials/data/get_stereo.cc index 0545f9b..391c53e 100644 --- a/samples/tutorials/data/get_stereo.cc +++ b/samples/tutorials/data/get_stereo.cc @@ -13,12 +13,7 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_stereo_rectified.cc b/samples/tutorials/data/get_stereo_rectified.cc index 3e7f441..10c0bf5 100644 --- a/samples/tutorials/data/get_stereo_rectified.cc +++ b/samples/tutorials/data/get_stereo_rectified.cc @@ -13,12 +13,7 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/data/get_with_plugin.cc b/samples/tutorials/data/get_with_plugin.cc index 8632d46..e8a0e05 100644 --- a/samples/tutorials/data/get_with_plugin.cc +++ b/samples/tutorials/data/get_with_plugin.cc @@ -13,12 +13,7 @@ // limitations under the License. #include -<<<<<<< HEAD -#include "mynteye/api.h" -#include "mynteye/logger.h" -======= #include "mynteye/api/api.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/intermediate/get_all_device_info.cc b/samples/tutorials/intermediate/get_all_device_info.cc index 9e430af..1c335f7 100644 --- a/samples/tutorials/intermediate/get_all_device_info.cc +++ b/samples/tutorials/intermediate/get_all_device_info.cc @@ -11,15 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -<<<<<<< HEAD -#include "mynteye/context.h" -#include "mynteye/device.h" -#include "mynteye/logger.h" -======= #include "mynteye/logger.h" #include "mynteye/device/context.h" #include "mynteye/device/device.h" ->>>>>>> origin/develop MYNTEYE_USE_NAMESPACE diff --git a/samples/tutorials/intermediate/get_depth_and_points.cc b/samples/tutorials/intermediate/get_depth_and_points.cc index 9430888..5761c62 100644 --- a/samples/tutorials/intermediate/get_depth_and_points.cc +++ b/samples/tutorials/intermediate/get_depth_and_points.cc @@ -14,13 +14,8 @@ #include #include -<<<<<<< HEAD - -#include "mynteye/api.h" -======= // #include "mynteye/logger.h" #include "mynteye/api/api.h" ->>>>>>> origin/develop #include "util/cv_painter.h" #include "util/pc_viewer.h" diff --git a/samples/tutorials/util/cv_painter.cc b/samples/tutorials/util/cv_painter.cc index 344ff5c..cc9fefe 100644 --- a/samples/tutorials/util/cv_painter.cc +++ b/samples/tutorials/util/cv_painter.cc @@ -13,25 +13,15 @@ // limitations under the License. #include "util/cv_painter.h" -<<<<<<< HEAD -#include - -======= ->>>>>>> origin/develop #include #include #include #include -<<<<<<< HEAD -#include "mynteye/logger.h" -#include "mynteye/utils.h" -======= #include #include "mynteye/logger.h" #include "mynteye/device/utils.h" ->>>>>>> origin/develop #define FONT_FACE cv::FONT_HERSHEY_PLAIN #define FONT_SCALE 1 diff --git a/samples/uvc/camera.cc b/samples/uvc/camera.cc index 2746c90..00d7b16 100644 --- a/samples/uvc/camera.cc +++ b/samples/uvc/camera.cc @@ -17,12 +17,9 @@ #include #include -<<<<<<< HEAD -======= #include #include ->>>>>>> origin/develop #include "mynteye/logger.h" #include "mynteye/mynteye.h" #include "mynteye/types.h" diff --git a/src/mynteye/api/api.cc b/src/mynteye/api/api.cc index e326e65..b839500 100644 --- a/src/mynteye/api/api.cc +++ b/src/mynteye/api/api.cc @@ -88,15 +88,8 @@ bool dir_exists(const std::string &p) { #endif std::vector get_plugin_paths() { -<<<<<<< HEAD:src/api/api.cc - std::string info_path(MYNTEYE_SDK_INSTALL_DIR); - info_path.append( - MYNTEYE_OS_SEP "share" MYNTEYE_OS_SEP "mynteye" MYNTEYE_OS_SEP - "build.info"); -======= std::string info_path = utils::get_sdk_install_dir(); info_path.append(MYNTEYE_OS_SEP "share" MYNTEYE_OS_SEP "mynteye" MYNTEYE_OS_SEP "build.info"); ->>>>>>> origin/develop:src/mynteye/api/api.cc cv::FileStorage fs(info_path, cv::FileStorage::READ); if (!fs.isOpened()) { @@ -217,30 +210,7 @@ std::vector get_plugin_paths() { API::API(std::shared_ptr device) : device_(device) { VLOG(2) << __func__; -<<<<<<< HEAD:src/api/api.cc std::dynamic_pointer_cast(device_); -======= - if (std::dynamic_pointer_cast(device_) != nullptr) { - bool in_l_ok, in_r_ok, ex_r2l_ok; - device_->GetIntrinsics(Stream::LEFT, &in_l_ok); - device_->GetIntrinsics(Stream::RIGHT, &in_r_ok); - device_->GetExtrinsics(Stream::RIGHT, Stream::LEFT, &ex_r2l_ok); - if (!in_l_ok || !in_r_ok || !ex_r2l_ok) { -#if defined(WITH_DEVICE_INFO_REQUIRED) - LOG(FATAL) -#else - LOG(WARNING) -#endif - << "Image params not found, but we need it to process the " - "images. Please `make tools` and use `img_params_writer` " - "to write the image params. If you update the SDK from " - "1.x, the `SN*.conf` is the file contains them. Besides, " - "you could also calibrate them by yourself. Read the guide " - "doc (https://github.com/slightech/MYNT-EYE-S-SDK-Guide) " - "to learn more."; - } - } ->>>>>>> origin/develop:src/mynteye/api/api.cc synthetic_.reset(new Synthetic(this)); } diff --git a/src/mynteye/device/device.cc b/src/mynteye/device/device.cc index ea8937a..5c3c9dd 100644 --- a/src/mynteye/device/device.cc +++ b/src/mynteye/device/device.cc @@ -558,11 +558,6 @@ void Device::ReadAllInfos() { CHECK_NOTNULL(channels_); Channels::imu_params_t imu_params; -<<<<<<< HEAD:src/device/device.cc - if (!channels_->GetFiles(device_info_.get(), &img_params_, &imu_params)) { - LOG(FATAL) << "Read device infos failed. Please upgrade your firmware to " - "the latest version."; -======= if (!channels_->GetFiles(device_info_.get(), &img_params, &imu_params)) { #if defined(WITH_DEVICE_INFO_REQUIRED) LOG(FATAL) @@ -571,7 +566,6 @@ void Device::ReadAllInfos() { #endif << "Read device infos failed. Please upgrade your firmware to the " "latest version."; ->>>>>>> origin/develop:src/mynteye/device/device.cc } VLOG(2) << "Device info: {name: " << device_info_->name << ", serial_number: " << device_info_->serial_number @@ -585,21 +579,10 @@ void Device::ReadAllInfos() { << ", nominal_baseline: " << device_info_->nominal_baseline << "}"; device_info_->name = uvc::get_name(*device_); -<<<<<<< HEAD:src/device/device.cc if (img_params_.ok) { SetExtrinsics(Stream::LEFT, Stream::RIGHT, img_params_.ex_right_to_left); VLOG(2) << "Extrinsics left to right: {" << GetExtrinsics(Stream::LEFT, Stream::RIGHT) << "}"; -======= - if (img_params.ok) { - SetIntrinsics(Stream::LEFT, img_params.in_left); - SetIntrinsics(Stream::RIGHT, img_params.in_right); - SetExtrinsics(Stream::RIGHT, Stream::LEFT, img_params.ex_right_to_left); - VLOG(2) << "Intrinsics left: {" << GetIntrinsics(Stream::LEFT) << "}"; - VLOG(2) << "Intrinsics right: {" << GetIntrinsics(Stream::RIGHT) << "}"; - VLOG(2) << "Extrinsics right to left: {" - << GetExtrinsics(Stream::RIGHT, Stream::LEFT) << "}"; ->>>>>>> origin/develop:src/mynteye/device/device.cc } else { LOG(WARNING) << "Intrinsics & extrinsics not exist"; } diff --git a/src/mynteye/uvc/linux/uvc-v4l2.cc b/src/mynteye/uvc/linux/uvc-v4l2.cc index 0fb1ba7..01aba0a 100755 --- a/src/mynteye/uvc/linux/uvc-v4l2.cc +++ b/src/mynteye/uvc/linux/uvc-v4l2.cc @@ -409,16 +409,12 @@ struct device { } if (no_data_count > NO_DATA_MAX_COUNT) { -<<<<<<< HEAD:src/uvc/uvc-v4l2.cc no_data_count = 0; living_count = 0; LOG(WARNING) << __func__ << " failed: v4l2 get stream time out,Try to reboot!"; stop_capture(); start_capture(); -======= - throw_error("v4l2 get stream time out!"); ->>>>>>> origin/develop:src/mynteye/uvc/linux/uvc-v4l2.cc } } diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt b/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt index 4f508b6..cc73eec 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/CMakeLists.txt @@ -79,10 +79,7 @@ catkin_package( #get_filename_component(SDK_DIR "${PROJECT_SOURCE_DIR}/../../../.." ABSOLUTE) #LIST(APPEND CMAKE_PREFIX_PATH ${SDK_DIR}/_install/lib/cmake) -<<<<<<< HEAD -======= LIST(APPEND CMAKE_MODULE_PATH cmake) ->>>>>>> origin/develop find_package(mynteye REQUIRED) message(STATUS "Found mynteye: ${mynteye_VERSION}") @@ -91,12 +88,6 @@ if(NOT mynteye_WITH_API) message(FATAL_ERROR "Must with API layer :(") endif() -<<<<<<< HEAD -include(${SDK_DIR}/cmake/DetectOpenCV.cmake) - -if(mynteye_WITH_GLOG) - include(${SDK_DIR}/cmake/DetectGLog.cmake) -======= include(cmake/DetectOpenCV.cmake) if(mynteye_WITH_GLOG) @@ -104,7 +95,6 @@ if(mynteye_WITH_GLOG) if(glog_FOUND) add_definitions(-DWITH_GLOG) endif() ->>>>>>> origin/develop endif() # targets