mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-11 12:09:51 +08:00
Fixed build with 0.11.8
This commit is contained in:
+10
-4
@@ -41,8 +41,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <rtabmap_ros/SetGoal.h>
|
#include <rtabmap_ros/SetGoal.h>
|
||||||
#include <rtabmap/utilite/ULogger.h>
|
#include <rtabmap/utilite/ULogger.h>
|
||||||
#include <rtabmap/utilite/UStl.h>
|
#include <rtabmap/utilite/UStl.h>
|
||||||
|
#include <rtabmap/utilite/UThread.h>
|
||||||
#include <rtabmap/core/util3d.h>
|
#include <rtabmap/core/util3d.h>
|
||||||
#include <rtabmap/core/DBReader.h>
|
#include <rtabmap/core/DBReader.h>
|
||||||
|
#include <rtabmap/core/OdometryEvent.h>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
bool paused = false;
|
bool paused = false;
|
||||||
@@ -122,7 +124,7 @@ int main(int argc, char** argv)
|
|||||||
ROS_INFO("rate = %f", rate);
|
ROS_INFO("rate = %f", rate);
|
||||||
ROS_INFO("publish_tf = %s", publishTf?"true":"false");
|
ROS_INFO("publish_tf = %s", publishTf?"true":"false");
|
||||||
|
|
||||||
rtabmap::DBReader reader(databasePath, rate);
|
rtabmap::DBReader reader(databasePath, rate, false, false, false, startId);
|
||||||
|
|
||||||
if(databasePath.empty())
|
if(databasePath.empty())
|
||||||
{
|
{
|
||||||
@@ -130,7 +132,7 @@ int main(int argc, char** argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!reader.init(startId))
|
if(!reader.init())
|
||||||
{
|
{
|
||||||
ROS_ERROR("Cannot open database \"%s\".", databasePath.c_str());
|
ROS_ERROR("Cannot open database \"%s\".", databasePath.c_str());
|
||||||
return -1;
|
return -1;
|
||||||
@@ -154,7 +156,9 @@ int main(int argc, char** argv)
|
|||||||
tf2_ros::TransformBroadcaster tfBroadcaster;
|
tf2_ros::TransformBroadcaster tfBroadcaster;
|
||||||
|
|
||||||
UTimer timer;
|
UTimer timer;
|
||||||
rtabmap::OdometryEvent odom = reader.getNextData();
|
rtabmap::CameraInfo info;
|
||||||
|
rtabmap::SensorData data = reader.takeImage(&info);
|
||||||
|
rtabmap::OdometryEvent odom(data, info.odomPose, info.odomCovariance);
|
||||||
double acquisitionTime = timer.ticks();
|
double acquisitionTime = timer.ticks();
|
||||||
while(ros::ok() && odom.data().id())
|
while(ros::ok() && odom.data().id())
|
||||||
{
|
{
|
||||||
@@ -479,7 +483,9 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
timer.restart();
|
timer.restart();
|
||||||
odom = reader.getNextData();
|
info = rtabmap::CameraInfo();
|
||||||
|
data = reader.takeImage(&info);
|
||||||
|
odom = rtabmap::OdometryEvent(data, info.odomPose, info.odomCovariance);
|
||||||
acquisitionTime = timer.ticks();
|
acquisitionTime = timer.ticks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user