mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
MainWindow: Odometry visualization not updated if msgs are received faster than they can be visualized. ZED: self-calibration set to true by default (should be true for ZED-M vio)
This commit is contained in:
@@ -1000,16 +1000,17 @@ SensorData CameraStereoZed::captureImage(CameraInfo * info)
|
||||
{
|
||||
UTimer timer;
|
||||
bool res = zed_->grab(rparam);
|
||||
while (src_ == CameraVideo::kUsbDevice && res && timer.elapsed() < 2.0)
|
||||
while (src_ == CameraVideo::kUsbDevice && res!=sl::SUCCESS && timer.elapsed() < 2.0)
|
||||
{
|
||||
// maybe there is a latency with the USB, try again in 10 ms (for the next 2 seconds)
|
||||
uSleep(10);
|
||||
res = zed_->grab(rparam);
|
||||
}
|
||||
if(!res)
|
||||
if(res==sl::SUCCESS)
|
||||
{
|
||||
// get left image
|
||||
sl::Mat tmp;zed_->retrieveImage(tmp,sl::VIEW_LEFT);
|
||||
sl::Mat tmp;
|
||||
zed_->retrieveImage(tmp,sl::VIEW_LEFT);
|
||||
cv::Mat rgbaLeft = slMat2cvMat(tmp);
|
||||
|
||||
cv::Mat left;
|
||||
|
||||
Reference in New Issue
Block a user