mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 18:17:47 +08:00
Windows CI: make vcpkg download compatible with draft release (#1727)
* Windows CI: make vcpkg download compatible with draft release * forcing nvdia driver dll to be ignored in fixup_bundle * disabling opencv cudec and python * disabling rtabmap-console --version on cuda build * Added assert when bad imu data is provided. Added checks when zed sdk is returning nan imu data. * Updated zed sdk5 resolution and quality * Updated zed sdk5 resolution and quality * Fixing parameters reloaded when testing camera. Also fixed app freezing when closing Preferences dialog after using test camera dialog * cleanup and debug logs * Added dialogs when starting/stopping sensors/detection. Fixed nullptr bug on MainWindow::handleEvents * renamed * found a way to expose ZED model downloads * Updated default config path on Windows * Fixed extra endline in file logging (windows) * Fixed camera local transform when used with lidar and odomSensor * CI(macos): build g2o from source with OpenMP (libomp include/link fix) * Mac: added ceres dep, fixed omp not found by cmake * Mac: bundle orbbec extensions * stripping rpath of orbbec's extensions * cleanup * Realsense2 error as error (not warning) * Fixed config ownership changed to root when sarting in sudo. LidarVLP16: fixed crash on Mac by reimplementing our own socket threading * LidarVLP16: own socket implementation only for Mac (linux and windows use original PCL's reader)
This commit is contained in:
@@ -114,7 +114,6 @@ SensorCaptureThread::SensorCaptureThread(
|
||||
_camera(camera),
|
||||
_odomSensor(odomSensor),
|
||||
_lidar(lidar),
|
||||
_extrinsicsOdomToCamera(extrinsics * CameraModel::opticalRotation()),
|
||||
_odomAsGt(false),
|
||||
_poseTimeOffset(poseTimeOffset),
|
||||
_poseScaleFactor(poseScaleFactor),
|
||||
@@ -153,10 +152,14 @@ SensorCaptureThread::SensorCaptureThread(
|
||||
{
|
||||
if(_camera)
|
||||
{
|
||||
if(_odomSensor == _camera && _extrinsicsOdomToCamera.isNull())
|
||||
if(_odomSensor == _camera && extrinsics.isNull())
|
||||
{
|
||||
_extrinsicsOdomToCamera.setIdentity();
|
||||
}
|
||||
else
|
||||
{
|
||||
_extrinsicsOdomToCamera = extrinsics * CameraModel::opticalRotation();
|
||||
}
|
||||
UASSERT(!_extrinsicsOdomToCamera.isNull());
|
||||
UDEBUG("_extrinsicsOdomToCamera=%s", _extrinsicsOdomToCamera.prettyPrint().c_str());
|
||||
}
|
||||
@@ -492,20 +495,26 @@ void SensorCaptureThread::mainLoop()
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust local transform of the camera based on the pose frame
|
||||
// Adjust local transform of the camera(s) based on the pose frame. The correction
|
||||
// and odom->camera extrinsics are frame-level, so apply the same prefix to each
|
||||
// camera while keeping its own local transform (multi-camera supported).
|
||||
if(!data.cameraModels().empty())
|
||||
{
|
||||
UASSERT(data.cameraModels().size()==1);
|
||||
CameraModel model = data.cameraModels()[0];
|
||||
model.setLocalTransform(cameraCorrection*_extrinsicsOdomToCamera);
|
||||
data.setCameraModel(model);
|
||||
std::vector<CameraModel> models = data.cameraModels();
|
||||
for(size_t i=0; i<models.size(); ++i)
|
||||
{
|
||||
models[i].setLocalTransform(cameraCorrection*_extrinsicsOdomToCamera*models[i].localTransform());
|
||||
}
|
||||
data.setCameraModels(models);
|
||||
}
|
||||
else if(!data.stereoCameraModels().empty())
|
||||
{
|
||||
UASSERT(data.stereoCameraModels().size()==1);
|
||||
StereoCameraModel model = data.stereoCameraModels()[0];
|
||||
model.setLocalTransform(cameraCorrection*_extrinsicsOdomToCamera);
|
||||
data.setStereoCameraModel(model);
|
||||
std::vector<StereoCameraModel> models = data.stereoCameraModels();
|
||||
for(size_t i=0; i<models.size(); ++i)
|
||||
{
|
||||
models[i].setLocalTransform(cameraCorrection*_extrinsicsOdomToCamera*models[i].localTransform());
|
||||
}
|
||||
data.setStereoCameraModels(models);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -530,15 +539,21 @@ void SensorCaptureThread::mainLoop()
|
||||
info.odomPose.setNull();
|
||||
}
|
||||
|
||||
if(!data.imageCompressed().empty() || !data.imageRaw().empty() || !data.laserScanRaw().empty() || (dynamic_cast<DBReader*>(_camera) != 0 && data.id()>0)) // intermediate nodes could not have image set
|
||||
if(this->isKilled())
|
||||
{
|
||||
// A kill was requested (e.g. while we were blocked capturing this frame): don't
|
||||
// publish anything so we never deliver events to handlers that are being torn down.
|
||||
}
|
||||
else if(!data.imageCompressed().empty() || !data.imageRaw().empty() || !data.laserScanRaw().empty() || (dynamic_cast<DBReader*>(_camera) != 0 && data.id()>0)) // intermediate nodes could not have image set
|
||||
{
|
||||
postUpdate(&data, &info);
|
||||
info.cameraName = _lidar?_lidar->getSerial():_camera->getSerial();
|
||||
info.timeTotal = totalTime.ticks();
|
||||
this->post(new SensorEvent(data, info));
|
||||
}
|
||||
else if(!this->isKilled())
|
||||
else
|
||||
{
|
||||
// Not killed but no data: end of stream. Signal consumers once, then stop.
|
||||
UWARN("no more data...");
|
||||
this->kill();
|
||||
this->post(new SensorEvent());
|
||||
|
||||
Reference in New Issue
Block a user