plotter_2d_display.cpp
Go to the documentation of this file.
1 // -*- mode: c++; -*-
2 /*********************************************************************
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2014, JSK Lab
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of the JSK Lab nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *********************************************************************/
35 
36 #include "plotter_2d_display.h"
37 #include <OGRE/OgreHardwarePixelBuffer.h>
39 #include <rviz/display_context.h>
40 #include <QPainter>
41 
42 namespace jsk_rviz_plugins
43 {
45  : rviz::Display(), min_value_(0.0), max_value_(0.0)
46  {
48  "Topic", "",
49  ros::message_traits::datatype<std_msgs::Float32>(),
50  "std_msgs::Float32 topic to subscribe to.",
51  this, SLOT(updateTopic()));
52  show_value_property_ = new rviz::BoolProperty(
53  "Show Value", true,
54  "Show value on plotter",
55  this, SLOT(updateShowValue()));
56  buffer_length_property_ = new rviz::IntProperty(
57  "Buffer length", 100,
58  ros::message_traits::datatype<std_msgs::Float32>(),
59  this, SLOT(updateBufferSize()));
60  width_property_ = new rviz::IntProperty("width", 128,
61  "width of the plotter window",
62  this, SLOT(updateWidth()));
63  width_property_->setMin(1);
64  width_property_->setMax(2000);
65  height_property_ = new rviz::IntProperty("height", 128,
66  "height of the plotter window",
67  this, SLOT(updateHeight()));
68  height_property_->setMin(1);
69  height_property_->setMax(2000);
70  left_property_ = new rviz::IntProperty("left", 128,
71  "left of the plotter window",
72  this, SLOT(updateLeft()));
74  top_property_ = new rviz::IntProperty("top", 128,
75  "top of the plotter window",
76  this, SLOT(updateTop()));
78  auto_scale_property_ = new rviz::BoolProperty(
79  "auto scale", true,
80  "enable auto scale",
81  this, SLOT(updateAutoScale()));
83  "max value", 1.0,
84  "max value, used only if auto scale is disabled",
85  this, SLOT(updateMaxValue()));
87  "min value", -1.0,
88  "min value, used only if auto scale is disabled",
89  this, SLOT(updateMinValue()));
91  "foreground color", QColor(25, 255, 240),
92  "color to draw line",
93  this, SLOT(updateFGColor()));
95  "foreground alpha", 0.7,
96  "alpha belnding value for foreground",
97  this, SLOT(updateFGAlpha()));
101  "background color", QColor(0, 0, 0),
102  "background color",
103  this, SLOT(updateBGColor()));
105  "backround alpha", 0.0,
106  "alpha belnding value for background",
107  this, SLOT(updateBGAlpha()));
110  line_width_property_ = new rviz::IntProperty("linewidth", 1,
111  "linewidth of the plot",
112  this, SLOT(updateLineWidth()));
113  line_width_property_->setMin(1);
114  line_width_property_->setMax(1000);
115  show_border_property_ = new rviz::BoolProperty(
116  "border", true,
117  "show border or not",
118  this, SLOT(updateShowBorder()));
119  text_size_property_ = new rviz::IntProperty("text size", 12,
120  "text size of the caption",
121  this, SLOT(updateTextSize()));
122  auto_text_size_in_plot_property_ = new rviz::BoolProperty("auto text size in plot", true,
123  "automatiacally adjust text size of the value in plot",
124  this, SLOT(updateAutoTextSizeInPlot()));
125  text_size_in_plot_property_ = new rviz::IntProperty("text size in plot", 12,
126  "text size of the value in plot",
127  this, SLOT(updateTextSizeInPlot()));
131  "show caption", true,
132  "show caption or not",
133  this, SLOT(updateShowCaption()));
134  update_interval_property_ = new rviz::FloatProperty(
135  "update interval", 0.04,
136  "update interval of the plotter",
137  this, SLOT(updateUpdateInterval()));
138  update_interval_property_->setMin(0.0);
139  update_interval_property_->setMax(100);
141  = new rviz::BoolProperty("auto color change",
142  false,
143  "change the color automatically",
144  this, SLOT(updateAutoColorChange()));
146  = new rviz::ColorProperty(
147  "max color",
148  QColor(255, 0, 0),
149  "only used if auto color change is set to True.",
150  this, SLOT(updateMaxColor()));
151  }
152 
154  {
155  onDisable();
156  // delete update_topic_property_;
157  // delete buffer_length_property_;
158  // delete fg_color_property_;
159  // delete bg_color_property_;
160  // delete fg_alpha_property_;
161  // delete bg_alpha_property_;
162  // delete top_property_;
163  // delete left_property_;
164  // delete width_property_;
165  // delete height_property_;
166  // delete line_width_property_;
167  // delete show_border_property_;
168  // delete auto_color_change_property_;
169  // delete max_color_property_;
170  // delete update_interval_property_;
171  // delete show_caption_property_;
172  // delete text_size_property_;
173  // delete min_value_property_;
174  // delete max_value_property_;
175  // delete auto_color_change_property_;
176  }
177 
179  {
180  buffer_.resize(buffer_length_);
181  if (min_value_ == 0.0 && max_value_ == 0.0) {
182  min_value_ = -1.0;
183  max_value_ = 1.0;
184  }
185  for (size_t i = 0; i < buffer_length_; i++) {
186  buffer_[i] = 0.0;
187  }
188  }
189 
191  {
192  static int count = 0;
194  ss << "Plotter2DDisplayObject" << count++;
195  overlay_.reset(new OverlayObject(ss.str()));
197  onEnable();
198  updateShowValue();
199  updateWidth();
200  updateHeight();
201  updateLeft();
202  updateTop();
203  updateFGColor();
204  updateBGColor();
205  updateFGAlpha();
206  updateBGAlpha();
207  updateLineWidth();
211  updateMaxColor();
213  updateTextSize();
214  updateAutoScale();
215  updateMinValue();
216  updateMaxValue();
219  overlay_->updateTextureSize(width_property_->getInt(),
221  }
222 
224  {
225  QColor fg_color(fg_color_);
226  QColor bg_color(bg_color_);
227 
228  fg_color.setAlpha(fg_alpha_);
229  bg_color.setAlpha(bg_alpha_);
230 
231  if (auto_color_change_) {
232  double r
233  = std::min(std::max((buffer_[buffer_.size() - 1] - min_value_) / (max_value_ - min_value_),
234  0.0), 1.0);
235  if (r > 0.3) {
236  double r2 = (r - 0.3) / 0.7;
237  fg_color.setRed((max_color_.red() - fg_color_.red()) * r2
238  + fg_color_.red());
239  fg_color.setGreen((max_color_.green() - fg_color_.green()) * r2
240  + fg_color_.green());
241  fg_color.setBlue((max_color_.blue() - fg_color_.blue()) * r2
242  + fg_color_.blue());
243  }
244  }
245 
246  {
247  ScopedPixelBuffer buffer = overlay_->getBuffer();
248  QImage Hud = buffer.getQImage(*overlay_);
249  // initilize by the background color
250  for (int i = 0; i < overlay_->getTextureWidth(); i++) {
251  for (int j = 0; j < overlay_->getTextureHeight(); j++) {
252  Hud.setPixel(i, j, bg_color.rgba());
253  }
254  }
255  // paste in HUD speedometer. I resize the image and offset it by 8 pixels from
256  // the bottom left edge of the render window
257  QPainter painter( &Hud );
258  painter.setRenderHint(QPainter::Antialiasing, true);
259  painter.setPen(QPen(fg_color, line_width_, Qt::SolidLine));
260 
261  uint16_t w = overlay_->getTextureWidth();
262  uint16_t h = overlay_->getTextureHeight() - caption_offset_;
263 
264  double margined_max_value = max_value_ + (max_value_ - min_value_) / 2;
265  double margined_min_value = min_value_ - (max_value_ - min_value_) / 2;
266 
267  for (size_t i = 1; i < buffer_length_; i++) {
268  double v_prev = (margined_max_value - buffer_[i - 1]) / (margined_max_value - margined_min_value);
269  double v = (margined_max_value - buffer_[i]) / (margined_max_value - margined_min_value);
270  double u_prev = (i - 1) / (float)buffer_length_;
271  double u = i / (float)buffer_length_;
272 
273  // chop within 0 ~ 1
274  v_prev = std::max(std::min(v_prev, 1.0), 0.0);
275  u_prev = std::max(std::min(u_prev, 1.0), 0.0);
276  v = std::max(std::min(v, 1.0), 0.0);
277  u = std::max(std::min(u, 1.0), 0.0);
278 
279  uint16_t x_prev = (int)(u_prev * w);
280  uint16_t x = (int)(u * w);
281  uint16_t y_prev = (int)(v_prev * h);
282  uint16_t y = (int)(v * h);
283  painter.drawLine(x_prev, y_prev, x, y);
284  }
285  // draw border
286  if (show_border_) {
287  painter.drawLine(0, 0, 0, h);
288  painter.drawLine(0, h, w, h);
289  painter.drawLine(w, h, w, 0);
290  painter.drawLine(w, 0, 0, 0);
291  }
292  // draw caption
293  if (show_caption_) {
294  QFont font = painter.font();
295  font.setPointSize(text_size_);
296  font.setBold(true);
297  painter.setFont(font);
298  painter.drawText(0, h, w, caption_offset_,
299  Qt::AlignCenter | Qt::AlignVCenter,
300  getName());
301  }
302  if (show_value_) {
303  QFont font = painter.font();
305  font.setPointSize(w / 4);
306  } else {
307  font.setPointSize(text_size_in_plot_);
308  }
309  font.setBold(true);
310  painter.setFont(font);
311  std::ostringstream ss;
312  ss << std::fixed << std::setprecision(2) << buffer_[buffer_.size() - 1];
313  painter.drawText(0, 0, w, h,
314  Qt::AlignCenter | Qt::AlignVCenter,
315  ss.str().c_str());
316  }
317 
318  // done
319  painter.end();
320  }
321  }
322 
323  void Plotter2DDisplay::processMessage(const std_msgs::Float32::ConstPtr& msg)
324  {
325  boost::mutex::scoped_lock lock(mutex_);
326 
327  if (!isEnabled()) {
328  return;
329  }
330  // add the message to the buffer
331  double min_value = buffer_[0];
332  double max_value = buffer_[0];
333  for (size_t i = 0; i < buffer_length_ - 1; i++) {
334  buffer_[i] = buffer_[i + 1];
335  if (min_value > buffer_[i]) {
336  min_value = buffer_[i];
337  }
338  if (max_value < buffer_[i]) {
339  max_value = buffer_[i];
340  }
341  }
342  buffer_[buffer_length_ - 1] = msg->data;
343  if (min_value > msg->data) {
344  min_value = msg->data;
345  }
346  if (max_value < msg->data) {
347  max_value = msg->data;
348  }
349  if (auto_scale_) {
350  min_value_ = min_value;
351  max_value_ = max_value;
352  if (min_value_ == max_value_) {
353  min_value_ = min_value_ - 0.5;
354  max_value_ = max_value_ + 0.5;
355  }
356  }
357  if (!overlay_->isVisible()) {
358  return;
359  }
360 
361  draw_required_ = true;
362  }
363 
364  void Plotter2DDisplay::update(float wall_dt, float ros_dt)
365  {
366  if (draw_required_) {
367  if (wall_dt + last_time_ > update_interval_) {
368  overlay_->updateTextureSize(texture_width_,
370  overlay_->setPosition(left_, top_);
371  overlay_->setDimensions(overlay_->getTextureWidth(), overlay_->getTextureHeight());
372  last_time_ = 0;
373  drawPlot();
374  draw_required_ = false;
375  }
376  else {
377  last_time_ = last_time_ + wall_dt;
378  }
379  }
380  }
381 
383  {
385  std::string topic_name = update_topic_property_->getTopicStd();
386  if (topic_name.length() > 0 && topic_name != "/") {
387  ros::NodeHandle n;
388  sub_ = n.subscribe(topic_name, 1, &Plotter2DDisplay::processMessage, this);
389  }
390  }
391 
393  {
394  sub_.shutdown();
395  }
396 
398  {
399  last_time_ = 0;
400  draw_required_ = false;
401  subscribe();
402  overlay_->show();
403  }
404 
406  {
407  unsubscribe();
408  overlay_->hide();
409  }
410 
412  {
413  boost::mutex::scoped_lock lock(mutex_);
415  }
416 
418  {
419  boost::mutex::scoped_lock lock(mutex_);
421  }
422 
424  {
426  }
427 
429  {
431  }
432 
434  {
436  }
437 
439  {
441  }
442 
444  {
446  }
447 
449  {
451  }
452 
454  {
456  subscribe();
457  }
458 
460  {
462  }
463 
465  {
467  }
468 
470  {
472  }
473 
475  {
478  }
479 
481  {
483  if (auto_color_change_) {
485  }
486  else {
488  }
489  }
490 
492  {
494  }
495 
497  {
499  }
500 
502  {
504  QFont font;
505  font.setPointSize(text_size_);
506  caption_offset_ = QFontMetrics(font).height();
507  }
508 
510  {
514  }
515  else {
517  }
518  }
519 
521  {
522  if (!auto_scale_) {
524  }
525  }
526 
528  {
529  if (!auto_scale_) {
531  }
532  }
533 
535  {
537  if (auto_scale_) {
540  }
541  else {
544  }
545  updateMinValue();
546  updateMaxValue();
547  }
548 
553  }
554  else {
556  }
558  }
559 
562  }
563 
564  bool Plotter2DDisplay::isInRegion(int x, int y)
565  {
566  return (top_ < y && top_ + texture_height_ > y &&
567  left_ < x && left_ + texture_width_ > x);
568  }
569 
570  void Plotter2DDisplay::movePosition(int x, int y)
571  {
572  top_ = y;
573  left_ = x;
574  }
575 
576  void Plotter2DDisplay::setPosition(int x, int y)
577  {
580  }
581 
582 
583 }
584 
rviz::BoolProperty::getBool
virtual bool getBool() const
jsk_rviz_plugins::PieChartDisplay::min_value_property_
rviz::FloatProperty * min_value_property_
Definition: pie_chart_display.h:155
rviz::Display::isEnabled
bool isEnabled() const
jsk_rviz_plugins::Plotter2DDisplay::texture_width_
uint16_t texture_width_
Definition: plotter_2d_display.h:192
jsk_rviz_plugins::Plotter2DDisplay::max_value_
double max_value_
Definition: plotter_2d_display.h:200
jsk_rviz_plugins::PieChartDisplay::updateTopic
void updateTopic()
Definition: pie_chart_display.cpp:462
rviz::IntProperty::setMin
void setMin(int min)
jsk_rviz_plugins::PieChartDisplay::updateLeft
void updateLeft()
Definition: pie_chart_display.cpp:387
jsk_rviz_plugins::Plotter2DDisplay::min_value_
double min_value_
Definition: plotter_2d_display.h:199
jsk_rviz_plugins::Plotter2DDisplay::update
virtual void update(float wall_dt, float ros_dt)
Definition: plotter_2d_display.cpp:396
rviz::RosTopicProperty
rviz::ColorProperty::getColor
virtual QColor getColor() const
jsk_rviz_plugins::Plotter2DDisplay::updateShowCaption
void updateShowCaption()
Definition: plotter_2d_display.cpp:541
jsk_rviz_plugins::Plotter2DDisplay::auto_color_change_
bool auto_color_change_
Definition: plotter_2d_display.h:181
jsk_rviz_plugins::PieChartDisplay::updateMinValue
void updateMinValue()
Definition: pie_chart_display.cpp:429
jsk_rviz_plugins::Plotter2DDisplay::updateMinValue
void updateMinValue()
Definition: plotter_2d_display.cpp:552
jsk_rviz_plugins::PieChartDisplay::fg_alpha_property_
rviz::FloatProperty * fg_alpha_property_
Definition: pie_chart_display.h:149
jsk_rviz_plugins::Plotter2DDisplay::Plotter2DDisplay
Plotter2DDisplay()
Definition: plotter_2d_display.cpp:76
msg
msg
jsk_rviz_plugins::Plotter2DDisplay::buffer_
std::vector< double > buffer_
Definition: plotter_2d_display.h:191
jsk_rviz_plugins::Plotter2DDisplay::onEnable
virtual void onEnable()
Definition: plotter_2d_display.cpp:429
jsk_rviz_plugins::PieChartDisplay::max_value_property_
rviz::FloatProperty * max_value_property_
Definition: pie_chart_display.h:154
jsk_rviz_plugins::Plotter2DDisplay::text_size_in_plot_
int text_size_in_plot_
Definition: plotter_2d_display.h:188
jsk_rviz_plugins::Plotter2DDisplay::fg_alpha_property_
rviz::FloatProperty * fg_alpha_property_
Definition: plotter_2d_display.h:152
jsk_rviz_plugins::Plotter2DDisplay::caption_offset_
int caption_offset_
Definition: plotter_2d_display.h:198
jsk_rviz_plugins::Plotter2DDisplay::text_size_in_plot_property_
rviz::IntProperty * text_size_in_plot_property_
Definition: plotter_2d_display.h:170
jsk_rviz_plugins::ScopedPixelBuffer
Definition: overlay_utils.h:100
rviz::Property::show
void show()
bounding_box_sample.w
w
Definition: bounding_box_sample.py:29
jsk_rviz_plugins::Plotter2DDisplay::update_interval_
float update_interval_
Definition: plotter_2d_display.h:186
jsk_rviz_plugins::PieChartDisplay::updateMaxColor
void updateMaxColor()
Definition: pie_chart_display.cpp:487
rviz_mouse_point_to_tablet.lock
lock
Definition: rviz_mouse_point_to_tablet.py:11
rviz::BoolProperty
jsk_rviz_plugins::Plotter2DDisplay::updateAutoColorChange
void updateAutoColorChange()
Definition: plotter_2d_display.cpp:512
rviz::FloatProperty::setMax
void setMax(float max)
jsk_rviz_plugins::Plotter2DDisplay::text_size_property_
rviz::IntProperty * text_size_property_
Definition: plotter_2d_display.h:165
jsk_rviz_plugins::Plotter2DDisplay::updateFGColor
void updateFGColor()
Definition: plotter_2d_display.cpp:470
jsk_rviz_plugins::PieChartDisplay::bg_color_property_
rviz::ColorProperty * bg_color_property_
Definition: pie_chart_display.h:147
jsk_rviz_plugins::Plotter2DDisplay::subscribe
virtual void subscribe()
Definition: plotter_2d_display.cpp:414
jsk_rviz_plugins::Plotter2DDisplay::updateBGAlpha
void updateBGAlpha()
Definition: plotter_2d_display.cpp:480
jsk_rviz_plugins::PieChartDisplay::update_topic_property_
rviz::RosTopicProperty * update_topic_property_
Definition: pie_chart_display.h:142
ros::Subscriber::shutdown
void shutdown()
overlay_sample.bg_color
bg_color
Definition: overlay_sample.py:45
jsk_rviz_plugins::Plotter2DDisplay::fg_color_
QColor fg_color_
Definition: plotter_2d_display.h:173
rviz::UniformStringStream
jsk_rviz_plugins::Plotter2DDisplay::unsubscribe
virtual void unsubscribe()
Definition: plotter_2d_display.cpp:424
jsk_rviz_plugins::Plotter2DDisplay::updateMaxValue
void updateMaxValue()
Definition: plotter_2d_display.cpp:559
jsk_rviz_plugins::Plotter2DDisplay::line_width_
int line_width_
Definition: plotter_2d_display.h:196
jsk_rviz_plugins::Plotter2DDisplay::auto_color_change_property_
rviz::BoolProperty * auto_color_change_property_
Definition: plotter_2d_display.h:162
jsk_rviz_plugins::Plotter2DDisplay::fg_alpha_
double fg_alpha_
Definition: plotter_2d_display.h:177
jsk_rviz_plugins::Plotter2DDisplay::onInitialize
virtual void onInitialize()
Definition: plotter_2d_display.cpp:222
rviz::FloatProperty::setMin
void setMin(float min)
jsk_rviz_plugins::PieChartDisplay::updateTextSize
void updateTextSize()
Definition: pie_chart_display.cpp:443
jsk_rviz_plugins::Plotter2DDisplay::sub_
ros::Subscriber sub_
Definition: plotter_2d_display.h:206
rviz::ColorProperty
jsk_rviz_plugins::Plotter2DDisplay::left_
int left_
Definition: plotter_2d_display.h:194
jsk_rviz_plugins::PieChartDisplay::updateBGColor
void updateBGColor()
Definition: pie_chart_display.cpp:393
jsk_rviz_plugins::Plotter2DDisplay::top_
int top_
Definition: plotter_2d_display.h:195
rviz::Display
rviz::FloatProperty
rviz::IntProperty::setValue
bool setValue(const QVariant &new_value) override
jsk_rviz_plugins::Plotter2DDisplay::~Plotter2DDisplay
virtual ~Plotter2DDisplay()
Definition: plotter_2d_display.cpp:185
class_list_macros.h
jsk_rviz_plugins::Plotter2DDisplay::updateFGAlpha
void updateFGAlpha()
Definition: plotter_2d_display.cpp:475
jsk_rviz_plugins::Plotter2DDisplay::updateLeft
void updateLeft()
Definition: plotter_2d_display.cpp:460
rviz::Property::hide
void hide()
jsk_rviz_plugins::PieChartDisplay::updateMaxValue
void updateMaxValue()
Definition: pie_chart_display.cpp:436
jsk_rviz_plugins::Plotter2DDisplay::updateAutoScale
void updateAutoScale()
Definition: plotter_2d_display.cpp:566
jsk_rviz_plugins::Plotter2DDisplay::movePosition
virtual void movePosition(int x, int y)
Definition: plotter_2d_display.cpp:602
jsk_rviz_plugins::Plotter2DDisplay::auto_scale_property_
rviz::BoolProperty * auto_scale_property_
Definition: plotter_2d_display.h:166
overlay_sample.font
font
Definition: overlay_sample.py:30
rviz::FloatProperty::getFloat
virtual float getFloat() const
jsk_rviz_plugins::PieChartDisplay::bg_alpha_property_
rviz::FloatProperty * bg_alpha_property_
Definition: pie_chart_display.h:151
jsk_rviz_plugins::Plotter2DDisplay::last_time_
float last_time_
Definition: plotter_2d_display.h:185
rviz
jsk_rviz_plugins::Plotter2DDisplay::updateBGColor
void updateBGColor()
Definition: plotter_2d_display.cpp:465
jsk_rviz_plugins::Plotter2DDisplay::auto_scale_
bool auto_scale_
Definition: plotter_2d_display.h:179
jsk_rviz_plugins::PieChartDisplay::text_size_property_
rviz::IntProperty * text_size_property_
Definition: pie_chart_display.h:153
jsk_rviz_plugins::Plotter2DDisplay::onDisable
virtual void onDisable()
Definition: plotter_2d_display.cpp:437
jsk_rviz_plugins::Plotter2DDisplay::updateAutoTextSizeInPlot
void updateAutoTextSizeInPlot()
Definition: plotter_2d_display.cpp:581
rviz::IntProperty::setMax
void setMax(int max)
bounding_box_sample.x
x
Definition: bounding_box_sample.py:26
jsk_rviz_plugins::PieChartDisplay::fg_color_property_
rviz::ColorProperty * fg_color_property_
Definition: pie_chart_display.h:146
jsk_rviz_plugins::Plotter2DDisplay::updateTopic
void updateTopic()
Definition: plotter_2d_display.cpp:485
jsk_rviz_plugins::Plotter2DDisplay::updateBufferSize
void updateBufferSize()
Definition: plotter_2d_display.cpp:506
jsk_rviz_plugins::Plotter2DDisplay::updateTop
void updateTop()
Definition: plotter_2d_display.cpp:455
jsk_rviz_plugins::Plotter2DDisplay::updateShowValue
void updateShowValue()
Definition: plotter_2d_display.cpp:491
jsk_rviz_plugins::PieChartDisplay::auto_color_change_property_
rviz::BoolProperty * auto_color_change_property_
Definition: pie_chart_display.h:157
bounding_box_sample.r
r
Definition: bounding_box_sample.py:10
jsk_rviz_plugins::Plotter2DDisplay::left_property_
rviz::IntProperty * left_property_
Definition: plotter_2d_display.h:159
jsk_rviz_plugins::PieChartDisplay::top_property_
rviz::IntProperty * top_property_
Definition: pie_chart_display.h:145
jsk_rviz_plugins::Plotter2DDisplay::buffer_length_property_
rviz::IntProperty * buffer_length_property_
Definition: plotter_2d_display.h:156
jsk_rviz_plugins::PieChartDisplay::updateTop
void updateTop()
Definition: pie_chart_display.cpp:381
jsk_rviz_plugins::Plotter2DDisplay::show_value_
bool show_value_
Definition: plotter_2d_display.h:182
jsk_rviz_plugins::Plotter2DDisplay::text_size_
int text_size_
Definition: plotter_2d_display.h:197
jsk_rviz_plugins::Plotter2DDisplay::updateShowBorder
void updateShowBorder()
Definition: plotter_2d_display.cpp:496
ros::NodeHandle::subscribe
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
jsk_rviz_plugins::PieChartDisplay::max_color_property_
rviz::ColorProperty * max_color_property_
Definition: pie_chart_display.h:158
jsk_rviz_plugins::Plotter2DDisplay::draw_required_
bool draw_required_
Definition: plotter_2d_display.h:184
jsk_rviz_plugins::Plotter2DDisplay::updateHeight
void updateHeight()
Definition: plotter_2d_display.cpp:449
jsk_rviz_plugins::Plotter2DDisplay::texture_height_
uint16_t texture_height_
Definition: plotter_2d_display.h:193
bounding_box_sample.y
y
Definition: bounding_box_sample.py:27
jsk_rviz_plugins::Plotter2DDisplay::setPosition
virtual void setPosition(int x, int y)
Definition: plotter_2d_display.cpp:608
jsk_rviz_plugins::PieChartDisplay::updateShowCaption
void updateShowCaption()
Definition: pie_chart_display.cpp:454
jsk_rviz_plugins::Plotter2DDisplay::show_caption_
bool show_caption_
Definition: plotter_2d_display.h:183
jsk_rviz_plugins::Plotter2DDisplay::min_value_property_
rviz::FloatProperty * min_value_property_
Definition: plotter_2d_display.h:168
jsk_rviz_plugins::PieChartDisplay::updateBGAlpha
void updateBGAlpha()
Definition: pie_chart_display.cpp:422
rviz::RosTopicProperty::getTopicStd
std::string getTopicStd() const
jsk_rviz_plugins::Plotter2DDisplay::buffer_length_
int buffer_length_
Definition: plotter_2d_display.h:190
jsk_rviz_plugins::Plotter2DDisplay::line_width_property_
rviz::IntProperty * line_width_property_
Definition: plotter_2d_display.h:161
jsk_rviz_plugins::Plotter2DDisplay::bg_color_property_
rviz::ColorProperty * bg_color_property_
Definition: plotter_2d_display.h:151
jsk_rviz_plugins::PieChartDisplay::updateFGColor
void updateFGColor()
Definition: pie_chart_display.cpp:400
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(jsk_rviz_plugins::PictogramArrayDisplay, rviz::Display)
plotter_2d_display.h
jsk_rviz_plugins::Plotter2DDisplay::updateWidth
void updateWidth()
Definition: plotter_2d_display.cpp:443
jsk_rviz_plugins::PieChartDisplay::updateAutoColorChange
void updateAutoColorChange()
Definition: pie_chart_display.cpp:468
jsk_rviz_plugins::Plotter2DDisplay::show_caption_property_
rviz::BoolProperty * show_caption_property_
Definition: plotter_2d_display.h:164
jsk_rviz_plugins::Plotter2DDisplay::drawPlot
virtual void drawPlot()
Definition: plotter_2d_display.cpp:255
jsk_rviz_plugins::Plotter2DDisplay::updateTextSizeInPlot
void updateTextSizeInPlot()
Definition: plotter_2d_display.cpp:592
rviz::Property::getName
virtual QString getName() const
jsk_rviz_plugins::Plotter2DDisplay::update_interval_property_
rviz::FloatProperty * update_interval_property_
Definition: plotter_2d_display.h:154
jsk_rviz_plugins::PieChartDisplay::show_caption_property_
rviz::BoolProperty * show_caption_property_
Definition: pie_chart_display.h:156
jsk_rviz_plugins::Plotter2DDisplay::fg_color_property_
rviz::ColorProperty * fg_color_property_
Definition: plotter_2d_display.h:150
jsk_rviz_plugins::Plotter2DDisplay::width_property_
rviz::IntProperty * width_property_
Definition: plotter_2d_display.h:157
jsk_rviz_plugins::Plotter2DDisplay::height_property_
rviz::IntProperty * height_property_
Definition: plotter_2d_display.h:158
jsk_rviz_plugins::PieChartDisplay::left_property_
rviz::IntProperty * left_property_
Definition: pie_chart_display.h:144
jsk_rviz_plugins::Plotter2DDisplay::updateTextSize
void updateTextSize()
Definition: plotter_2d_display.cpp:533
jsk_rviz_plugins::Plotter2DDisplay
Definition: plotter_2d_display.h:87
point_test.count
int count
Definition: point_test.py:15
jsk_rviz_plugins::Plotter2DDisplay::max_value_property_
rviz::FloatProperty * max_value_property_
Definition: plotter_2d_display.h:167
jsk_rviz_plugins::Plotter2DDisplay::update_topic_property_
rviz::RosTopicProperty * update_topic_property_
Definition: plotter_2d_display.h:148
jsk_rviz_plugins::Plotter2DDisplay::max_color_
QColor max_color_
Definition: plotter_2d_display.h:174
jsk_rviz_plugins::ScopedPixelBuffer::getQImage
virtual QImage getQImage(unsigned int width, unsigned int height)
Definition: overlay_utils.cpp:89
jsk_rviz_plugins::Plotter2DDisplay::updateMaxColor
void updateMaxColor()
Definition: plotter_2d_display.cpp:523
jsk_rviz_plugins::Plotter2DDisplay::show_value_property_
rviz::BoolProperty * show_value_property_
Definition: plotter_2d_display.h:149
jsk_rviz_plugins::Plotter2DDisplay::updateLineWidth
void updateLineWidth()
Definition: plotter_2d_display.cpp:501
jsk_rviz_plugins::Plotter2DDisplay::updateUpdateInterval
void updateUpdateInterval()
Definition: plotter_2d_display.cpp:528
jsk_rviz_plugins::Plotter2DDisplay::processMessage
virtual void processMessage(const std_msgs::Float32::ConstPtr &msg)
Definition: plotter_2d_display.cpp:355
rviz::IntProperty::getInt
virtual int getInt() const
jsk_rviz_plugins::Plotter2DDisplay::show_border_
bool show_border_
Definition: plotter_2d_display.h:180
jsk_rviz_plugins::Plotter2DDisplay::show_border_property_
rviz::BoolProperty * show_border_property_
Definition: plotter_2d_display.h:155
jsk_rviz_plugins::Plotter2DDisplay::overlay_
OverlayObject::Ptr overlay_
Definition: plotter_2d_display.h:172
jsk_rviz_plugins::Plotter2DDisplay::bg_alpha_
double bg_alpha_
Definition: plotter_2d_display.h:178
jsk_rviz_plugins::Plotter2DDisplay::top_property_
rviz::IntProperty * top_property_
Definition: plotter_2d_display.h:160
jsk_rviz_plugins::Plotter2DDisplay::auto_text_size_in_plot_
bool auto_text_size_in_plot_
Definition: plotter_2d_display.h:187
jsk_rviz_plugins::Plotter2DDisplay::mutex_
boost::mutex mutex_
Definition: plotter_2d_display.h:205
jsk_rviz_plugins::Plotter2DDisplay::bg_alpha_property_
rviz::FloatProperty * bg_alpha_property_
Definition: plotter_2d_display.h:153
jsk_rviz_plugins::Plotter2DDisplay::bg_color_
QColor bg_color_
Definition: plotter_2d_display.h:175
jsk_rviz_plugins
Definition: __init__.py:1
jsk_rviz_plugins::Plotter2DDisplay::auto_text_size_in_plot_property_
rviz::BoolProperty * auto_text_size_in_plot_property_
Definition: plotter_2d_display.h:169
jsk_rviz_plugins::PieChartDisplay::updateFGAlpha
void updateFGAlpha()
Definition: pie_chart_display.cpp:407
jsk_rviz_plugins::Plotter2DDisplay::isInRegion
virtual bool isInRegion(int x, int y)
Definition: plotter_2d_display.cpp:596
ros::NodeHandle
uniform_string_stream.h
overlay_sample.fg_color
fg_color
Definition: overlay_sample.py:44
rviz::IntProperty
display_context.h
jsk_rviz_plugins::Plotter2DDisplay::max_color_property_
rviz::ColorProperty * max_color_property_
Definition: plotter_2d_display.h:163
jsk_rviz_plugins::Plotter2DDisplay::initializeBuffer
virtual void initializeBuffer()
Definition: plotter_2d_display.cpp:210


jsk_rviz_plugins
Author(s): Kei Okada , Yohei Kakiuchi , Shohei Fujii , Ryohei Ueda
autogenerated on Fri Aug 2 2024 08:50:14