mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37: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())
|
if(odomMsg.get())
|
||||||
{
|
{
|
||||||
odomHeader = odomMsg->header;
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -618,7 +625,14 @@ void GuiWrapper::commonStereoCallback(
|
|||||||
if(odomMsg.get())
|
if(odomMsg.get())
|
||||||
{
|
{
|
||||||
odomHeader = odomMsg->header;
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -780,7 +794,14 @@ void GuiWrapper::commonLaserScanCallback(
|
|||||||
if(odomMsg.get())
|
if(odomMsg.get())
|
||||||
{
|
{
|
||||||
odomHeader = odomMsg->header;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user