From fee2e140c2c466653201570d3be303fe2eb51154 Mon Sep 17 00:00:00 2001 From: Osenberg Date: Thu, 21 Mar 2019 19:43:38 +0800 Subject: [PATCH] feat(ros): added imu process mode in mynteye.launch --- .../ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch | 7 +++++++ .../ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch b/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch index b82dc5d..0ef6e42 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch @@ -58,6 +58,10 @@ + + + + @@ -272,6 +276,9 @@ + + + diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc b/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc index 0ff0e2d..c6d96ce 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/src/wrapper_nodelet.cc @@ -1099,6 +1099,13 @@ class ROSWrapperNodelet : public nodelet::Nodelet { frame_rate_ = api_->GetOptionValue(Option::FRAME_RATE); } + std::int32_t process_mode = 0; + if (model_ == Model::STANDARD2 || + model_ == Model::STANDARD210A) { + private_nh_.getParam("standard2/imu_process_mode", process_mode); + api_->EnableProcessMode(process_mode); + } + NODELET_FATAL_COND(m <= 0, "No MYNT EYE devices :("); if (m <= 1) { NODELET_INFO_STREAM("Only one stream request, select index: 0");