mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-05 17:27:46 +08:00
Added tf_prefix to nodes using tf
This commit is contained in:
@@ -112,6 +112,7 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
||||
int queueSize = 10;
|
||||
bool publishTf = true;
|
||||
double tfDelay = 0.05; // 20 Hz
|
||||
std::string tfPrefix = "";
|
||||
bool stereoApproxSync = false;
|
||||
|
||||
// ROS related parameters (private)
|
||||
@@ -144,11 +145,28 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
|
||||
|
||||
pnh.param("publish_tf", publishTf, publishTf);
|
||||
pnh.param("tf_delay", tfDelay, tfDelay);
|
||||
pnh.param("tf_prefix", tfPrefix, tfPrefix);
|
||||
pnh.param("wait_for_transform", waitForTransform_, waitForTransform_);
|
||||
pnh.param("use_action_for_goal", useActionForGoal_, useActionForGoal_);
|
||||
pnh.param("gen_scan", genScan_, genScan_);
|
||||
pnh.param("gen_scan_max_depth", genScanMaxDepth_, genScanMaxDepth_);
|
||||
|
||||
if(!tfPrefix.empty())
|
||||
{
|
||||
if(!frameId_.empty())
|
||||
{
|
||||
frameId_ = tfPrefix+"/"+frameId_;
|
||||
}
|
||||
if(!mapFrameId_.empty())
|
||||
{
|
||||
mapFrameId_ = tfPrefix+"/"+mapFrameId_;
|
||||
}
|
||||
if(!odomFrameId_.empty())
|
||||
{
|
||||
odomFrameId_ = tfPrefix+"/"+odomFrameId_;
|
||||
}
|
||||
}
|
||||
|
||||
if(depthCameras <= 0 && subscribeDepth)
|
||||
{
|
||||
depthCameras = 1;
|
||||
|
||||
Reference in New Issue
Block a user