diff --git a/src/mynteye/device/channel/def.h b/src/mynteye/device/channel/def.h index a903854..ec8b2b9 100644 --- a/src/mynteye/device/channel/def.h +++ b/src/mynteye/device/channel/def.h @@ -72,6 +72,8 @@ struct ImuSegment { std::uint32_t frame_id; std::uint64_t timestamp; std::uint8_t flag; + // Is external time source + bool is_ets; std::int16_t temperature; std::int16_t accel[3]; std::int16_t gyro[3]; diff --git a/src/mynteye/device/standard2/channels_adapter_s2.cc b/src/mynteye/device/standard2/channels_adapter_s2.cc index 13efb89..0c0157b 100644 --- a/src/mynteye/device/standard2/channels_adapter_s2.cc +++ b/src/mynteye/device/standard2/channels_adapter_s2.cc @@ -55,7 +55,8 @@ struct ImuData { void unpack_imu_segment(const ImuData &imu, ImuSegment *seg) { seg->frame_id = imu.frame_id; seg->timestamp = imu.timestamp; - seg->flag = imu.flag; + seg->flag = imu.flag & 0b0011; + seg->is_ets = (imu.flag & 0b0100 == 0b0100); seg->temperature = imu.temperature; seg->accel[0] = (seg->flag == 1) ? imu.accel_or_gyro[0] : 0; seg->accel[1] = (seg->flag == 1) ? imu.accel_or_gyro[1] : 0; 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..c633900 --- /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: -1 +# 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..bc98853 --- /dev/null +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/config/process/process_config.yaml @@ -0,0 +1,15 @@ +# disparity computing method type +# sgbm: 0 +# bm: 1 +disparity_computing_method: 1 + +# standard2/imu_process_mode range: [0,3] +# 0 - none process, 1 - temperature process, 2 - scale and assembly process, 3 - both +imu_process_mode: 0 + +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 8cf722d..b9c03af 100644 --- a/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch +++ b/wrappers/ros/src/mynt_eye_ros_wrapper/launch/mynteye.launch @@ -41,191 +41,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -265,66 +80,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 5c09bab..afdd467 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 @@ -1069,6 +1069,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");