mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
rtabmapviz: if odom topic doesn't have child_frame_id set, log a warning.
This commit is contained in:
+24
-3
@@ -440,7 +440,14 @@ void GuiWrapper::commonDepthCallback(
|
||||
if(odomMsg.get())
|
||||
{
|
||||
odomHeader = odomMsg->header;
|
||||
frameId = odomMsg->child_frame_id;
|
||||
if(!odomMsg->child_frame_id.empty())
|
||||
{
|
||||
frameId = odomMsg->child_frame_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
ROS_WARN("Received odom topic with child_frame_id not set! Using \"%s\" as base frame.", frameId_.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -618,7 +625,14 @@ void GuiWrapper::commonStereoCallback(
|
||||
if(odomMsg.get())
|
||||
{
|
||||
odomHeader = odomMsg->header;
|
||||
frameId = odomMsg->child_frame_id;
|
||||
if(!odomMsg->child_frame_id.empty())
|
||||
{
|
||||
frameId = odomMsg->child_frame_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
ROS_WARN("Received odom topic with child_frame_id not set! Using \"%s\" as base frame.", frameId_.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -780,7 +794,14 @@ void GuiWrapper::commonLaserScanCallback(
|
||||
if(odomMsg.get())
|
||||
{
|
||||
odomHeader = odomMsg->header;
|
||||
frameId = odomMsg->child_frame_id;
|
||||
if(!odomMsg->child_frame_id.empty())
|
||||
{
|
||||
frameId = odomMsg->child_frame_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
ROS_WARN("Received odom topic with child_frame_id not set! Using \"%s\" as base frame.", frameId_.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user