Merge branch 'hotfix/2.2.4' into develop
# Conflicts: # CMakeLists.txt # wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc
This commit is contained in:
commit
96bc0353ff
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
|
||||||
project(mynteye VERSION 2.2.3 LANGUAGES C CXX)
|
project(mynteye VERSION 2.2.4 LANGUAGES C CXX)
|
||||||
|
|
||||||
include(cmake/Common.cmake)
|
include(cmake/Common.cmake)
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ elseif(OS_MAC)
|
||||||
SET(OSX_EXTRA_LIBS ${VVUVCKIT_LIBRARY} ${USB_LIBRARY})
|
SET(OSX_EXTRA_LIBS ${VVUVCKIT_LIBRARY} ${USB_LIBRARY})
|
||||||
|
|
||||||
set(UVC_SRC src/mynteye/uvc/macosx/CameraEngine.cpp src/mynteye/uvc/macosx/AVfoundationCamera.mm src/mynteye/uvc/macosx/uvc-vvuvckit.cc )
|
set(UVC_SRC src/mynteye/uvc/macosx/CameraEngine.cpp src/mynteye/uvc/macosx/AVfoundationCamera.mm src/mynteye/uvc/macosx/uvc-vvuvckit.cc )
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework CoreFoundation -framework AVFoundation -framework IOKit -framework AppKit -framework Cocoa -framework CoreMedia -framework CoreData -framework Foundation -framework CoreVideo ${__MACUVCLOG_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework CoreFoundation -framework AVFoundation -framework IOKit -framework AppKit -framework Cocoa -framework CoreMedia -framework CoreData -framework Foundation -framework CoreVideo ${__MACUVCLOG_FLAGS}")
|
||||||
elseif(OS_LINUX)
|
elseif(OS_LINUX)
|
||||||
set(UVC_SRC src/mynteye/uvc/linux/uvc-v4l2.cc)
|
set(UVC_SRC src/mynteye/uvc/linux/uvc-v4l2.cc)
|
||||||
else()
|
else()
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,6 +1,6 @@
|
||||||
# MYNT® EYE S SDK
|
# MYNT® EYE S SDK
|
||||||
|
|
||||||
[![](https://img.shields.io/badge/MYNT%20EYE%20S%20SDK-2.2.3-brightgreen.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK)
|
[![](https://img.shields.io/badge/MYNT%20EYE%20S%20SDK-2.2.4-brightgreen.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@ Please follow the guide doc to install the SDK on different platforms.
|
||||||
## Documentations
|
## Documentations
|
||||||
|
|
||||||
* [API Doc](https://github.com/slightech/MYNT-EYE-S-SDK/releases): API reference, some guides and data spec.
|
* [API Doc](https://github.com/slightech/MYNT-EYE-S-SDK/releases): API reference, some guides and data spec.
|
||||||
* en: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2708507/mynt-eye-s-sdk-apidoc-2.2.3-en.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2708508/mynt-eye-s-sdk-apidoc-2.2.3-en.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](http://doc.myntai.com/resource/api/mynt-eye-s-sdk-apidoc-2.2.3-en/mynt-eye-s-sdk-apidoc-2.2.3-en/index.html)
|
* en: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2717670/mynt-eye-s-sdk-apidoc-2.2.4-en.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2717671/mynt-eye-s-sdk-apidoc-2.2.4-en.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](https://slightech.github.io/MYNT-EYE-S-SDK/)
|
||||||
* zh-Hans: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2708509/mynt-eye-s-sdk-apidoc-2.2.3-zh-Hans.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2708510/mynt-eye-s-sdk-apidoc-2.2.3-zh-Hans.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](http://doc.myntai.com/resource/api/mynt-eye-s-sdk-apidoc-2.2.3-zh-Hans/mynt-eye-s-sdk-apidoc-2.2.3-zh-Hans/index.html)
|
* zh-Hans: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2717672/mynt-eye-s-sdk-apidoc-2.2.4-zh-Hans.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK/files/2717673/mynt-eye-s-sdk-apidoc-2.2.4-zh-Hans.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](http://doc.myntai.com/resource/api/mynt-eye-s-sdk-apidoc-2.2.4-zh-Hans/mynt-eye-s-sdk-apidoc-2.2.4-zh-Hans/index.html)
|
||||||
* [Guide Doc](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/releases): How to install and start using the SDK.
|
* [Guide Doc](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/releases): How to install and start using the SDK.
|
||||||
* en: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2708524/mynt-eye-s-sdk-guide-2.2.3-en.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2708525/mynt-eye-s-sdk-guide-2.2.3-en.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](https://slightech.github.io/MYNT-EYE-S-SDK-Guide/)
|
* en: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2717663/mynt-eye-s-sdk-guide-2.2.4-en.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2717664/mynt-eye-s-sdk-guide-2.2.4-en.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](https://slightech.github.io/MYNT-EYE-S-SDK-Guide/)
|
||||||
* zh-Hans: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2708528/mynt-eye-s-sdk-guide-2.2.3-zh-Hans.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2708529/mynt-eye-s-sdk-guide-2.2.3-zh-Hans.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](http://doc.myntai.com/resource/sdk/mynt-eye-s-sdk-guide-2.2.3-zh-Hans/mynt-eye-s-sdk-guide-2.2.3-zh-Hans/index.html)
|
* zh-Hans: [![](https://img.shields.io/badge/Download-PDF-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2717665/mynt-eye-s-sdk-guide-2.2.4-zh-Hans.pdf) [![](https://img.shields.io/badge/Download-HTML-blue.svg?style=flat)](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2717666/mynt-eye-s-sdk-guide-2.2.4-zh-Hans.zip) [![](https://img.shields.io/badge/Online-HTML-blue.svg?style=flat)](http://doc.myntai.com/resource/sdk/mynt-eye-s-sdk-guide-2.2.4-zh-Hans/mynt-eye-s-sdk-guide-2.2.4-zh-Hans/index.html)
|
||||||
|
|
||||||
> Supported languages: `en`, `zh-Hans`.
|
> Supported languages: `en`, `zh-Hans`.
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ PROJECT_NAME = "MYNT EYE S SDK"
|
||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.2.3
|
PROJECT_NUMBER = 2.2.4
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
|
|
@ -38,7 +38,7 @@ PROJECT_NAME = "MYNT EYE S SDK"
|
||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 2.2.3
|
PROJECT_NUMBER = 2.2.4
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
|
|
@ -50,7 +50,9 @@ inline double compute_time(const double end, const double start) {
|
||||||
|
|
||||||
class ROSWrapperNodelet : public nodelet::Nodelet {
|
class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
public:
|
public:
|
||||||
ROSWrapperNodelet() {}
|
ROSWrapperNodelet() {
|
||||||
|
pthread_mutex_init(&mutex_data, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
~ROSWrapperNodelet() {
|
~ROSWrapperNodelet() {
|
||||||
// std::cout << __func__ << std::endl;
|
// std::cout << __func__ << std::endl;
|
||||||
|
@ -474,7 +476,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
mono_publishers_[Stream::LEFT].getNumSubscribers() > 0) &&
|
mono_publishers_[Stream::LEFT].getNumSubscribers() > 0) &&
|
||||||
!is_published_[Stream::LEFT]) {
|
!is_published_[Stream::LEFT]) {
|
||||||
api_->SetStreamCallback(
|
api_->SetStreamCallback(
|
||||||
Stream::LEFT, [this](const api::StreamData &data) {
|
Stream::LEFT, [&](const api::StreamData &data) {
|
||||||
++left_count_;
|
++left_count_;
|
||||||
if (left_count_ > 10) {
|
if (left_count_ > 10) {
|
||||||
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
||||||
|
@ -491,7 +493,9 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
// : (data.img->timestamp - img_time_prev) * 0.01f) << "
|
// : (data.img->timestamp - img_time_prev) * 0.01f) << "
|
||||||
// ms");
|
// ms");
|
||||||
// img_time_prev = data.img->timestamp;
|
// img_time_prev = data.img->timestamp;
|
||||||
|
pthread_mutex_lock(&mutex_data);
|
||||||
publishCamera(Stream::LEFT, data, left_count_, stamp);
|
publishCamera(Stream::LEFT, data, left_count_, stamp);
|
||||||
|
pthread_mutex_unlock(&mutex_data);
|
||||||
publishMono(Stream::LEFT, data, left_count_, stamp);
|
publishMono(Stream::LEFT, data, left_count_, stamp);
|
||||||
NODELET_DEBUG_STREAM(
|
NODELET_DEBUG_STREAM(
|
||||||
Stream::LEFT << ", count: " << left_count_
|
Stream::LEFT << ", count: " << left_count_
|
||||||
|
@ -509,13 +513,15 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
mono_publishers_[Stream::RIGHT].getNumSubscribers() > 0) &&
|
mono_publishers_[Stream::RIGHT].getNumSubscribers() > 0) &&
|
||||||
!is_published_[Stream::RIGHT]) {
|
!is_published_[Stream::RIGHT]) {
|
||||||
api_->SetStreamCallback(
|
api_->SetStreamCallback(
|
||||||
Stream::RIGHT, [this](const api::StreamData &data) {
|
Stream::RIGHT, [&](const api::StreamData &data) {
|
||||||
++right_count_;
|
++right_count_;
|
||||||
if (right_count_ > 10) {
|
if (right_count_ > 10) {
|
||||||
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
||||||
ros::Time stamp = checkUpTimeStamp(
|
ros::Time stamp = checkUpTimeStamp(
|
||||||
data.img->timestamp, Stream::RIGHT);
|
data.img->timestamp, Stream::RIGHT);
|
||||||
|
pthread_mutex_lock(&mutex_data);
|
||||||
publishCamera(Stream::RIGHT, data, right_count_, stamp);
|
publishCamera(Stream::RIGHT, data, right_count_, stamp);
|
||||||
|
pthread_mutex_unlock(&mutex_data);
|
||||||
publishMono(Stream::RIGHT, data, right_count_, stamp);
|
publishMono(Stream::RIGHT, data, right_count_, stamp);
|
||||||
NODELET_DEBUG_STREAM(
|
NODELET_DEBUG_STREAM(
|
||||||
Stream::RIGHT
|
Stream::RIGHT
|
||||||
|
@ -1159,6 +1165,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
ros::NodeHandle nh_;
|
ros::NodeHandle nh_;
|
||||||
ros::NodeHandle private_nh_;
|
ros::NodeHandle private_nh_;
|
||||||
|
|
||||||
|
pthread_mutex_t mutex_data;
|
||||||
|
|
||||||
Model model_;
|
Model model_;
|
||||||
std::map<Option, std::string> option_names_;
|
std::map<Option, std::string> option_names_;
|
||||||
// camera:
|
// camera:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user