Merge branch 'develop' into release/v2.4.2
This commit is contained in:
commit
1499a9fc11
|
@ -116,18 +116,48 @@ cv::Rect CVPainter::DrawImuData(
|
||||||
int sign = 1;
|
int sign = 1;
|
||||||
if (gravity == BOTTOM_LEFT || gravity == BOTTOM_RIGHT)
|
if (gravity == BOTTOM_LEFT || gravity == BOTTOM_RIGHT)
|
||||||
sign = -1;
|
sign = -1;
|
||||||
|
static auto fmt_time = NewFormat(0, 2);
|
||||||
Clear(ss) << "stamp: " << data.timestamp
|
Clear(ss) << "stamp: " << fmt_time << (0.001f * data.timestamp)
|
||||||
<< ", temp: " << fmt_temp << data.temperature;
|
<< ", temp: " << fmt_temp << data.temperature;
|
||||||
cv::Rect rect_i = DrawText(img, ss.str(), gravity, 5);
|
cv::Rect rect_i = DrawText(img, ss.str(), gravity, 5);
|
||||||
|
|
||||||
Clear(ss) << "accel(x,y,z): " << fmt_imu << data.accel[0] << "," << fmt_imu
|
static double accel1_s = 0.0;
|
||||||
<< data.accel[1] << "," << fmt_imu << data.accel[2];
|
static double accel2_s = 0.0;
|
||||||
|
static double accel3_s = 0.0;
|
||||||
|
|
||||||
|
if (data.accel[0] > 0.000001 ||
|
||||||
|
data.accel[1] > 0.000001 ||
|
||||||
|
data.accel[2] > 0.000001 ||
|
||||||
|
data.accel[0] < -0.000001 ||
|
||||||
|
data.accel[1] < -0.000001 ||
|
||||||
|
data.accel[2] < -0.000001) {
|
||||||
|
accel1_s = data.accel[0];
|
||||||
|
accel2_s = data.accel[1];
|
||||||
|
accel3_s = data.accel[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
Clear(ss) << "accel(x,y,z): " << fmt_imu << accel1_s << "," << fmt_imu
|
||||||
|
<< accel2_s << "," << fmt_imu << accel3_s;
|
||||||
cv::Rect rect_a =
|
cv::Rect rect_a =
|
||||||
DrawText(img, ss.str(), gravity, 5, 0, sign * (5 + rect_i.height));
|
DrawText(img, ss.str(), gravity, 5, 0, sign * (5 + rect_i.height));
|
||||||
|
|
||||||
Clear(ss) << "gyro(x,y,z): " << fmt_imu << data.gyro[0] << "," << fmt_imu
|
static double gyro1_s = 0.0;
|
||||||
<< data.gyro[1] << "," << fmt_imu << data.gyro[2];
|
static double gyro2_s = 0.0;
|
||||||
|
static double gyro3_s = 0.0;
|
||||||
|
|
||||||
|
if (data.gyro[0] > 0.01 ||
|
||||||
|
data.gyro[1] > 0.01 ||
|
||||||
|
data.gyro[2] > 0.01 ||
|
||||||
|
data.gyro[0] < -0.01 ||
|
||||||
|
data.gyro[1] < -0.01 ||
|
||||||
|
data.gyro[2] < -0.01 ) {
|
||||||
|
gyro1_s = data.gyro[0];
|
||||||
|
gyro2_s = data.gyro[1];
|
||||||
|
gyro3_s = data.gyro[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
Clear(ss) << "gyro(x,y,z): " << fmt_imu << gyro1_s << "," << fmt_imu
|
||||||
|
<< gyro2_s << "," << fmt_imu << gyro3_s;
|
||||||
cv::Rect rect_g = DrawText(
|
cv::Rect rect_g = DrawText(
|
||||||
img, ss.str(), gravity, 5, 0,
|
img, ss.str(), gravity, 5, 0,
|
||||||
sign * (10 + rect_i.height + rect_a.height));
|
sign * (10 + rect_i.height + rect_a.height));
|
||||||
|
|
|
@ -89,10 +89,16 @@ MYNTEYE_NAMESPACE::StreamRequest select_request(
|
||||||
*ok = false;
|
*ok = false;
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
auto requests_display = requests;
|
||||||
|
if (Model::STANDARD == device->GetModel()) {
|
||||||
|
for (std::size_t i = 0; i < n; i++) {
|
||||||
|
requests_display[i].fps = 25;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
LOG(INFO) << "MYNT EYE requests:";
|
LOG(INFO) << "MYNT EYE requests:";
|
||||||
for (std::size_t i = 0; i < n; i++) {
|
for (std::size_t i = 0; i < n; i++) {
|
||||||
auto &&request = requests[i];
|
auto &&request = requests_display[i];
|
||||||
LOG(INFO) << " index: " << i
|
LOG(INFO) << " index: " << i
|
||||||
<< ", request: " << request;
|
<< ", request: " << request;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,13 +190,8 @@ std::size_t bytes_per_pixel(const Format &value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &os, const StreamRequest &request) {
|
std::ostream &operator<<(std::ostream &os, const StreamRequest &request) {
|
||||||
if (request.fps == 0) {
|
return os << "width: " << request.width << ", height: " << request.height
|
||||||
return os << "width: " << request.width << ", height: " << request.height
|
|
||||||
<< ", format: " << request.format;
|
|
||||||
} else {
|
|
||||||
return os << "width: " << request.width << ", height: " << request.height
|
|
||||||
<< ", format: " << request.format << ", fps: " << request.fps;
|
<< ", format: " << request.format << ", fps: " << request.fps;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *to_string(const CalibrationModel &model) {
|
const char *to_string(const CalibrationModel &model) {
|
||||||
|
|
|
@ -77,6 +77,8 @@
|
||||||
<rosparam file="$(find mynt_eye_ros_wrapper)/config/slam/vins_fusion.yaml" command="load" />
|
<rosparam file="$(find mynt_eye_ros_wrapper)/config/slam/vins_fusion.yaml" command="load" />
|
||||||
|
|
||||||
<param name="gravity" value="$(arg gravity)" />
|
<param name="gravity" value="$(arg gravity)" />
|
||||||
|
|
||||||
|
<param name="ros_output_framerate_cut" value="2" />
|
||||||
</node>
|
</node>
|
||||||
|
|
||||||
<!-- disable compressed depth plugin for image topics -->
|
<!-- disable compressed depth plugin for image topics -->
|
||||||
|
|
|
@ -58,7 +58,7 @@ Visualization Manager:
|
||||||
- Class: rviz/Group
|
- Class: rviz/Group
|
||||||
Displays:
|
Displays:
|
||||||
- Class: rviz/Image
|
- Class: rviz/Image
|
||||||
Enabled: false
|
Enabled: true
|
||||||
Image Topic: /mynteye/left/image_raw
|
Image Topic: /mynteye/left/image_raw
|
||||||
Max Value: 1
|
Max Value: 1
|
||||||
Median window: 5
|
Median window: 5
|
||||||
|
@ -68,7 +68,7 @@ Visualization Manager:
|
||||||
Queue Size: 1
|
Queue Size: 1
|
||||||
Transport Hint: raw
|
Transport Hint: raw
|
||||||
Unreliable: false
|
Unreliable: false
|
||||||
Value: false
|
Value: true
|
||||||
- Class: rviz/Image
|
- Class: rviz/Image
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Image Topic: /mynteye/right/image_raw
|
Image Topic: /mynteye/right/image_raw
|
||||||
|
@ -114,7 +114,7 @@ Visualization Manager:
|
||||||
- Class: rviz/Group
|
- Class: rviz/Group
|
||||||
Displays:
|
Displays:
|
||||||
- Class: rviz/Image
|
- Class: rviz/Image
|
||||||
Enabled: true
|
Enabled: false
|
||||||
Image Topic: /mynteye/disparity/image_raw
|
Image Topic: /mynteye/disparity/image_raw
|
||||||
Max Value: 1
|
Max Value: 1
|
||||||
Median window: 5
|
Median window: 5
|
||||||
|
@ -124,7 +124,7 @@ Visualization Manager:
|
||||||
Queue Size: 1
|
Queue Size: 1
|
||||||
Transport Hint: raw
|
Transport Hint: raw
|
||||||
Unreliable: false
|
Unreliable: false
|
||||||
Value: true
|
Value: false
|
||||||
- Class: rviz/Image
|
- Class: rviz/Image
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Image Topic: /mynteye/disparity/image_norm
|
Image Topic: /mynteye/disparity/image_norm
|
||||||
|
@ -154,7 +154,7 @@ Visualization Manager:
|
||||||
- Alpha: 1
|
- Alpha: 1
|
||||||
Autocompute Intensity Bounds: true
|
Autocompute Intensity Bounds: true
|
||||||
Autocompute Value Bounds:
|
Autocompute Value Bounds:
|
||||||
Max Value: 1.98300004
|
Max Value: 2.1099999
|
||||||
Min Value: 0
|
Min Value: 0
|
||||||
Value: true
|
Value: true
|
||||||
Axis: X
|
Axis: X
|
||||||
|
@ -223,7 +223,7 @@ Visualization Manager:
|
||||||
Views:
|
Views:
|
||||||
Current:
|
Current:
|
||||||
Class: rviz/Orbit
|
Class: rviz/Orbit
|
||||||
Distance: 2.80799317
|
Distance: 2.23245931
|
||||||
Enable Stereo Rendering:
|
Enable Stereo Rendering:
|
||||||
Stereo Eye Separation: 0.0599999987
|
Stereo Eye Separation: 0.0599999987
|
||||||
Stereo Focal Distance: 1
|
Stereo Focal Distance: 1
|
||||||
|
@ -238,10 +238,10 @@ Visualization Manager:
|
||||||
Invert Z Axis: false
|
Invert Z Axis: false
|
||||||
Name: Current View
|
Name: Current View
|
||||||
Near Clip Distance: 0.00999999978
|
Near Clip Distance: 0.00999999978
|
||||||
Pitch: 0.520203829
|
Pitch: 0.180204123
|
||||||
Target Frame: <Fixed Frame>
|
Target Frame: <Fixed Frame>
|
||||||
Value: Orbit (rviz)
|
Value: Orbit (rviz)
|
||||||
Yaw: 4.3935833
|
Yaw: 3.14358234
|
||||||
Saved: ~
|
Saved: ~
|
||||||
Window Geometry:
|
Window Geometry:
|
||||||
Depth:
|
Depth:
|
||||||
|
@ -259,7 +259,7 @@ Window Geometry:
|
||||||
collapsed: false
|
collapsed: false
|
||||||
LeftRect:
|
LeftRect:
|
||||||
collapsed: false
|
collapsed: false
|
||||||
QMainWindow State: 000000ff00000000fd00000004000000000000026500000378fc020000000efb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000378000000d600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb00000008004c00650066007402000007350000024a0000024e00000190fb00000010004c006500660074005200650063007402000001bd000002170000024e00000190fb00000012005200690067006800740052006500630074020000040c000002170000024f00000190fb0000000a0044006500700074006802000002160000024c0000024f00000190fb0000001200440069007300700061007200690074007903000007410000017c0000024e0000018ffb0000001a004400690073007000610072006900740079004e006f0072006d03000006b7000002170000025100000190000000010000010f00000378fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fc0000002800000378000000ac00fffffffa000000010100000002fb0000000a005200690067006800740000000000ffffffff0000005700fffffffb0000000a0056006900650077007301000006300000010f0000010f00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000073f0000003efc0100000002fb0000000800540069006d006501000000000000073f0000030000fffffffb0000000800540069006d00650100000000000004500000000000000000000003bf0000037800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
|
QMainWindow State: 000000ff00000000fd00000004000000000000026500000378fc020000000efb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000002800000378000000d600fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb00000008004c00650066007403000002e00000009e000001ec00000153fb00000010004c006500660074005200650063007402000001bd000002170000024e00000190fb00000012005200690067006800740052006500630074020000040c000002170000024f00000190fb0000000a0044006500700074006802000002160000024c0000024f00000190fb00000012004400690073007000610072006900740079020000047200000101000001c100000130fb0000001a004400690073007000610072006900740079004e006f0072006d030000060900000246000001e500000154000000010000010f00000378fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fc0000002800000378000000ac00fffffffa000000010100000002fb0000000a0052006900670068007402000002f50000021c000001de0000017cfb0000000a0056006900650077007301000006300000010f0000010f00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000009050000003efc0100000002fb0000000800540069006d00650100000000000009050000030000fffffffb0000000800540069006d00650100000000000004500000000000000000000005850000037800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
|
||||||
Right:
|
Right:
|
||||||
collapsed: false
|
collapsed: false
|
||||||
RightRect:
|
RightRect:
|
||||||
|
@ -272,6 +272,6 @@ Window Geometry:
|
||||||
collapsed: false
|
collapsed: false
|
||||||
Views:
|
Views:
|
||||||
collapsed: false
|
collapsed: false
|
||||||
Width: 1855
|
Width: 2309
|
||||||
X: 65
|
X: 65
|
||||||
Y: 24
|
Y: 24
|
||||||
|
|
|
@ -58,6 +58,9 @@ inline double compute_time(const double end, const double start) {
|
||||||
class ROSWrapperNodelet : public nodelet::Nodelet {
|
class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
public:
|
public:
|
||||||
ROSWrapperNodelet() {
|
ROSWrapperNodelet() {
|
||||||
|
skip_tag = -1;
|
||||||
|
skip_tmp_left_tag = 0;
|
||||||
|
skip_tmp_right_tag = 0;
|
||||||
unit_hard_time *= 10;
|
unit_hard_time *= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,6 +411,12 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ros_output_framerate = -1;
|
||||||
|
private_nh_.getParamCached("ros_output_framerate_cut", ros_output_framerate);
|
||||||
|
if (ros_output_framerate > 0 && ros_output_framerate < 7) {
|
||||||
|
skip_tag = ros_output_framerate;
|
||||||
|
}
|
||||||
|
|
||||||
// services
|
// services
|
||||||
|
|
||||||
const std::string DEVICE_INFO_SERVICE = "get_info";
|
const std::string DEVICE_INFO_SERVICE = "get_info";
|
||||||
|
@ -672,6 +681,14 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
||||||
ros::Time stamp = checkUpTimeStamp(
|
ros::Time stamp = checkUpTimeStamp(
|
||||||
data.img->timestamp, Stream::LEFT);
|
data.img->timestamp, Stream::LEFT);
|
||||||
|
if (skip_tag > 0) {
|
||||||
|
if (skip_tmp_left_tag == 0) {
|
||||||
|
skip_tmp_left_tag = skip_tag;
|
||||||
|
} else {
|
||||||
|
skip_tmp_left_tag--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
publishCamera(Stream::LEFT, data, left_count_, stamp);
|
publishCamera(Stream::LEFT, data, left_count_, stamp);
|
||||||
publishMono(Stream::LEFT, data, left_count_, stamp);
|
publishMono(Stream::LEFT, data, left_count_, stamp);
|
||||||
NODELET_DEBUG_STREAM(
|
NODELET_DEBUG_STREAM(
|
||||||
|
@ -696,6 +713,14 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
// ros::Time stamp = hardTimeToSoftTime(data.img->timestamp);
|
||||||
ros::Time stamp = checkUpTimeStamp(
|
ros::Time stamp = checkUpTimeStamp(
|
||||||
data.img->timestamp, Stream::RIGHT);
|
data.img->timestamp, Stream::RIGHT);
|
||||||
|
if (skip_tag > 0) {
|
||||||
|
if (skip_tmp_right_tag == 0) {
|
||||||
|
skip_tmp_right_tag = skip_tag;
|
||||||
|
} else {
|
||||||
|
skip_tmp_right_tag--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
publishCamera(Stream::RIGHT, data, right_count_, stamp);
|
publishCamera(Stream::RIGHT, data, right_count_, stamp);
|
||||||
publishMono(Stream::RIGHT, data, right_count_, stamp);
|
publishMono(Stream::RIGHT, data, right_count_, stamp);
|
||||||
NODELET_DEBUG_STREAM(
|
NODELET_DEBUG_STREAM(
|
||||||
|
@ -1603,6 +1628,9 @@ class ROSWrapperNodelet : public nodelet::Nodelet {
|
||||||
int frame_rate_;
|
int frame_rate_;
|
||||||
bool is_intrinsics_enable_;
|
bool is_intrinsics_enable_;
|
||||||
std::vector<ImuData> imu_align_;
|
std::vector<ImuData> imu_align_;
|
||||||
|
int skip_tag;
|
||||||
|
int skip_tmp_left_tag;
|
||||||
|
int skip_tmp_right_tag;
|
||||||
|
|
||||||
std::uint64_t unit_hard_time = std::numeric_limits<std::uint32_t>::max();
|
std::uint64_t unit_hard_time = std::numeric_limits<std::uint32_t>::max();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user