From 2a7f2604b2442e2a05ad47c7ce64f76fc03e8967 Mon Sep 17 00:00:00 2001 From: Aniket Datar Date: Sun, 3 Aug 2025 22:16:08 -0400 Subject: [PATCH] fixed the issue with the frame name if the namespace is empty --- src/dlio/odom.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dlio/odom.cc b/src/dlio/odom.cc index bceae37..d7ced26 100644 --- a/src/dlio/odom.cc +++ b/src/dlio/odom.cc @@ -176,12 +176,14 @@ void dlio::OdomNode::getParams() { // Get Node NS and Remove Leading Character std::string ns = ros::this_node::getNamespace(); ns.erase(0,1); - - // Concatenate Frame Name Strings - this->odom_frame = ns + "/" + this->odom_frame; - this->baselink_frame = ns + "/" + this->baselink_frame; - this->lidar_frame = ns + "/" + this->lidar_frame; - this->imu_frame = ns + "/" + this->imu_frame; + + if(!ns.empty()){ + // Concatenate Frame Name Strings + this->odom_frame = ns + "/" + this->odom_frame; + this->baselink_frame = ns + "/" + this->baselink_frame; + this->lidar_frame = ns + "/" + this->lidar_frame; + this->imu_frame = ns + "/" + this->imu_frame; + } // Deskew FLag ros::param::param("~dlio/pointcloud/deskew", this->deskew_, true);