Skip to content

Commit

Permalink
Remove boost from motion_planning_rviz_plugin (#2308)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Jahr <[email protected]>
  • Loading branch information
todoubaba and sjahr authored Aug 22, 2023
1 parent 7c95367 commit 05f3501
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,20 @@ 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
rviz2
rviz_ogre_vendor
Qt5
pluginlib
rviz_ogre_vendor
)
target_include_directories(moveit_motion_planning_rviz_plugin_core PRIVATE "${OGRE_PREFIX_DIR}/include")

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@
#include <moveit/robot_state/conversions.h>
#include <moveit/trajectory_processing/trajectory_tools.h>

#include <boost/format.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/trim.hpp>

#include <QShortcut>

#include "ui_motion_planning_rviz_plugin_frame.h"
Expand Down Expand Up @@ -432,17 +428,20 @@ void MotionPlanningDisplay::changedMetricsTextHeight()
void MotionPlanningDisplay::displayTable(const std::map<std::string, double>& 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<const std::string, double>& 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@

#include "ui_motion_planning_rviz_plugin_frame.h"

#include <boost/math/constants/constants.hpp>

#include <memory>

namespace moveit_rviz_plugin
Expand Down

0 comments on commit 05f3501

Please sign in to comment.