feat(src): added S200B device support

This commit is contained in:
Osenberg 2019-08-07 18:42:37 +08:00
parent acabe04a92
commit 37b98e0d33
25 changed files with 289 additions and 52 deletions

View File

@ -44,6 +44,8 @@ enum class Model : std::uint8_t {
STANDARD2,
/** Standard 210a */
STANDARD210A,
/** Standard 200b */
STANDARD200B,
/** Last guard */
LAST
};
@ -273,6 +275,9 @@ enum class Option : std::uint8_t {
/** Erase chip */
ERASE_CHIP,
/** Sync timestamp */
SYNC_TIMESTAMP,
/** Last guard */
LAST
};

View File

@ -58,8 +58,9 @@ int main(int argc, char *argv[]) {
<< api->GetOptionValue(Option::DESIRED_BRIGHTNESS);
}
// Set auto exposure options fo S2000/S2100/S210A
if (model == Model::STANDARD2 || model == Model::STANDARD210A) {
// Set auto exposure options fo S2000/S2100/S210A/S200B
if (model == Model::STANDARD2 ||
model == Model::STANDARD210A || model == Model::STANDARD200B) {
// auto-exposure: 0
api->SetOptionValue(Option::EXPOSURE_MODE, 0);

View File

@ -45,8 +45,9 @@ int main(int argc, char *argv[]) {
<< api->GetOptionValue(Option::IMU_FREQUENCY);
}
// You should set frame rate for S2000/S2100/S210A by 'SelectStreamRequest()'
if (model == Model::STANDARD2 || model == Model::STANDARD210A) {
// You should set frame rate for S2000/S2100/S210A/S200B by 'SelectStreamRequest()'
if (model == Model::STANDARD2 ||
model == Model::STANDARD210A || model == Model::STANDARD200B) {
LOG(INFO) << "Please set frame rate by 'SelectStreamRequest()'";
}

View File

@ -38,8 +38,9 @@ int main(int argc, char *argv[]) {
return 0;
}
// Set imu low pass filter for S2000/S2100/S210A
if (model == Model::STANDARD2 || model == Model::STANDARD210A) {
// Set imu low pass filter for S2000/S2100/S210A/S200B
if (model == Model::STANDARD2 ||
model == Model::STANDARD210A || model == Model::STANDARD200B) {
// ACCELEROMETER_RANGE values: 0, 1, 2
api->SetOptionValue(Option::ACCELEROMETER_LOW_PASS_FILTER, 2);
// GYROSCOPE_RANGE values: 23, 64

View File

@ -40,8 +40,9 @@ int main(int argc, char *argv[]) {
api->SetOptionValue(Option::GYROSCOPE_RANGE, 1000);
}
// Set imu range for S2000/S2100/S210A
if (model == Model::STANDARD2 || model == Model::STANDARD210A) {
// Set imu range for S2000/S2100/S210A/S200B
if (model == Model::STANDARD2 ||
model == Model::STANDARD210A || model == Model::STANDARD200B) {
// ACCELEROMETER_RANGE values: 6, 12, 24, 48
api->SetOptionValue(Option::ACCELEROMETER_RANGE, 6);
// GYROSCOPE_RANGE values: 250, 500, 1000, 2000, 4000

View File

@ -29,7 +29,7 @@ int main(int argc, char *argv[]) {
Model model = api->GetModel();
if (model == Model::STANDARD || model == Model::STANDARD2) {
if (model == Model::STANDARD) {
// ir control: range [0,160], default 0
api->SetOptionValue(Option::IR_CONTROL, 80);
@ -37,9 +37,10 @@ int main(int argc, char *argv[]) {
<< api->GetOptionValue(Option::IR_CONTROL);
}
// MYNTEYE-S210A don't support this option
if (model == Model::STANDARD210A) {
LOG(INFO) << "Sorry,MYNTEYE-S210A don't support ir control";
// MYNTEYE-S210A S2000 S200B don't support this option
if (model == Model::STANDARD210A ||
model == Model::STANDARD2 || model == Model::STANDARD200B) {
LOG(INFO) << "Sorry, MYNTEYE-S210A S2000 S200B don't support ir control";
return 0;
}

View File

@ -54,8 +54,9 @@ int main(int argc, char *argv[]) {
LOG(INFO) << "Set CONTRAST to " << api->GetOptionValue(Option::CONTRAST);
}
// Set manual exposure options fo S2000/S2100/S210A
if (model == Model::STANDARD2 || model == Model::STANDARD210A) {
// Set manual exposure options fo S2000/S2100/S210A/S200B
if (model == Model::STANDARD2 ||
model == Model::STANDARD210A || model == Model::STANDARD200B) {
// manual-exposure: 1
api->SetOptionValue(Option::EXPOSURE_MODE, 1);

View File

@ -592,16 +592,6 @@ bool API::ConfigDisparityFromFile(const std::string& config_file) {
bool API::IsDefaultIntrinsics() {
if (device_ != nullptr) {
return device_->CheckImageParams();
if (device_->CheckImageParams()) {
LOG(WARNING) << "Default intrinsics are currently being used.";
LOG(FATAL) << "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-SDK-2-Guide) "
"to learn more.";
}
}
return false;

View File

@ -96,6 +96,9 @@ int XuHalfDuplexId(Option option) {
case Option::ERASE_CHIP:
return 1;
break;
case Option::SYNC_TIMESTAMP:
return 2;
break;
default:
LOG(FATAL) << "No half duplex id for " << option;
}
@ -206,6 +209,9 @@ std::int32_t Channels::GetControlValue(const Option &option) const {
case Option::ERASE_CHIP:
LOG(WARNING) << option << " get value useless";
return -1;
case Option::SYNC_TIMESTAMP:
LOG(WARNING) << option << " get value useless";
return -1;
default:
LOG(ERROR) << "Unsupported option " << option;
}
@ -292,11 +298,49 @@ void Channels::SetControlValue(const Option &option, std::int32_t value) {
case Option::ERASE_CHIP:
LOG(WARNING) << option << " set value useless";
break;
case Option::SYNC_TIMESTAMP:
XuCamCtrlSet(option, value);
break;
default:
LOG(ERROR) << "Unsupported option " << option;
}
}
bool Channels::SetControlValue(const Option &option, std::uint64_t value) {
switch (option) {
case Option::GAIN:
case Option::BRIGHTNESS:
case Option::CONTRAST:
case Option::FRAME_RATE:
case Option::IMU_FREQUENCY:
case Option::ACCELEROMETER_RANGE:
case Option::GYROSCOPE_RANGE:
case Option::ACCELEROMETER_LOW_PASS_FILTER:
case Option::GYROSCOPE_LOW_PASS_FILTER:
case Option::EXPOSURE_MODE:
case Option::MAX_GAIN:
case Option::MAX_EXPOSURE_TIME:
case Option::DESIRED_BRIGHTNESS:
case Option::IR_CONTROL:
case Option::HDR_MODE:
case Option::MIN_EXPOSURE_TIME:
case Option::IIC_ADDRESS_SETTING:
case Option::ZERO_DRIFT_CALIBRATION:
LOG(WARNING) << option << " refer to function SetControlValue(const Option &option, std::int32_t value)";
break;
case Option::ERASE_CHIP:
LOG(WARNING) << option << " set value useless";
break;
case Option::SYNC_TIMESTAMP:
return XuHalfDuplexSet(option, XU_SYNC_TIMESTAMP);
break;
default:
LOG(ERROR) << "Unsupported option " << option;
}
return false;
}
bool Channels::RunControlAction(const Option &option) const {
switch (option) {
case Option::ZERO_DRIFT_CALIBRATION:

View File

@ -50,6 +50,7 @@ class MYNTEYE_API Channels {
typedef enum XuCmd {
XU_CMD_ZDC = 0xE6, // zero drift calibration
XU_CMD_ERASE = 0xDE, // erase chip
XU_SYNC_TIMESTAMP = 0x200, // sync timestamp
XU_CMD_LAST
} xu_cmd_t;
@ -72,6 +73,7 @@ class MYNTEYE_API Channels {
std::int32_t GetControlValue(const Option &option) const;
void SetControlValue(const Option &option, std::int32_t value);
bool SetControlValue(const Option &option, std::uint64_t value);
bool RunControlAction(const Option &option) const;

View File

@ -18,13 +18,15 @@ MYNTEYE_BEGIN_NAMESPACE
const std::map<Model, StreamSupports> stream_supports_map = {
{Model::STANDARD, {Stream::LEFT, Stream::RIGHT}},
{Model::STANDARD2, {Stream::LEFT, Stream::RIGHT}},
{Model::STANDARD210A, {Stream::LEFT, Stream::RIGHT}}
{Model::STANDARD210A, {Stream::LEFT, Stream::RIGHT}},
{Model::STANDARD200B, {Stream::LEFT, Stream::RIGHT}},
};
const std::map<Model, CapabilitiesSupports> capabilities_supports_map = {
{Model::STANDARD, {Capabilities::STEREO, Capabilities::IMU}},
{Model::STANDARD2, {Capabilities::STEREO_COLOR, Capabilities::IMU}},
{Model::STANDARD210A, {Capabilities::STEREO_COLOR, Capabilities::IMU}}
{Model::STANDARD210A, {Capabilities::STEREO_COLOR, Capabilities::IMU}},
{Model::STANDARD200B, {Capabilities::STEREO_COLOR, Capabilities::IMU}}
};
const std::map<Model, OptionSupports> option_supports_map = {
@ -54,7 +56,14 @@ const std::map<Model, OptionSupports> option_supports_map = {
Option::ACCELEROMETER_RANGE, Option::GYROSCOPE_RANGE,
Option::ACCELEROMETER_LOW_PASS_FILTER, Option::GYROSCOPE_LOW_PASS_FILTER,
Option::IIC_ADDRESS_SETTING, Option::ERASE_CHIP}
}
},
{Model::STANDARD200B, {
Option::BRIGHTNESS,
Option::EXPOSURE_MODE, Option::MAX_GAIN, Option::MAX_EXPOSURE_TIME,
Option::MIN_EXPOSURE_TIME, Option::DESIRED_BRIGHTNESS, Option::ACCELEROMETER_RANGE,
Option::GYROSCOPE_RANGE, Option::ACCELEROMETER_LOW_PASS_FILTER,
Option::GYROSCOPE_LOW_PASS_FILTER, Option::ERASE_CHIP, Option::SYNC_TIMESTAMP}
},
};
const std::map<Model, std::map<Capabilities, StreamRequests>>
@ -86,7 +95,18 @@ stream_requests_map = {
{2560, 800, Format::BGR888, 20},
{2560, 800, Format::BGR888, 30}}
}}
}
},
{Model::STANDARD200B,
{{Capabilities::STEREO_COLOR, {
{1280, 400, Format::YUYV, 10},
{1280, 400, Format::YUYV, 20},
{1280, 400, Format::YUYV, 30},
{1280, 400, Format::YUYV, 60},
{2560, 800, Format::YUYV, 10},
{2560, 800, Format::YUYV, 20},
{2560, 800, Format::YUYV, 30}}
}}
},
};
/**

View File

@ -111,12 +111,23 @@ std::shared_ptr<Device> Device::Create(
if (model.generation == '1') {
return std::make_shared<StandardDevice>(device);
} else if (model.generation == '2') {
if (model.custom_code == '0') {
return std::make_shared<Standard2Device>(Model::STANDARD2, device);
} else if (model.custom_code == 'A') {
return std::make_shared<Standard2Device>(Model::STANDARD210A, device);
if (model.baseline_code == '1') {
if (model.custom_code == '0') {
return std::make_shared<Standard2Device>(Model::STANDARD2, device);
} else if (model.custom_code == 'A') {
return std::make_shared<Standard2Device>(
Model::STANDARD210A, device);
} else {
LOG(FATAL) << "No such custom code now";
}
} else if (model.baseline_code == '0') {
if (model.custom_code == 'B') {
return std::make_shared<Standard2Device>(Model::STANDARD200B, device);
} else {
LOG(FATAL) << "No such custom code now";
}
} else {
LOG(FATAL) << "No such custom code now";
LOG(FATAL) << "No such baseline now";
}
} else {
LOG(FATAL) << "No such generation now";

View File

@ -26,7 +26,8 @@ Standard2Device::Standard2Device(const Model &model,
std::make_shared<Standard2StreamsAdapter>(model),
std::make_shared<Standard2ChannelsAdapter>(model)) {
VLOG(2) << __func__;
CHECK(model == Model::STANDARD2 || model == Model::STANDARD210A);
CHECK(model == Model::STANDARD2 || model == Model::STANDARD210A ||
model == Model::STANDARD200B);
}
Standard2Device::~Standard2Device() {

View File

@ -227,6 +227,7 @@ Standard2StreamsAdapter::GetUnpackImgPixelsMap() {
{Stream::RIGHT, s210a::unpack_right_img_pixels}
};
case Model::STANDARD2:
case Model::STANDARD200B:
default:
return {
{Stream::LEFT, unpack_left_img_pixels},

View File

@ -31,6 +31,7 @@ const char *to_string(const Model &value) {
CASE(STANDARD)
CASE(STANDARD2)
CASE(STANDARD210A)
CASE(STANDARD200B)
default:
CHECK(is_valid(value));
return "Model::UNKNOWN";
@ -125,6 +126,7 @@ const char *to_string(const Option &value) {
CASE(IIC_ADDRESS_SETTING)
CASE(ZERO_DRIFT_CALIBRATION)
CASE(ERASE_CHIP)
CASE(SYNC_TIMESTAMP)
default:
CHECK(is_valid(value));
return "Option::UNKNOWN";

View File

@ -75,6 +75,7 @@ TEST(Option, VerifyToString) {
"Option::ZERO_DRIFT_CALIBRATION",
to_string(Option::ZERO_DRIFT_CALIBRATION));
EXPECT_STREQ("Option::ERASE_CHIP", to_string(Option::ERASE_CHIP));
EXPECT_STREQ("Option::SYNC_TIMESTAMP", to_string(Option::SYNC_TIMESTAMP));
}
TEST(Source, VerifyToString) {

View File

@ -14,6 +14,8 @@ enum class Model : int {
STANDARD2,
/** Standard 210a */
STANDARD210A,
/** Standard 200b */
STANDARD200B,
};
} // namespace mynteye_jni

View File

@ -104,6 +104,8 @@ enum class Option : int {
ZERO_DRIFT_CALIBRATION,
/** Erase chip */
ERASE_CHIP,
/** Sync timestamp */
SYNC_TIMESTAMP,
};
} // namespace mynteye_jni

View File

@ -64,6 +64,7 @@ RawModel from_jni(const JniModel& model) {
case JniModel::STANDARD: return RawModel::STANDARD;
case JniModel::STANDARD2: return RawModel::STANDARD2;
case JniModel::STANDARD210A: return RawModel::STANDARD210A;
case JniModel::STANDARD200B: return RawModel::STANDARD200B;
default:
LOG(FATAL) << "Model is unknown";
}
@ -75,6 +76,7 @@ JniModel to_jni(const RawModel& model) {
case RawModel::STANDARD: return JniModel::STANDARD;
case RawModel::STANDARD2: return JniModel::STANDARD2;
case RawModel::STANDARD210A: return JniModel::STANDARD210A;
case RawModel::STANDARD200B: return JniModel::STANDARD200B;
default:
LOG(FATAL) << "Model is unknown";
}

View File

@ -14,5 +14,7 @@ public enum Model {
STANDARD2,
/** Standard 210a */
STANDARD210A,
/** Standard 200b */
STANDARD200B,
;
}

View File

@ -27,6 +27,8 @@ model = enum {
standard2;
# Standard 210a
standard210a;
# Standard 200b
standard200B;
}
# Formats define how each stream can be encoded

View File

@ -19,7 +19,7 @@
standard2/request_index: 2
# MYNTEYE-S2100/S2000/S210A/imu_process_mode range: [0,3]
# MYNTEYE-S2100/S2000/S210A/S200B imu_process_mode range: [0,3]
# 0 - none process, 1 - temperature process, 2 - scale and assembly process, 3 - both
standard2/imu_process_mode: 2
@ -110,3 +110,45 @@ standard210a/gyro_low_filter: -1
# standard210a/iic_address_setting range: [0,127]
standard210a/iic_address_setting: -1
# standard210a/iic_address_setting: 0x01
# device options of standard200b, -1 will not set the value
# standard200b/brightness range: [1,255]
standard200b/brightness: -1
# standard200b/brightness: 70
# standard200b/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard200b/exposure_mode: -1
# standard200b/exposure_mode: 0
# standard200b/max_gain range: [0,255]
standard200b/max_gain: -1
# standard200b/max_gain: 8
# standard200b/max_exposure_time range: [0,1000]
standard200b/max_exposure_time: -1
# standard200b/max_exposure_time: 333
# standard200b/desired_brightness range: [1,255]
standard200b/desired_brightness: -1
# standard200b/desired_brightness: 122
# standard200b/min_exposure_time range: [0,1000]
standard200b/min_exposure_time: -1
# standard200b/min_exposure_time: 0
# standard200b/accel_range range: [6,48]
standard200b/accel_range: -1
# standard200b/accel_range: 6
# standard200b/gyro_range range: [250,4000]
standard200b/gyro_range: -1
# standard200b/gyro_range: 1000
# standard200b/accel_low_filter range: [0,2]
standard200b/accel_low_filter: -1
# standard200b/accel_low_filter: 2
# standard200b/gyro_low_filter range: [23,64]
standard200b/gyro_low_filter: -1
# standard200b/gyro_low_filter: 64

View File

@ -19,15 +19,15 @@
standard2/request_index: 2
# MYNTEYE-S2100/S2000/S210A/imu_process_mode range: [0,3]
# MYNTEYE-S2100/S2000/S210A/S200B imu_process_mode range: [0,3]
# 0 - none process, 1 - temperature process, 2 - scale and assembly process, 3 - both
standard2/imu_process_mode: 0
standard2/imu_process_mode: 2
# device options of standard2, -1 will not set the value
# standard2/brightness range: [0,240]
# standard2/brightness range: [1,255]
standard2/brightness: -1
# standard2/brightness: 120
# standard2/brightness: 70
# standard2/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard2/exposure_mode: -1
@ -67,9 +67,9 @@ standard2/gyro_low_filter: -1
# device options of standard210a, -1 will not set the value
# standard210a/brightness range: [0,240]
# standard210a/brightness range: [1,255]
standard210a/brightness: -1
# standard210a/brightness: 120
# standard210a/brightness: 70
# standard210a/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard210a/exposure_mode: -1
@ -110,3 +110,45 @@ standard210a/gyro_low_filter: -1
# standard210a/iic_address_setting range: [0,127]
standard210a/iic_address_setting: -1
# standard210a/iic_address_setting: 0x01
# device options of standard200b, -1 will not set the value
# standard200b/brightness range: [1,255]
standard200b/brightness: -1
# standard200b/brightness: 70
# standard200b/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard200b/exposure_mode: -1
# standard200b/exposure_mode: 0
# standard200b/max_gain range: [0,255]
standard200b/max_gain: -1
# standard200b/max_gain: 8
# standard200b/max_exposure_time range: [0,1000]
standard200b/max_exposure_time: -1
# standard200b/max_exposure_time: 333
# standard200b/desired_brightness range: [1,255]
standard200b/desired_brightness: -1
# standard200b/desired_brightness: 122
# standard200b/min_exposure_time range: [0,1000]
standard200b/min_exposure_time: -1
# standard200b/min_exposure_time: 0
# standard200b/accel_range range: [6,48]
standard200b/accel_range: -1
# standard200b/accel_range: 6
# standard200b/gyro_range range: [250,4000]
standard200b/gyro_range: -1
# standard200b/gyro_range: 1000
# standard200b/accel_low_filter range: [0,2]
standard200b/accel_low_filter: -1
# standard200b/accel_low_filter: 2
# standard200b/gyro_low_filter range: [23,64]
standard200b/gyro_low_filter: -1
# standard200b/gyro_low_filter: 64

View File

@ -19,15 +19,15 @@
standard2/request_index: 2
# MYNTEYE-S2100/S2000/S210A/imu_process_mode range: [0,3]
# MYNTEYE-S2100/S2000/S210A/S200B imu_process_mode range: [0,3]
# 0 - none process, 1 - temperature process, 2 - scale and assembly process, 3 - both
standard2/imu_process_mode: 0
standard2/imu_process_mode: 2
# device options of standard2, -1 will not set the value
# standard2/brightness range: [0,240]
# standard2/brightness range: [1,255]
standard2/brightness: -1
# standard2/brightness: 120
# standard2/brightness: 70
# standard2/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard2/exposure_mode: -1
@ -67,9 +67,9 @@ standard2/gyro_low_filter: -1
# device options of standard210a, -1 will not set the value
# standard210a/brightness range: [0,240]
# standard210a/brightness range: [1,255]
standard210a/brightness: -1
# standard210a/brightness: 120
# standard210a/brightness: 70
# standard210a/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard210a/exposure_mode: -1
@ -110,3 +110,45 @@ standard210a/gyro_low_filter: -1
# standard210a/iic_address_setting range: [0,127]
standard210a/iic_address_setting: -1
# standard210a/iic_address_setting: 0x01
# device options of standard200b, -1 will not set the value
# standard200b/brightness range: [1,255]
standard200b/brightness: -1
# standard200b/brightness: 70
# standard200b/exposure_mode, 0: auto-exposure, 1: manual-exposure
standard200b/exposure_mode: -1
# standard200b/exposure_mode: 0
# standard200b/max_gain range: [0,255]
standard200b/max_gain: -1
# standard200b/max_gain: 8
# standard200b/max_exposure_time range: [0,1000]
standard200b/max_exposure_time: -1
# standard200b/max_exposure_time: 333
# standard200b/desired_brightness range: [1,255]
standard200b/desired_brightness: -1
# standard200b/desired_brightness: 122
# standard200b/min_exposure_time range: [0,1000]
standard200b/min_exposure_time: -1
# standard200b/min_exposure_time: 0
# standard200b/accel_range range: [6,48]
standard200b/accel_range: -1
# standard200b/accel_range: 6
# standard200b/gyro_range range: [250,4000]
standard200b/gyro_range: -1
# standard200b/gyro_range: 1000
# standard200b/accel_low_filter range: [0,2]
standard200b/accel_low_filter: -1
# standard200b/accel_low_filter: 2
# standard200b/gyro_low_filter range: [23,64]
standard200b/gyro_low_filter: -1
# standard200b/gyro_low_filter: 64

View File

@ -305,6 +305,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
{Option::ACCELEROMETER_LOW_PASS_FILTER, "standard2/accel_low_filter"},
{Option::GYROSCOPE_LOW_PASS_FILTER, "standard2/gyro_low_filter"}};
}
// device options of standard
if (model_ == Model::STANDARD) {
option_names_ = {
@ -323,6 +324,20 @@ 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;
@ -349,8 +364,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 ||
@ -365,7 +381,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},
@ -1095,7 +1112,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:
@ -1122,7 +1140,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);
}