Merge branch 'develop' into rmEigen

This commit is contained in:
TinyO 2019-09-12 10:23:12 +08:00
commit fed2654794
11 changed files with 437 additions and 52 deletions

7
.gitmodules vendored
View File

@ -1,7 +0,0 @@
[submodule "test/gtest"]
path = test/gtest
url = https://github.com/google/googletest.git
[submodule "tools/linter"]
path = tools/linter
url = https://github.com/slightech/linter.git
branch = slightech

327
docs/mynt-eye-s-sdk.tree Normal file
View File

@ -0,0 +1,327 @@
mynt-eye-s-sdk
├── 3rdparty
│   └── eigen3 matrix 3rd lib
├── cmake
│   ├── Common.cmake cmake common macro
│   ├── DetectCXX11.cmake
│   ├── DetectOpenCV.cmake
│   ├── FindCUDA
│   │   ├── make2cmake.cmake
│   │   ├── parse_cubin.cmake
│   │   └── run_nvcc.cmake
│   ├── FindCUDA.cmake
│   ├── IncludeGuard.cmake
│   ├── Option.cmake include(DetectOpenCV.cmake)
│   ├── TargetArch.cmake
│   ├── templates
│   └── Utils.cmake include(Common.cmake)
├── CMakeLists.txt
├── docs
│   ├── api
│   ├── conf.py sdkHtml config
│   ├── files
│   ├── images
│   │   ├── firmware
│   │   ├── product
│   │   ├── project
│   │   │   └── vs2017
│   │   ├── sdk
│   │   │   └── tools
│   │   └── tools
│   ├── Makefile sdkHtml Makefile
│   └── src
│   ├── firmware
│   ├── log
│   ├── product
│   ├── sdk
│   │   ├── control
│   │   ├── data
│   │   └── project
│   ├── slam
│   ├── support
│   └── wrapper
├── include
│   ├── deprecated
│   │   └── mynteye
│   │   ├── api.h x
│   │   ├── callbacks.h x
│   │   ├── context.h x
│   │   ├── device.h x
│   │   ├── files.h x
│   │   ├── glog_init.h x
│   │   ├── object.h x
│   │   ├── plugin.h x
│   │   ├── strings.h x
│   │   ├── times.h x
│   │   └── utils.h x
│   └── mynteye
│   ├── api
│   │   ├── api.h user api(mynteye.h types.h opencv2*)
│   │   ├── object.h img formats transform(mynteye.h opencv2*)
│   │   └── plugin.h plugin process in&out(mynteye.h opencv2*)
│   ├── device
│   │   ├── callbacks.h processor data callback(mynteye.h mynteye/types.h)
│   │   ├── context.h detect uvc device(mynteye.h)
│   │   ├── device.h imu-->motions & camera-->streams(mynteye.h callbacks.h device/types.h)
│   │   ├── types.h img & imu_data types(mynteye.h mynteye/types.h)
│   │   └── utils.h user help(mynteye.h mynteye/types.h)
│   ├── global.h os adapter
│   ├── logger.h message output
│   ├── miniglog.h google miniglog
│ ├── mynteye.h.in api version(global.h)
│   ├── types.h all types(mynteye.h)
│   └── util
│   ├── files.h (mynteye.h)
│   ├── strings.h (mynteye.h)
│   └── times.h (mynteye.h)
├── Makefile
├── samples
│   ├── camera_with_junior_device_api.cc (device.h utils.h times.h)
│   ├── camera_with_senior_api.cc (api.h times.h)
│   ├── CMakeLists.txt samples build
│   ├── config
│   │   ├── S1030
│   │   │   └── deprecated
│   │   └── S210A
│   │   └── deprecated
│   ├── ctrl_auto_exposure.cc (api.h)
│   ├── ctrl_framerate.cc (api.h times.h)
│   ├── ctrl_iic_address.cc (api.h)
│   ├── ctrl_imu_low_pass_filter.cc (api.h times.h)
│   ├── ctrl_imu_range.cc (api.h times.h)
│   ├── ctrl_infrared.cc
│   ├── ctrl_manual_exposure.cc
│   ├── ctrl_sync_timestamp.cc
│   ├── dataset.cc
│   ├── dataset.h
│   ├── device_writer.cc
│   ├── device_writer.h
│   ├── get_data_without_select.cc
│   ├── get_depth_and_points.cc
│   ├── get_depth.cc
│   ├── get_depth_with_region.cc
│   ├── get_device_info.cc
│   ├── get_disparity.cc
│   ├── get_from_callbacks.cc
│   ├── get_img_params.cc
│   ├── get_imu.cc
│   ├── get_imu_correspondence.cc
│   ├── get_imu_params.cc
│   ├── get_stereo_rectified.cc
│   ├── get_with_plugin.cc
│   ├── record.cc
│   ├── save_all_infos.cc
│   ├── save_single_image.cc
│   ├── simple_demo independent demo
│   │   ├── project_cmake
│   │   │   ├── CMakeLists.txt linux build
│   │   │   └── mynteye_demo.cc
│   │   └── project_vs2017 windows vs
│   │   ├── images
│   │   └── mynteyes_demo
│   │   └── mynteyes_demo
│   │   ├── stdafx.h
│   │   └── targetver.h
│   ├── util_cv.cc (util_cv.h device/utils.h)
│   ├── util_cv.h cv painter(mynteye/types.h)
│   ├── util_pcl.cc (util_pcl.h)
│   ├── util_pcl.h pcl cloud points viewer
│   ├── uvc_camera.cc
│   ├── write_device_info.cc
│   ├── write_img_params.cc
│   └── write_imu_params.cc
├── scripts
│   ├── common
│   └── win
│   ├── cmake
│   │   ├── mynteye-targets.cmake
│   │   └── mynteye-targets-release.cmake
│   └── nsis
│   └── Include
├── src
│   ├── main.cc
│   └── mynteye
│   ├── api
│   │   ├── api.cc (correspondence.h dl.h plugin.h ...)
│   │   ├── camera_models
│   │   │   ├── camera.cc (camera.h)
│   │   │   ├── camera.h camera base(eigen3* opencv2* mynteye.h)
│   │   │   ├── equidistant_camera.cc (equidistant_camera.h)
│   │   │   ├── equidistant_camera.h KB projection model(opencv2* camera.h)
│   │   │   ├── gpl.cc
│   │   │   └── gpl.h
│   │   ├── correspondence.cc (correspondence.h device.h)
│   │   ├── correspondence.h stream control(api.h callbacks.h)
│   │   ├── data_tools.cc (data_tools.h)
│   │   ├── data_tools.h api<--data<-->obj(object.h api.h device.h)
│   │   ├── dl.cc (dl.h)
│   │   ├── dl.h dynamic loading(mynteye.h)
│   │   ├── processor root-->rectify-->disparity(norm)-->depth-->points
│   │   │   ├── depth_processor.cc (depth_Processor.h)
│   │   │   ├── depth_processor.h (processor.h types.h rectify_processor.h)
│   │   │   ├── depth_processor_ocv.cc (depth_processor_ocv.h)
│   │   │   ├── depth_processor_ocv.h output cv::Mat(processor.h)
│   │   │   ├── disparity_normalized_processor.cc (opencv2* disparity_normalized_processor.h)
│   │   │   ├── disparity_normalized_processor.h (processor.h)
│   │   │   ├── disparity_processor.cc (opencv2* disparity_processor.h)
│   │   │   ├── disparity_processor.h (mynteye/types.h processor.h)
│   │   │   ├── points_processor.cc (opencv2* points_processor.h)
│   │   │   ├── points_processor.h (mynteye/types.h processor.h)
│   │   │   ├── points_processor_ocv.cc
│   │   │   ├── points_processor_ocv.h
│   │   │   ├── rectify_processor.cc (opencv2* rectify_processor.h)
│   │   │   ├── rectify_processor.h (equidistant_camera.h ...)
│   │   │   ├── rectify_processor_ocv.cc
│   │   │   ├── rectify_processor_ocv.h
│   │   │   ├── root_camera_processor.cc (opencv2* synthetic.h device.h data_tools.h)
│   │   │   └── root_camera_processor.h (opencv2* processor.h)
│   │   ├── processor.cc (strings.h times.h data_tools.h)
│   │   ├── processor.h processor base(synthetic.h mynteye.h object.h)
│   │   ├── synthetic.cc (*processor.h object.h plugin.h device.h data_tools.h)
│   │   ├── synthetic.h synthetic pipeline(api.h)
│   │   ├── version_checker.cc
│   │   └── version_checker.h
│   ├── device
│   │   ├── async_callback.h asynchronous data translate
│   │   ├── async_callback_impl.h derived
│   │   ├── channel
│   │   │   ├── bytes.cc
│   │   │   ├── bytes.h <--uint8_t data-->
│   │   │   ├── channels.cc
│   │   │   ├── channels.h channels control api
│   │   │   ├── def.h data packet
│   │   │   ├── file_channel.cc
│   │   │   └── file_channel.h data parser
│   │   ├── config.cc
│   │   ├── config.h config lists
│   │   ├── context.cc create context
│   │   ├── device.cc device class
│   │   ├── motions.cc
│   │   ├── motions.h imu motions
│   │   ├── standard standard device s
│   │   │   ├── channels_adapter_s.cc
│   │   │   ├── channels_adapter_s.h
│   │   │   ├── device_s.cc
│   │   │   ├── device_s.h
│   │   │   ├── streams_adapter_s.cc
│   │   │   └── streams_adapter_s.h
│   │   ├── standard2 standard device s2
│   │   │   ├── channels_adapter_s2.cc
│   │   │   ├── channels_adapter_s2.h
│   │   │   ├── device_s2.cc
│   │   │   ├── device_s2.h
│   │   │   ├── streams_adapter_s2.cc
│   │   │   └── streams_adapter_s2.h
│   │   ├── streams.cc
│   │   ├── streams.h camera streams
│   │   ├── types.cc to string
│   │   └── utils.cc user helper
│   ├── miniglog.cc
│   ├── types.cc device,streams,option...types str
│   ├── util
│   │   ├── files.cc
│   │   └── strings.cc
│   └── uvc
│ 
├── tools
│   ├── _build
│   │   ├── CMakeCache.txt
│   │   ├── CMakeFiles
│   │   │   ├── 3.5.1
│   │   │   │   ├── CMakeCCompiler.cmake
│   │   │   │   ├── CMakeCXXCompiler.cmake
│   │   │   │   ├── CMakeDetermineCompilerABI_C.bin
│   │   │   │   ├── CMakeDetermineCompilerABI_CXX.bin
│   │   │   │   ├── CMakeSystem.cmake
│   │   │   │   ├── CompilerIdC
│   │   │   │   │   └── CMakeCCompilerId.c
│   │   │   │   └── CompilerIdCXX
│   │   │   │   └── CMakeCXXCompilerId.cpp
│   │   │   ├── CMakeDirectoryInformation.cmake
│   │   │   ├── CMakeOutput.log
│   │   │   ├── CMakeTmp
│   │   │   ├── Makefile2
│   │   │   └── Makefile.cmake
│   │   ├── cmake_install.cmake
│   │   ├── dataset
│   │   │   ├── CMakeFiles
│   │   │   │   ├── CMakeDirectoryInformation.cmake
│   │   │   │   └── record2.dir
│   │   │   │   ├── cmake_clean.cmake
│   │   │   │   └── DependInfo.cmake
│   │   │   ├── cmake_install.cmake
│   │   │   └── Makefile
│   │   ├── Makefile
│   │   └── writer
│   │   ├── CMakeFiles
│   │   │   ├── CMakeDirectoryInformation.cmake
│   │   │   ├── device_info_writer.dir
│   │   │   │   ├── cmake_clean.cmake
│   │   │   │   └── DependInfo.cmake
│   │   │   ├── device_writer.dir
│   │   │   │   ├── cmake_clean.cmake
│   │   │   │   ├── cmake_clean_target.cmake
│   │   │   │   └── DependInfo.cmake
│   │   │   ├── img_params_writer.dir
│   │   │   │   ├── cmake_clean.cmake
│   │   │   │   └── DependInfo.cmake
│   │   │   ├── imu_params_writer.dir
│   │   │   │   ├── cmake_clean.cmake
│   │   │   │   └── DependInfo.cmake
│   │   │   └── save_all_infos.dir
│   │   │   ├── cmake_clean.cmake
│   │   │   └── DependInfo.cmake
│   │   ├── cmake_install.cmake
│   │   └── Makefile
│   ├── linter
│   └── _output
│   ├── bin
│   │   ├── dataset
│   │   └── writer
│   └── lib
│   └── writer
└── wrappers
├── android
│  
├── python
│   ├── CMakeLists.txt
│   ├── samples
│   │   ├── mynteye.py
│   │   └── util
│   │   ├── cv_painter.py
│   │   └── __init__.py
│   ├── src
│   │   └── mynteye_py.cc
│   └── third_party
│   └── array
│   ├── array_indexing_suite.hpp
│   └── array_ref.hpp
└── ros
└── src
└── mynt_eye_ros_wrapper
├── CMakeLists.txt
├── config
│   ├── device
│   ├── laserscan
│   ├── process
│   ├── slam
│   └── sub
│   ├── device_1
│   ├── device_2
│   ├── process_1
│   └── process_2
├── launch
│   ├── laserscan
│   ├── slam
│   └── sub
├── mesh
├── rviz
├── scripts
│   └── get_device_info.py
├── src
│   ├── configuru.hpp
│   ├── wrapper_node.cc
│   └── wrapper_nodelet.cc
└── srv

