rtabmapviz: if odom topic doesn't have child_frame_id set, log a warning.

This commit is contained in:
matlabbe
2021-01-22 14:18:30 -05:00
parent 21090899d4
commit 2c635f7242
+24 -3
View File
@@ -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
{