From 588781028f840360f4770cce1f416a74c3402ce0 Mon Sep 17 00:00:00 2001 From: TinyOh Date: Fri, 22 Mar 2019 18:09:02 +0800 Subject: [PATCH] feat(ros): add slam launch --- .../config/device/standard.yaml | 58 ++++ .../config/device/standard2.yaml | 108 ++++++++ .../config/process/process_config.yaml | 11 + .../config/slam/vins_fusion.yaml | 19 ++ .../launch/mynteye.launch | 247 +----------------- .../launch/slam/vins_fusion.launch | 129 +++++++++ .../src/wrapper_nodelet.cc | 1 + 7 files changed, 330 insertions(+), 243 deletions(-) create mode 100644 wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard.yaml create mode 100644 wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard2.yaml create mode 100644 wrappers/ros/src/mynt_eye_ros_wrapper/config/process/process_config.yaml create mode 100644 wrappers/ros/src/mynt_eye_ros_wrapper/config/slam/vins_fusion.yaml create mode 100644 wrappers/ros/src/mynt_eye_ros_wrapper/launch/slam/vins_fusion.launch diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard.yaml b/wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard.yaml new file mode 100644 index 0000000..d02323b --- /dev/null +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard.yaml @@ -0,0 +1,58 @@ +# standard/gain range: [0,48] +sstandard/gain: -1 +# standard/gain: 24 + +# standard/brightness range: [0,240] +standard/brightness: -1 +# standard/brightness: 120 + +# contrast range: [0,255] +standard/contrast: -1 +# standard/contrast: 127 + +# standard/frame_rate range: {10,15,20,25,30,35,40,45,50,55,60} +standard/frame_rate: -1 +# standard/frame_rate: 25 + +# standard/imu_frequency range: {100,200,250,333,500} +standard/imu_frequency: -1 +# standard/imu_frequency: 200 + +# standard/exposure_mode, 0: auto-exposure, 1: manual-exposure +standard/exposure_mode: -1 +# standard/exposure_mode: 0 + +# standard/max_gain range: [0,48] +standard/max_gain: -1 +# standard/max_gain: 48 + +# standard/max_exposure_time range: [0,240] +standard/max_exposure_time: -1 +# standard/max_exposure_time: 240 + +# standard/desired_brightness range: [0,255] +standard/desired_brightness: -1 +# standard/desired_brightness: 192 + +# standard/ir_control range: [0,160] +standard/ir_control: 80 +# standard/ir_control: 0 + +# standard/hdr_mode, 0: 10-bit, 1: 12-bit +standard/hdr_mode: -1 +# standard/hdr_mode: 0 + +# standard/accel_range range: {4,8,16,32} +standard/accel_range: -1 +# standard/accel_range: 8 + +# standard/gyro_range range: {500,1000,2000,4000} +standard/gyro_range: -1 +# standard/gyro_range: 1000 + +# MYNTEYE-S1030, Reslution: 752x480, Format: YUYV +# index_s_0: 0 +# MYNTEYE-S1030, Reslution: 376x240, Format: YUYV +# index_s_1: 1 + +standard/request_index: 0 \ No newline at end of file diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard2.yaml b/wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard2.yaml new file mode 100644 index 0000000..d4eaafb --- /dev/null +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/config/device/standard2.yaml @@ -0,0 +1,108 @@ + + +# Attention:The format of MYNTEYE-S2100/S2000 is YUYV.S210A's format is BGR888 + +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 10 +# index_s2_0: 0 +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 20 +# index_s2_1: 1 +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 30 +# index_s2_2: 2 +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 60 +# index_s2_3: 3 +# MYNTEYE-S2100/S2000/S210A, Reslution: 2560x800, Format: YUYV/BGR888, Fps: 10 +# index_s2_4: 4 +# MYNTEYE-S2100/S2000/S210A, Reslution: 2560x800, Format: YUYV/BGR888, Fps: 20 +# index_s2_5: 5 +# MYNTEYE-S2100/S2000/S210A, Reslution: 2560x800, Format: YUYV/BGR888, Fps: 30 +# index_s2_6: 6 + +standard2/request_index: 2 + +# device options of standard2, -1 will not set the value + +# standard2/brightness range: [0,240] +standard2/brightness: -1 +# standard2/brightness: 120 + +# standard2/exposure_mode, 0: auto-exposure, 1: manual-exposure +standard2/exposure_mode: -1 +# standard2/exposure_mode: 0 + +# standard2/max_gain range: [0,255] +standard2/max_gain: -1 +# standard2/max_gain: 8 + +# standard2/max_exposure_time range: [0,1000] +standard2/max_exposure_time: -1 +# standard2/max_exposure_time: 333 + +# standard2/desired_brightness range: [1,255] +standard2/desired_brightness: -1 +# standard2/desired_brightness: 122 + +# standard2/min_exposure_time range: [0,1000] +standard2/min_exposure_time: -1 +# standard2/min_exposure_time: 0 + +# standard2/ir_control range: [0,160] +standard2/ir_control: 80 +# standard2/ir_control: 0 + +# standard2/accel_range range: [6,48] +standard2/accel_range: 24 +# standard2/accel_range: 6 + +# standard2/gyro_range range: [250,4000] +standard2/gyro_range: -1 +# standard2/gyro_range: 1000 + +# standard2/accel_low_filter range: [0,2] +standard2/accel_low_filter: -1 +# standard2/accel_low_filter: 2 + +# standard2/gyro_low_filter range: [23,64] +standard2/gyro_low_filter: -1 +# standard2/gyro_low_filter: 64 + +# device options of standard210a, -1 will not set the value + +# standard210a/brightness range: [0,240] +standard210a/brightness: -1 +# standard210a/brightness: 120 + +# standard210a/exposure_mode, 0: auto-exposure, 1: manual-exposure +standard210a/exposure_mode: -1 +# standard210a/exposure_mode: 0 + +# standard210a/max_gain range: [0,255] +standard210a/max_gain: -1 +# standard210a/max_gain: 8 + +# standard210a/max_exposure_time range: [0,1000] +standard210a/max_exposure_time: -1 +# standard210a/max_exposure_time: 333 + +# standard210a/desired_brightness range: [1,255] +standard210a/desired_brightness: -1 +# standard210a/desired_brightness: 122 + +# standard210a/min_exposure_time range: [0,1000] +standard210a/min_exposure_time: -1 +# standard210a/min_exposure_time: 0 + +# standard210a/accel_range range: [6,48] +standard210a/accel_range: -1 +# standard210a/accel_range: 6 + +# standard210a/gyro_range range: [250,4000] +standard210a/gyro_range: -1 +# standard210a/gyro_range: 1000 + +# standard210a/accel_low_filter range: [0,2] +standard210a/accel_low_filter: -1 +# standard210a/accel_low_filter: 2 + +# standard210a/gyro_low_filter range: [23,64] +standard210a/gyro_low_filter: -1 +# standard210a/gyro_low_filter: 64 \ No newline at end of file diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/config/process/process_config.yaml b/wrappers/ros/src/mynt_eye_ros_wrapper/config/process/process_config.yaml new file mode 100644 index 0000000..4a2514f --- /dev/null +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/config/process/process_config.yaml @@ -0,0 +1,11 @@ +# disparity computing method type +# sgbm: 0 +# bm: 1 +disparity_computing_method: 1 + +enable_left_rect: false +enable_right_rect: false +enable_disparity: false +enable_disparity_norm: false +enable_points: false +enable_depth: false \ No newline at end of file diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/config/slam/vins_fusion.yaml b/wrappers/ros/src/mynt_eye_ros_wrapper/config/slam/vins_fusion.yaml new file mode 100644 index 0000000..26129ae --- /dev/null +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/config/slam/vins_fusion.yaml @@ -0,0 +1,19 @@ + +# Attention:The format of MYNTEYE-S2100/S2000 is YUYV.S210A's format is BGR888 + +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 10 +# index_s2_0: "0" +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 20 +# index_s2_1: "1" +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 30 +# index_s2_2: "2" +# MYNTEYE-S2100/S2000/S210A, Reslution: 1280x400, Format: YUYV/BGR888, Fps: 60 +# index_s2_3: "3" +# MYNTEYE-S2100/S2000/S210A, Reslution: 2560x800, Format: YUYV/BGR888, Fps: 10 +# index_s2_4: "4" +# MYNTEYE-S2100/S2000/S210A, Reslution: 2560x800, Format: YUYV/BGR888, Fps: 20 +# index_s2_5: "5" +# MYNTEYE-S2100/S2000/S210A, Reslution: 2560x800, Format: YUYV/BGR888, Fps: 30 +# index_s2_6: "6" + +standard2/request_index: 1 \ No newline at end of file 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 aed751b..c348f3c 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch @@ -35,190 +35,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -255,66 +71,11 @@ + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wrappers/ros/src/mynt_eye_ros_wrapper/launch/slam/vins_fusion.launch b/wrappers/ros/src/mynt_eye_ros_wrapper/launch/slam/vins_fusion.launch new file mode 100644 index 0000000..6a8d81f --- /dev/null +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/launch/slam/vins_fusion.launch @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + + - 'image_transport/compressedDepth' + + + + \ No newline at end of file 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..94ab231 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 @@ -1076,6 +1076,7 @@ class ROSWrapperNodelet : public nodelet::Nodelet { model_ = api_->GetModel(); if (model_ == Model::STANDARD2 || model_ == Model::STANDARD210A) { private_nh_.getParam("standard2/request_index", request_index); + std::cout << request_index << std::endl; switch (request_index) { case 0: case 4: