Skip to content

Commit d1e0b69

Browse files
committed
Check if frame exists to avoid spamming RViz's stderr
1 parent ee351ac commit d1e0b69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/occupancy_grid_display.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ void OccupancyGridDisplay::reset()
266266

267267
bool OccupancyGridDisplay::updateFromTF()
268268
{
269+
// Check if frame exists to avoid spamming the RViz console output
270+
std::string error{};
271+
if (context_->getFrameManager()->transformHasProblems(header_.frame_id, error)) {
272+
return false;
273+
}
274+
269275
// get tf transform
270276
Ogre::Vector3 pos;
271277
Ogre::Quaternion orient;

0 commit comments

Comments
 (0)