mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-09 03:27:45 +08:00
AppVeyor: updated realsense2 sdk to 2.40. CameraRealSense2: When GlobalTimeSync option is off, don't wait 35 ms for imu (and fails), just take the latest one directly (https://github.com/introlab/rtabmap/issues/614#issuecomment-732244439).
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@ install:
|
|||||||
- ECHO "Installed yaml-cpp:"
|
- ECHO "Installed yaml-cpp:"
|
||||||
- ps: "ls \"C:/Program Files/yaml-cpp\""
|
- ps: "ls \"C:/Program Files/yaml-cpp\""
|
||||||
# RealSense2
|
# RealSense2
|
||||||
- ps: wget 'https://github.com/IntelRealSense/librealsense/releases/download/v2.39.0/Intel.RealSense.SDK-WIN10-2.39.0.2337.exe' -outfile realsense2.exe
|
- ps: wget 'https://github.com/IntelRealSense/librealsense/releases/download/v2.40.0/Intel.RealSense.SDK-WIN10-2.40.0.2482.exe' -outfile realsense2.exe
|
||||||
- cmd: realsense2.exe /VERYSILENT
|
- cmd: realsense2.exe /VERYSILENT
|
||||||
- ECHO "Installed RealSense2:"
|
- ECHO "Installed RealSense2:"
|
||||||
- ps: "ls \"C:/Program Files (x86)/Intel RealSense SDK 2.0\""
|
- ps: "ls \"C:/Program Files (x86)/Intel RealSense SDK 2.0\""
|
||||||
|
|||||||
@@ -299,15 +299,18 @@ void CameraRealSense2::getPoseAndIMU(
|
|||||||
cv::Vec3d acc;
|
cv::Vec3d acc;
|
||||||
{
|
{
|
||||||
imuMutex_.lock();
|
imuMutex_.lock();
|
||||||
int waitTry = 0;
|
if(globalTimeSync_)
|
||||||
while(maxWaitTimeMs > 0 && accBuffer_.rbegin()->first < stamp && waitTry < maxWaitTimeMs)
|
|
||||||
{
|
{
|
||||||
imuMutex_.unlock();
|
int waitTry = 0;
|
||||||
++waitTry;
|
while(maxWaitTimeMs > 0 && accBuffer_.rbegin()->first < stamp && waitTry < maxWaitTimeMs)
|
||||||
uSleep(1);
|
{
|
||||||
imuMutex_.lock();
|
imuMutex_.unlock();
|
||||||
|
++waitTry;
|
||||||
|
uSleep(1);
|
||||||
|
imuMutex_.lock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(accBuffer_.rbegin()->first < stamp)
|
if(globalTimeSync_ && accBuffer_.rbegin()->first < stamp)
|
||||||
{
|
{
|
||||||
if(maxWaitTimeMs>0)
|
if(maxWaitTimeMs>0)
|
||||||
{
|
{
|
||||||
@@ -380,15 +383,18 @@ void CameraRealSense2::getPoseAndIMU(
|
|||||||
cv::Vec3d gyro;
|
cv::Vec3d gyro;
|
||||||
{
|
{
|
||||||
imuMutex_.lock();
|
imuMutex_.lock();
|
||||||
int waitTry = 0;
|
if(globalTimeSync_)
|
||||||
while(maxWaitTimeMs>0 && gyroBuffer_.rbegin()->first < stamp && waitTry < maxWaitTimeMs)
|
|
||||||
{
|
{
|
||||||
imuMutex_.unlock();
|
int waitTry = 0;
|
||||||
++waitTry;
|
while(maxWaitTimeMs>0 && gyroBuffer_.rbegin()->first < stamp && waitTry < maxWaitTimeMs)
|
||||||
uSleep(1);
|
{
|
||||||
imuMutex_.lock();
|
imuMutex_.unlock();
|
||||||
|
++waitTry;
|
||||||
|
uSleep(1);
|
||||||
|
imuMutex_.lock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(gyroBuffer_.rbegin()->first < stamp)
|
if(globalTimeSync_ && gyroBuffer_.rbegin()->first < stamp)
|
||||||
{
|
{
|
||||||
if(maxWaitTimeMs>0)
|
if(maxWaitTimeMs>0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user