mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-05 17:27:46 +08:00
Added test_two_kinects_one_map.launch. Removed tf_prefix parameter (frame_id, odom_frame_id and map_frame_id should be set directly)
This commit is contained in:
+4
-18
@@ -112,12 +112,14 @@ void OdometryROS::onInit()
|
||||
|
||||
Transform initialPose = Transform::getIdentity();
|
||||
std::string initialPoseStr;
|
||||
std::string tfPrefix;
|
||||
std::string configPath;
|
||||
pnh.param("frame_id", frameId_, frameId_);
|
||||
pnh.param("odom_frame_id", odomFrameId_, odomFrameId_);
|
||||
pnh.param("publish_tf", publishTf_, publishTf_);
|
||||
pnh.param("tf_prefix", tfPrefix, tfPrefix);
|
||||
if(pnh.hasParam("tf_prefix"))
|
||||
{
|
||||
ROS_ERROR("tf_prefix parameter has been removed, use directly odom_frame_id and frame_id parameters.");
|
||||
}
|
||||
pnh.param("wait_for_transform", waitForTransform_, waitForTransform_);
|
||||
pnh.param("wait_for_transform_duration", waitForTransformDuration_, waitForTransformDuration_);
|
||||
pnh.param("initial_pose", initialPoseStr, initialPoseStr); // "x y z roll pitch yaw"
|
||||
@@ -141,22 +143,6 @@ void OdometryROS::onInit()
|
||||
configPath = UDirectory::currentDir(true) + configPath;
|
||||
}
|
||||
|
||||
if(!tfPrefix.empty())
|
||||
{
|
||||
if(!frameId_.empty())
|
||||
{
|
||||
frameId_ = tfPrefix + "/" + frameId_;
|
||||
}
|
||||
if(!odomFrameId_.empty())
|
||||
{
|
||||
odomFrameId_ = tfPrefix + "/" + odomFrameId_;
|
||||
}
|
||||
if(!groundTruthFrameId_.empty())
|
||||
{
|
||||
groundTruthFrameId_ = tfPrefix + "/" + groundTruthFrameId_;
|
||||
}
|
||||
}
|
||||
|
||||
if(initialPoseStr.size())
|
||||
{
|
||||
std::vector<std::string> values = uListToVector(uSplit(initialPoseStr, ' '));
|
||||
|
||||
Reference in New Issue
Block a user