diff --git a/nav2_rviz_plugins/CMakeLists.txt b/nav2_rviz_plugins/CMakeLists.txt index 3272afe849..bd9059d698 100644 --- a/nav2_rviz_plugins/CMakeLists.txt +++ b/nav2_rviz_plugins/CMakeLists.txt @@ -72,7 +72,6 @@ target_link_libraries(${library_name} PUBLIC ${std_msgs_TARGETS} tf2_geometry_msgs::tf2_geometry_msgs ${visualization_msgs_TARGETS} - # TODO(clalancette): We aren't linking against any Qt libraries here? ) target_link_libraries(${library_name} PRIVATE ament_index_cpp::ament_index_cpp diff --git a/nav2_rviz_plugins/src/costmap_cost_tool.cpp b/nav2_rviz_plugins/src/costmap_cost_tool.cpp index 98c1a934a7..5873b54f45 100644 --- a/nav2_rviz_plugins/src/costmap_cost_tool.cpp +++ b/nav2_rviz_plugins/src/costmap_cost_tool.cpp @@ -46,6 +46,9 @@ void CostmapCostTool::onInitialize() node_ptr_ = context_->getRosNodeAbstraction().lock(); if (node_ptr_ == nullptr) { // The node no longer exists, so just don't initialize + RCLCPP_ERROR( + rclcpp::get_logger("costmap_cost_tool"), + "Underlying ROS node no longer exists, initialization failed"); return; } rclcpp::Node::SharedPtr node = node_ptr_->get_raw_node(); diff --git a/nav2_rviz_plugins/src/docking_panel.cpp b/nav2_rviz_plugins/src/docking_panel.cpp index 08567f17ea..7daa327079 100644 --- a/nav2_rviz_plugins/src/docking_panel.cpp +++ b/nav2_rviz_plugins/src/docking_panel.cpp @@ -122,6 +122,9 @@ void DockingPanel::onInitialize() node_ptr_ = getDisplayContext()->getRosNodeAbstraction().lock(); if (node_ptr_ == nullptr) { // The node no longer exists, so just don't initialize + RCLCPP_ERROR( + rclcpp::get_logger("docking_panel"), + "Underlying ROS node no longer exists, initialization failed"); return; } rclcpp::Node::SharedPtr node = node_ptr_->get_raw_node(); diff --git a/nav2_rviz_plugins/src/nav2_panel.cpp b/nav2_rviz_plugins/src/nav2_panel.cpp index 995390f03b..e10f1eccdb 100644 --- a/nav2_rviz_plugins/src/nav2_panel.cpp +++ b/nav2_rviz_plugins/src/nav2_panel.cpp @@ -781,6 +781,9 @@ Nav2Panel::onInitialize() node_ptr_ = getDisplayContext()->getRosNodeAbstraction().lock(); if (node_ptr_ == nullptr) { // The node no longer exists, so just don't initialize + RCLCPP_ERROR( + rclcpp::get_logger("nav2_panel"), + "Underlying ROS node no longer exists, initialization failed"); return; } rclcpp::Node::SharedPtr node = node_ptr_->get_raw_node();