View File

@ -22,7 +22,8 @@ MYNTEYE_S_2.0.0_alpha0.img 2.0.0-alpha0
============================ ===========================
S2100 Firmwares SDK Version
============================ ===========================
MYNTEYE-S2100-1.3.2.img 2.4.0(2.4.0 ~ latest)
MYNTEYE-S21X0-1.4.0.img 2.4.2(2.4.2 ~ latest)
MYNTEYE-S2100-1.3.2.img 2.4.0(2.4.0 ~ 2.4.1)
MYNTEYE_S2100_1.2.img 2.3.5(2.3.5 ~ 2.3.9)
MYNTEYE_S2100_1.1.img 2.3.4
============================ ===========================

View File

@ -4,6 +4,13 @@ Change Log
.. toctree::
:maxdepth: 2
2019-09-09
-------------------
S21X0 Main Chip Firmware: MYNTEYE-S21X0-1.4.0.img
1. Support 2110 device.
2019-08-09
-------------------

View File

@ -12,7 +12,7 @@ You can download the firmware and MYNT EYE TOOL installation package in the ``Fi
Firmwares/
├─Checksum.txt # File checksum
├─MYNTEYE-S1030-2.5.0.img # S1030 firmware
├─MYNTEYE-S2100-1.3.2.img # S2100 firmware
├─MYNTEYE-S21x0-1.4.0.img # S21X0 firmware
├─...
└─mynt-eye-tool-setup.zip # MYNT EYE TOOL zip

