mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +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:
@@ -123,7 +123,7 @@ public:
|
||||
bool computeOdometry = false,
|
||||
float imageRate=0.0f,
|
||||
const Transform & localTransform = Transform::getIdentity(),
|
||||
bool selfCalibration = false);
|
||||
bool selfCalibration = true);
|
||||
CameraStereoZed(
|
||||
const std::string & svoFilePath,
|
||||
int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
bool computeOdometry = false,
|
||||
float imageRate=0.0f,
|
||||
const Transform & localTransform = Transform::getIdentity(),
|
||||
bool selfCalibration = false);
|
||||
bool selfCalibration = true);
|
||||
virtual ~CameraStereoZed();
|
||||
|
||||
virtual bool init(const std::string & calibrationFolder = ".", const std::string & cameraName = "");
|
||||
|
||||
@@ -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