diff --git a/moveit_ros/visualization/motion_planning_rviz_plugin/CMakeLists.txt b/moveit_ros/visualization/motion_planning_rviz_plugin/CMakeLists.txt index 9594eac135..3e1dbca643 100644 --- a/moveit_ros/visualization/motion_planning_rviz_plugin/CMakeLists.txt +++ b/moveit_ros/visualization/motion_planning_rviz_plugin/CMakeLists.txt @@ -32,7 +32,6 @@ add_library(moveit_motion_planning_rviz_plugin_core SHARED ${SOURCE_FILES} ${HEA set_target_properties(moveit_motion_planning_rviz_plugin_core PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") target_link_libraries(moveit_motion_planning_rviz_plugin_core moveit_rviz_plugin_render_tools moveit_planning_scene_rviz_plugin) ament_target_dependencies(moveit_motion_planning_rviz_plugin_core - Boost moveit_ros_robot_interaction moveit_ros_planning_interface moveit_ros_warehouse @@ -40,7 +39,6 @@ ament_target_dependencies(moveit_motion_planning_rviz_plugin_core rviz_ogre_vendor Qt5 pluginlib - rviz_ogre_vendor ) target_include_directories(moveit_motion_planning_rviz_plugin_core PRIVATE "${OGRE_PREFIX_DIR}/include") @@ -48,7 +46,6 @@ add_library(moveit_motion_planning_rviz_plugin SHARED src/plugin_init.cpp) set_target_properties(moveit_motion_planning_rviz_plugin PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") target_link_libraries(moveit_motion_planning_rviz_plugin moveit_motion_planning_rviz_plugin_core) ament_target_dependencies(moveit_motion_planning_rviz_plugin - Boost moveit_ros_robot_interaction moveit_ros_warehouse pluginlib diff --git a/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_display.cpp b/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_display.cpp index 12588827e6..fb8b43c7bd 100644 --- a/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_display.cpp +++ b/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_display.cpp @@ -65,10 +65,6 @@ #include #include -#include -#include -#include - #include #include "ui_motion_planning_rviz_plugin_frame.h" @@ -432,17 +428,20 @@ void MotionPlanningDisplay::changedMetricsTextHeight() void MotionPlanningDisplay::displayTable(const std::map& values, const Ogre::ColourValue& color, const Ogre::Vector3& pos, const Ogre::Quaternion& orient) { - // the line we want to render - std::stringstream ss; - for (const std::pair& value : values) - ss << boost::format("%-10s %-4.2f") % value.first % value.second << '\n'; - - if (ss.str().empty()) + if (values.empty()) { text_to_display_->setVisible(false); return; } + // the line we want to render + std::stringstream ss; + ss.setf(std::ios_base::fixed); + ss.precision(2); + + for (const auto& [label, value] : values) + ss << label << ':' << value << '\n'; + text_to_display_->setCaption(ss.str()); text_to_display_->setColor(color); text_display_scene_node_->setPosition(pos); diff --git a/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_scenes.cpp b/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_scenes.cpp index 280e83c9c6..faf3a538c5 100644 --- a/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_scenes.cpp +++ b/moveit_ros/visualization/motion_planning_rviz_plugin/src/motion_planning_frame_scenes.cpp @@ -53,8 +53,6 @@ #include "ui_motion_planning_rviz_plugin_frame.h" -#include - #include namespace moveit_rviz_plugin