Merge branch 'develop' of http://gitlab.mynt.com/mynteye/mynt-eye-sdk-2 into develop
This commit is contained in:
commit
6953758101
6
Makefile
6
Makefile
@ -130,7 +130,7 @@ endif
|
||||
|
||||
# install
|
||||
|
||||
install: build
|
||||
install: uninstall build
|
||||
@$(call echo,Make $@)
|
||||
ifeq ($(HOST_OS),Win)
|
||||
ifneq ($(HOST_NAME),MinGW)
|
||||
@ -176,8 +176,8 @@ ifeq ($(HOST_OS),Mac)
|
||||
else
|
||||
@$(call cmake_build,./tools/_build)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: tools
|
||||
|
||||
|
10
README.md
10
README.md
@ -1,6 +1,6 @@
|
||||
# MYNT® EYE S SDK
|
||||
|
||||
[](https://github.com/slightech/MYNT-EYE-S-SDK)
|
||||
[](https://github.com/slightech/MYNT-EYE-S-SDK)
|
||||
|
||||
## Overview
|
||||
|
||||
@ -17,11 +17,11 @@ Please follow the guide doc to install the SDK on different platforms.
|
||||
## Documentations
|
||||
|
||||
* [API Doc](https://github.com/slightech/MYNT-EYE-S-SDK/releases): API reference, some guides and data spec.
|
||||
* en: [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2764152/mynt-eye-s-sdk-apidoc-2.3.0-en.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2764156/mynt-eye-s-sdk-apidoc-2.3.0-en.zip) [](https://slightech.github.io/MYNT-EYE-S-SDK/)
|
||||
* zh-Hans: [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2764160/mynt-eye-s-sdk-apidoc-2.3.0-zh-Hans.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2764173/mynt-eye-s-sdk-apidoc-2.3.0-en.zip) [](http://doc.myntai.com/resource/api/mynt-eye-s-sdk-apidoc-2.3.0-zh-Hans/mynt-eye-s-sdk-apidoc-2.3.0-zh-Hans/index.html)
|
||||
* en: [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2893965/mynt-eye-s-sdk-apidoc-2.3.1-en.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2893979/mynt-eye-s-sdk-apidoc-2.3.1-en.zip) [](https://slightech.github.io/MYNT-EYE-S-SDK/)
|
||||
* zh-Hans: [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2893985/mynt-eye-s-sdk-apidoc-2.3.1-zh-Hans.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK/files/2893986/mynt-eye-s-sdk-apidoc-2.3.1-zh-Hans.zip) [](http://doc.myntai.com/resource/api/mynt-eye-s-sdk-apidoc-2.3.1-zh-Hans/mynt-eye-s-sdk-apidoc-2.3.1-zh-Hans/index.html)
|
||||
* [Guide Doc](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/releases): How to install and start using the SDK.
|
||||
* en: [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2764143/mynt-eye-s-sdk-guide-2.3.0-en.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2764145/mynt-eye-s-sdk-guide-2.3.0-en.zip) [](https://slightech.github.io/MYNT-EYE-S-SDK-Guide/)
|
||||
* zh-Hans: [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2764150/mynt-eye-s-sdk-guide-2.3.0-zh-Hans.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2764163/mynt-eye-s-sdk-guide-2.3.0-zh-Hans.zip) [](http://doc.myntai.com/resource/sdk/mynt-eye-s-sdk-guide-2.3.0-zh-Hans/mynt-eye-s-sdk-guide-2.3.0-zh-Hans/index.html)
|
||||
* en: [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2893975/mynt-eye-s-sdk-guide-2.3.1-en.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2893996/mynt-eye-s-sdk-guide-2.3.1-en.zip) [](https://slightech.github.io/MYNT-EYE-S-SDK-Guide/)
|
||||
* zh-Hans: [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2893997/mynt-eye-s-sdk-guide-2.3.1-zh-Hans.pdf) [](https://github.com/slightech/MYNT-EYE-S-SDK-Guide/files/2893997/mynt-eye-s-sdk-guide-2.3.1-zh-Hans.pdf) [](http://doc.myntai.com/resource/sdk/mynt-eye-s-sdk-guide-2.3.1-zh-Hans/mynt-eye-s-sdk-guide-2.3.1-zh-Hans/index.html)
|
||||
|
||||
> 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
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.3.0
|
||||
PROJECT_NUMBER = 2.3.1
|
||||
|
||||
# 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
|
||||
|
@ -38,7 +38,7 @@ PROJECT_NAME = "MYNT EYE S SDK"
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 2.3.0
|
||||
PROJECT_NUMBER = 2.3.1
|
||||
|
||||
# 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
|
||||
|
@ -171,9 +171,13 @@ void Correspondence::NotifyStreamDataReady() {
|
||||
|
||||
bool Correspondence::IsStreamDataReady() {
|
||||
if (stream_datas_.empty()) return false;
|
||||
if (stream_match_enabled_) {
|
||||
if (stream_datas_match_.empty()) return false;
|
||||
}
|
||||
if (motion_datas_.empty()) return false;
|
||||
|
||||
std::uint64_t img_stamp = 0;
|
||||
std::uint64_t img_macth_stamp = 0;
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> _(mtx_stream_datas_);
|
||||
auto data = stream_datas_.front();
|
||||
@ -181,6 +185,10 @@ bool Correspondence::IsStreamDataReady() {
|
||||
LOG(FATAL) << "stream data image info is empty!";
|
||||
}
|
||||
img_stamp = data.img->timestamp;
|
||||
|
||||
if (stream_match_enabled_) {
|
||||
img_macth_stamp = stream_datas_match_.front().img->timestamp;
|
||||
}
|
||||
}
|
||||
std::uint64_t imu_stamp = 0;
|
||||
{
|
||||
@ -192,7 +200,12 @@ bool Correspondence::IsStreamDataReady() {
|
||||
imu_stamp = data.imu->timestamp;
|
||||
}
|
||||
|
||||
return img_stamp + stream_interval_us_half_ < imu_stamp;
|
||||
if (stream_match_enabled_) {
|
||||
return img_stamp + stream_interval_us_half_ < imu_stamp
|
||||
&& img_macth_stamp + stream_interval_us_half_ < imu_stamp;
|
||||
} else {
|
||||
return img_stamp + stream_interval_us_half_ < imu_stamp;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<api::StreamData> Correspondence::GetReadyStreamData(bool matched) {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#define MYNTEYE_API_CONFIG_H_
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
@ -57,7 +58,7 @@ class Correspondence {
|
||||
std::shared_ptr<Device> device_;
|
||||
Stream stream_;
|
||||
Stream stream_match_;
|
||||
bool stream_match_enabled_;
|
||||
std::atomic_bool stream_match_enabled_;
|
||||
|
||||
float stream_interval_us_;
|
||||
float stream_interval_us_half_;
|
||||
|
@ -315,7 +315,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||
for (auto &&it = mono_topics.begin(); it != mono_topics.end(); ++it) {
|
||||
auto &&topic = mono_topics[it->first];
|
||||
if (it->first == Stream::LEFT || it->first == Stream::RIGHT) {
|
||||
mono_publishers_[it->first] = it_mynteye.advertiseCamera(topic, 1);
|
||||
mono_publishers_[it->first] = it_mynteye.advertise(topic, 1);
|
||||
}
|
||||
NODELET_INFO_STREAM("Advertized on topic " << topic);
|
||||
}
|
||||
@ -828,9 +828,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||
cv::cvtColor(data.frame, mono, CV_RGB2GRAY);
|
||||
auto &&msg = cv_bridge::CvImage(header, enc::MONO8, mono).toImageMsg();
|
||||
pthread_mutex_unlock(&mutex_data_);
|
||||
auto &&info = getCameraInfo(stream);
|
||||
info->header.stamp = msg->header.stamp;
|
||||
mono_publishers_[stream].publish(msg, info);
|
||||
mono_publishers_[stream].publish(msg);
|
||||
}
|
||||
|
||||
void publishPoints(
|
||||
@ -1517,7 +1515,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||
std::map<Stream, std::string> image_encodings_;
|
||||
|
||||
// mono: LEFT, RIGHT
|
||||
std::map<Stream, image_transport::CameraPublisher> mono_publishers_;
|
||||
std::map<Stream, image_transport::Publisher> mono_publishers_;
|
||||
|
||||
// pointcloud: POINTS
|
||||
ros::Publisher points_publisher_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user