View File

@ -2,7 +2,7 @@
Change Log
==========
2019-08-27(v2.4.2)
2019-09-4(v2.4.2)
-------------------
1. Part of the sample examples were sorted out, and useless tools and engineering code were removed.

View File

@ -18,6 +18,8 @@
namespace {
static cv::Mat cv_in_left, cv_in_left_inv;
class DepthRegion {
public:
explicit DepthRegion(std::uint32_t n)
@ -60,10 +62,10 @@ class DepthRegion {
void ShowElems(
const cv::Mat &depth,
std::function<std::string(const T &elem)> elem2string,
int elem_space = 40,
int elem_space = 60,
std::function<std::string(
const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n)>
getinfo = nullptr) {
const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n,
double X, double Y, double Z)>getinfo = nullptr) {
if (!show_)
return;
@ -74,6 +76,17 @@ class DepthRegion {
int x, y;
std::string str;
int baseline = 0;
// calculate (X, Y, Z) in left camera coordinate
cv::Mat mouse_left_cor(3, 1, CV_64FC1), mouse_img_cor(3, 1, CV_64FC1);
mouse_img_cor.at<double>(0, 0) = static_cast<double>(point_.x);
mouse_img_cor.at<double>(0, 1) = static_cast<double>(point_.y);
mouse_img_cor.at<double>(0, 2) = 1.0;
double Z = depth.at<T>(point_.y, point_.x);
mouse_left_cor = cv_in_left_inv *Z * mouse_img_cor;
// std::cout << std::endl << "Mouse Left Cor:" << std::endl
// << mouse_left_cor << std::endl;
for (int i = -n_; i <= n; ++i) {
x = point_.x + i;
if (x < 0 || x >= depth.cols)
@ -101,7 +114,11 @@ class DepthRegion {
}
if (getinfo) {
std::string info = getinfo(depth, point_, n_);
double x, y, z;
x = mouse_left_cor.at<double>(0, 0);
y = mouse_left_cor.at<double>(1, 0);
z = mouse_left_cor.at<double>(2, 0);
std::string info = getinfo(depth, point_, n_, x, y, z);
if (!info.empty()) {
cv::Size sz =
cv::getTextSize(info, cv::FONT_HERSHEY_PLAIN, 1, 1, &baseline);
@ -158,17 +175,48 @@ int main(int argc, char *argv[]) {
api->Start(Source::VIDEO_STREAMING);
// get left camera Intrinsics
auto in_left = api->GetIntrinsicsBase(Stream::LEFT);
cv_in_left = cv::Mat::eye(3, 3, CV_64F);
if (in_left->calib_model() == CalibrationModel::PINHOLE) {
std::shared_ptr<IntrinsicsPinhole> in;
in = std::static_pointer_cast<IntrinsicsPinhole>(in_left);
in -> ResizeIntrinsics();
cv_in_left.at<double>(0, 0) = in->fx;
cv_in_left.at<double>(1, 1) = in->fy;
cv_in_left.at<double>(0, 2) = in->cx;
cv_in_left.at<double>(1, 2) = in->cy;
} else if (in_left->calib_model() == CalibrationModel::KANNALA_BRANDT) {
in_left = std::dynamic_pointer_cast<IntrinsicsEquidistant>(in_left);
std::shared_ptr<IntrinsicsEquidistant> in;
in = std::static_pointer_cast<IntrinsicsEquidistant>(in_left);
in -> ResizeIntrinsics();
cv_in_left.at<double>(0, 0) = in->coeffs[4];
cv_in_left.at<double>(1, 1) = in->coeffs[5];
cv_in_left.at<double>(0, 2) = in->coeffs[6];
cv_in_left.at<double>(1, 2) = in->coeffs[7];
} else {
std::cout << "UNKNOW CALIB MODEL.";
return 0;
}
std::cout << std::endl << "Left Camera Intrinsics:" << std::endl
<< cv_in_left << std::endl;
cv_in_left_inv = cv_in_left.inv();
cv::namedWindow("frame");
cv::namedWindow("depth");
cv::namedWindow("region");
DepthRegion depth_region(3);
auto depth_info = [](
const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n) {
const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n,
double X, double Y, double Z) {
MYNTEYE_UNUSED(depth)
std::ostringstream os;
os << "depth pos: [" << point.y << ", " << point.x << "]"
<< "±" << n << ", unit: mm";
os << "depth pos(" << n << "): [" << point.y << ", " << point.x << "]"
<< " camera pos: [" << X << ", " << Y
<< ", " << Z << "]" << ", unit: mm";
return os.str();
};
@ -215,7 +263,7 @@ int main(int argc, char *argv[]) {
}
return std::to_string(elem);
},
80, depth_info);
90, depth_info);
}
char key = static_cast<char>(cv::waitKey(1));

View File

@ -14,9 +14,12 @@ int main(int argc, char *argv[]) {
if (!ok) return 1;
api->ConfigStreamRequest(request);
api->EnableStreamData(Stream::DEPTH);
api->Start(Source::VIDEO_STREAMING);
cv::namedWindow("frame");
cv::namedWindow("depth_real");
std::int32_t count = 0;
std::cout << "Press 'Space' 's' 'S' to save image." << std::endl;
@ -31,21 +34,31 @@ int main(int argc, char *argv[]) {
cv::imshow("frame", img);
}
auto &&depth_data = api->GetStreamData(Stream::DEPTH);
if (!depth_data.frame.empty()) {
cv::imshow("depth_real", depth_data.frame); // CV_16UC1
}
char key = static_cast<char>(cv::waitKey(1));
if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q
break;
} else if (key == 32 || key == 's' || key == 'S') {
if (!left_data.frame.empty() && !right_data.frame.empty()) {
if (!left_data.frame.empty()
&& !right_data.frame.empty()
&& !depth_data.frame.empty()) {
char l_name[20];
char r_name[20];
char d_name[20];
++count;
snprintf(l_name, sizeof(l_name), "left_%d.jpg", count);
snprintf(r_name, sizeof(r_name), "right_%d.jpg", count);
snprintf(d_name, sizeof(d_name), "depth_%d.jpg", count);
cv::imwrite(l_name, left_data.frame);
cv::imwrite(r_name, right_data.frame);
cv::imwrite(d_name, depth_data.frame);
std::cout << "Saved " << l_name << " " << r_name << " to current directory" << std::endl;
std::cout << "Saved " << l_name << " " << r_name << " " << d_name << " to current directory" << std::endl;
}
}
}

View File

@ -66,7 +66,7 @@ _mv_subs() {
################################################################################
# build release
make samples tools
make samples
################################################################################
# build debug
@ -95,22 +95,8 @@ _rm "$ROOT_DIR/samples/_build"
_rm "$ROOT_DIR/samples/_output"
mv "$ROOT_DIR/samples" "$ROOT_DIR/_install/samples"
# tools
mv "$ROOT_DIR/tools/_output/bin" "$ROOT_DIR/_install/bin/tools"
mv "$ROOT_DIR/tools/_output/lib" "$ROOT_DIR/_install/lib/tools"
_rm "$ROOT_DIR/tools/_build"
_rm "$ROOT_DIR/tools/_output"
mv "$ROOT_DIR/tools/linter" "$ROOT_DIR/3rdparty/linter"
mv "$ROOT_DIR/tools" "$ROOT_DIR/_install/tools"
# platforms/win
mv "$ROOT_DIR/platforms/win/README.txt" "$ROOT_DIR/_install"
_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/.vs"
_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/x64"
_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/mynteyes_demo/x64"
_rm "$ROOT_DIR/platforms/projects/vs2017/mynteyes_demo/mynteyes_demo/mynteyes_demo.vcxproj.user"
mv "$ROOT_DIR/platforms/projects" "$ROOT_DIR/_install/projects"
# readme
mv "$BASE_DIR/nsis/README.txt" "$ROOT_DIR/_install"
################################################################################
# copy to _install
@ -119,7 +105,6 @@ cp -f "$ROOT_DIR/scripts/win/cmake/mynteye-targets.cmake" "$ROOT_DIR/_install/li
cp -f "$ROOT_DIR/scripts/win/cmake/mynteye-targets-release.cmake" "$ROOT_DIR/_install/lib/cmake/mynteye/"
cp -f "$ROOT_DIR/scripts/win/generate.bat" "$ROOT_DIR/_install/samples/"
cp -f "$ROOT_DIR/scripts/win/generate.bat" "$ROOT_DIR/_install/tools/"
################################################################################
# archive exe
@ -160,14 +145,8 @@ mv "$ROOT_DIR/_install/cmake" "$ROOT_DIR/cmake"
# samples
mv "$ROOT_DIR/_install/samples" "$ROOT_DIR/samples"
# tools
mv "$ROOT_DIR/_install/tools" "$ROOT_DIR/tools"
mv "$ROOT_DIR/3rdparty/linter" "$ROOT_DIR/tools/linter"
# platforms/win
mv "$ROOT_DIR/_install/README.txt" "$ROOT_DIR/platforms/win"
mv "$ROOT_DIR/_install/projects" "$ROOT_DIR/platforms/projects"
# readme
mv "$ROOT_DIR/_install/README.txt" "$BASE_DIR/nsis"
################################################################################
# clean build
@ -175,5 +154,4 @@ mv "$ROOT_DIR/_install/projects" "$ROOT_DIR/platforms/projects"
_rm "$ROOT_DIR/_build"
_rm "$ROOT_DIR/_output"
_echo_d "Win pack success"

View File

@ -307,6 +307,21 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
{Option::GYROSCOPE_RANGE, "standard/gyro_range"}};
}
// device options of standard200b
if (model_ == Model::STANDARD200B) {
option_names_ = {
{Option::BRIGHTNESS, "standard200b/brightness"},
{Option::EXPOSURE_MODE, "standard200b/exposure_mode"},
{Option::MAX_GAIN, "standard200b/max_gain"},
{Option::MAX_EXPOSURE_TIME, "standard200b/max_exposure_time"},
{Option::DESIRED_BRIGHTNESS, "standard200b/desired_brightness"},
{Option::MIN_EXPOSURE_TIME, "standard200b/min_exposure_time"},
{Option::ACCELEROMETER_RANGE, "standard200b/accel_range"},
{Option::GYROSCOPE_RANGE, "standard200b/gyro_range"},
{Option::ACCELEROMETER_LOW_PASS_FILTER, "standard200b/accel_low_filter"},
{Option::GYROSCOPE_LOW_PASS_FILTER, "standard200b/gyro_low_filter"}};
}
for (auto &&it = option_names_.begin(); it != option_names_.end(); ++it) {
if (!api_->Supports(it->first))
continue;
@ -333,8 +348,9 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
NODELET_INFO_STREAM("Advertized on topic " << topic);
}
// Only STANDARD2/STANDARD210A need publish mono_topics
if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) {
// Only STANDARD2/STANDARD210A/STANDARD200B need publish mono_topics
if (model_ == Model::STANDARD2 ||
model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) {
for (auto &&it = mono_topics.begin(); it != mono_topics.end(); ++it) {
auto &&topic = mono_topics[it->first];
if (it->first == Stream::LEFT ||
@ -349,7 +365,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
int depth_type = 0;
private_nh_.getParamCached("depth_type", depth_type);
if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) {
if (model_ == Model::STANDARD2 ||
model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) {
camera_encodings_ = {{Stream::LEFT, enc::BGR8},
{Stream::RIGHT, enc::BGR8},
{Stream::LEFT_RECTIFIED, enc::BGR8},
@ -1100,7 +1117,8 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
int request_index = 0;
model_ = api_->GetModel();
if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) {
if (model_ == Model::STANDARD2 ||
model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) {
private_nh_.getParamCached("standard2/request_index", request_index);
switch (request_index) {
case 0:
@ -1127,7 +1145,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
std::int32_t process_mode = 0;
if (model_ == Model::STANDARD2 ||
model_ == Model::STANDARD210A) {
model_ == Model::STANDARD210A || model_ == Model::STANDARD200B) {
private_nh_.getParamCached("standard2/imu_process_mode", process_mode);
api_->EnableProcessMode(process_mode);
}