mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-12 20:49:50 +08:00
data_player: rate is now a ratio of the database stamps
This commit is contained in:
@@ -105,7 +105,7 @@ int main(int argc, char** argv)
|
|||||||
std::string odomFrameId = "odom";
|
std::string odomFrameId = "odom";
|
||||||
std::string cameraFrameId = "camera_optical_link";
|
std::string cameraFrameId = "camera_optical_link";
|
||||||
std::string scanFrameId = "base_laser_link";
|
std::string scanFrameId = "base_laser_link";
|
||||||
double rate = -1.0f;
|
double rate = 1.0f;
|
||||||
std::string databasePath = "";
|
std::string databasePath = "";
|
||||||
bool publishTf = true;
|
bool publishTf = true;
|
||||||
int startId = 0;
|
int startId = 0;
|
||||||
@@ -115,7 +115,7 @@ int main(int argc, char** argv)
|
|||||||
pnh.param("odom_frame_id", odomFrameId, odomFrameId);
|
pnh.param("odom_frame_id", odomFrameId, odomFrameId);
|
||||||
pnh.param("camera_frame_id", cameraFrameId, cameraFrameId);
|
pnh.param("camera_frame_id", cameraFrameId, cameraFrameId);
|
||||||
pnh.param("scan_frame_id", scanFrameId, scanFrameId);
|
pnh.param("scan_frame_id", scanFrameId, scanFrameId);
|
||||||
pnh.param("rate", rate, rate); // Set -1 to use database stamps
|
pnh.param("rate", rate, rate); // Ratio of the database stamps
|
||||||
pnh.param("database", databasePath, databasePath);
|
pnh.param("database", databasePath, databasePath);
|
||||||
pnh.param("publish_tf", publishTf, publishTf);
|
pnh.param("publish_tf", publishTf, publishTf);
|
||||||
pnh.param("start_id", startId, startId);
|
pnh.param("start_id", startId, startId);
|
||||||
@@ -149,7 +149,7 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
ROS_INFO("database = %s", databasePath.c_str());
|
ROS_INFO("database = %s", databasePath.c_str());
|
||||||
|
|
||||||
rtabmap::DBReader reader(databasePath, rate, false, false, false, startId);
|
rtabmap::DBReader reader(databasePath, -rate, false, false, false, startId);
|
||||||
if(!reader.init())
|
if(!reader.init())
|
||||||
{
|
{
|
||||||
ROS_ERROR("Cannot open database \"%s\".", databasePath.c_str());
|
ROS_ERROR("Cannot open database \"%s\".", databasePath.c_str());
|
||||||
|
|||||||
Reference in New Issue
Block a user