diff --git a/jsk_rviz_plugins/plugins_description.xml b/jsk_rviz_plugins/plugins_description.xml
index 7c28cf0a..a511b5bc 100644
--- a/jsk_rviz_plugins/plugins_description.xml
+++ b/jsk_rviz_plugins/plugins_description.xml
@@ -61,18 +61,18 @@
type="jsk_rviz_plugins::PictogramArrayDisplay"
base_class_type="rviz_common::Display">
- visualize jsk_rviz_plugins/msg/PictogramArray
+ visualize jsk_rviz_plugin_msgs/msg/PictogramArray
- jsk_rviz_plugins/msg/PictogramArray
+ jsk_rviz_plugin_msgs/msg/PictogramArray
- visualize jsk_rviz_plugins/msg/Pictogram
+ visualize jsk_rviz_plugin_msgs/msg/Pictogram
- jsk_rviz_plugins/msg/Pictogram
+ jsk_rviz_plugin_msgs/msg/Pictogram
@@ -184,7 +184,7 @@
Displays text as overlay
- jsk_rviz_plugins/msg/OverlayText
+ jsk_rviz_plugin_msgs/msg/OverlayText
Displays menu as overlay
- jsk_rviz_plugins/msg/OverlayMenu
+ jsk_rviz_plugin_msgs/msg/OverlayMenu
setValue(y);
+ left_property_->setValue(x);
}
void LinearGaugeDisplay::setPosition(int x, int y)
diff --git a/jsk_rviz_plugins/src/overlay_picker_tool.cpp b/jsk_rviz_plugins/src/overlay_picker_tool.cpp
index 653c5f66..3a79ea1d 100644
--- a/jsk_rviz_plugins/src/overlay_picker_tool.cpp
+++ b/jsk_rviz_plugins/src/overlay_picker_tool.cpp
@@ -54,6 +54,7 @@
#include "pie_chart_display.hpp"
#include "plotter_2d_display.hpp"
#include "rviz_utils.hpp"
+#include "string_display.hpp"
namespace jsk_rviz_plugins
{
@@ -101,6 +102,8 @@ bool OverlayPickerTool::handleDisplayClick(
} else {
if (startMovement(property, event, "overlay_text_display")) {
return true;
+ } else if (startMovement(property, event, "string_display")) {
+ return true;
} else if (startMovement(property, event, "plotter_2d_display")) {
return true;
} else if (startMovement(property, event, "pie_chart_display")) {
@@ -139,6 +142,8 @@ void OverlayPickerTool::onMove(rviz_common::ViewportMouseEvent & event)
if (target_property_) {
if (target_property_type_ == "overlay_text_display") {
movePosition(event);
+ } else if (target_property_type_ == "string_display") {
+ movePosition(event);
} else if (target_property_type_ == "plotter_2d_display") {
movePosition(event);
} else if (target_property_type_ == "pie_chart_display") {
@@ -163,6 +168,8 @@ void OverlayPickerTool::onRelease(rviz_common::ViewportMouseEvent & event)
if (target_property_) {
if (target_property_type_ == "overlay_text_display") {
setPosition(event);
+ } else if (target_property_type_ == "string_display") {
+ setPosition(event);
} else if (target_property_type_ == "plotter_2d_display") {
setPosition(event);
} else if (target_property_type_ == "pie_chart_display") {
diff --git a/jsk_rviz_plugins/src/pie_chart_display.cpp b/jsk_rviz_plugins/src/pie_chart_display.cpp
index 3ab531fd..24a4b2fc 100644
--- a/jsk_rviz_plugins/src/pie_chart_display.cpp
+++ b/jsk_rviz_plugins/src/pie_chart_display.cpp
@@ -260,23 +260,59 @@ void PieChartDisplay::updateSize()
mutex_.unlock();
}
-void PieChartDisplay::updateTop() { top_ = top_property_->getInt(); }
+void PieChartDisplay::updateTop()
+{
+ top_ = top_property_->getInt();
+ update_required_ = true;
+}
-void PieChartDisplay::updateLeft() { left_ = left_property_->getInt(); }
+void PieChartDisplay::updateLeft()
+{
+ left_ = left_property_->getInt();
+ update_required_ = true;
+}
-void PieChartDisplay::updateBGColor() { bg_color_ = bg_color_property_->getColor(); }
+void PieChartDisplay::updateBGColor()
+{
+ bg_color_ = bg_color_property_->getColor();
+ update_required_ = true;
+}
-void PieChartDisplay::updateFGColor() { fg_color_ = fg_color_property_->getColor(); }
+void PieChartDisplay::updateFGColor()
+{
+ fg_color_ = fg_color_property_->getColor();
+ update_required_ = true;
+}
-void PieChartDisplay::updateFGAlpha() { fg_alpha_ = fg_alpha_property_->getFloat() * 255.0; }
+void PieChartDisplay::updateFGAlpha()
+{
+ fg_alpha_ = fg_alpha_property_->getFloat() * 255.0;
+ update_required_ = true;
+}
-void PieChartDisplay::updateFGAlpha2() { fg_alpha2_ = fg_alpha2_property_->getFloat() * 255.0; }
+void PieChartDisplay::updateFGAlpha2()
+{
+ fg_alpha2_ = fg_alpha2_property_->getFloat() * 255.0;
+ update_required_ = true;
+}
-void PieChartDisplay::updateBGAlpha() { bg_alpha_ = bg_alpha_property_->getFloat() * 255.0; }
+void PieChartDisplay::updateBGAlpha()
+{
+ bg_alpha_ = bg_alpha_property_->getFloat() * 255.0;
+ update_required_ = true;
+}
-void PieChartDisplay::updateMinValue() { min_value_ = min_value_property_->getFloat(); }
+void PieChartDisplay::updateMinValue()
+{
+ min_value_ = min_value_property_->getFloat();
+ update_required_ = true;
+}
-void PieChartDisplay::updateMaxValue() { max_value_ = max_value_property_->getFloat(); }
+void PieChartDisplay::updateMaxValue()
+{
+ max_value_ = max_value_property_->getFloat();
+ update_required_ = true;
+}
void PieChartDisplay::updateTextSize()
{
@@ -287,9 +323,14 @@ void PieChartDisplay::updateTextSize()
font.setPointSize(text_size_);
caption_offset_ = QFontMetrics(font).height();
mutex_.unlock();
+ update_required_ = true;
}
-void PieChartDisplay::updateShowCaption() { show_caption_ = show_caption_property_->getBool(); }
+void PieChartDisplay::updateShowCaption()
+{
+ show_caption_ = show_caption_property_->getBool();
+ update_required_ = true;
+}
void PieChartDisplay::updateTopic()
{
@@ -305,13 +346,19 @@ void PieChartDisplay::updateAutoColorChange()
} else {
max_color_property_->hide();
}
+ update_required_ = true;
}
-void PieChartDisplay::updateMaxColor() { max_color_ = max_color_property_->getColor(); }
+void PieChartDisplay::updateMaxColor()
+{
+ max_color_ = max_color_property_->getColor();
+ update_required_ = true;
+}
void PieChartDisplay::updateClockwiseRotate()
{
clockwise_rotate_ = clockwise_rotate_property_->getBool();
+ update_required_ = true;
}
bool PieChartDisplay::isInRegion(int x, int y)
@@ -321,8 +368,8 @@ bool PieChartDisplay::isInRegion(int x, int y)
void PieChartDisplay::movePosition(int x, int y)
{
- top_ = y;
- left_ = x;
+ top_property_->setValue(y);
+ left_property_->setValue(x);
}
void PieChartDisplay::setPosition(int x, int y)
diff --git a/jsk_rviz_plugins/src/string_display.cpp b/jsk_rviz_plugins/src/string_display.cpp
index 07c1219e..e858c398 100644
--- a/jsk_rviz_plugins/src/string_display.cpp
+++ b/jsk_rviz_plugins/src/string_display.cpp
@@ -428,8 +428,8 @@ bool StringDisplay::isInRegion(int x, int y)
void StringDisplay::movePosition(int x, int y)
{
- top_ = y;
- left_ = x;
+ top_property_->setValue(y);
+ left_property_->setValue(x);
}
void StringDisplay::setPosition(int x, int y)