linear_gauge_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 "linear_gauge_display.h"
38 #include <rviz/display_context.h>
39 #include <QPainter>
40 
41 namespace jsk_rviz_plugins
42 {
44  : rviz::Display(), data_(0.0), first_time_(true),
45  width_padding_(5), height_padding_(5)
46  {
47  update_topic_property_ = new rviz::RosTopicProperty(
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 
57  vertical_gauge_property_ = new rviz::BoolProperty(
58  "Vertical Gauge", false,
59  "set gauge vertical",
60  this, SLOT(updateVerticalGauge()));
61 
62  width_property_ = new rviz::IntProperty("width", 500,
63  "width of the plotter window",
64  this, SLOT(updateWidth()));
65  width_property_->setMin(1);
66  width_property_->setMax(2000);
67  height_property_ = new rviz::IntProperty("height", 50,
68  "height of the plotter window",
69  this, SLOT(updateHeight()));
70  height_property_->setMin(1);
71  height_property_->setMax(2000);
72  left_property_ = new rviz::IntProperty("left", 128,
73  "left of the plotter window",
74  this, SLOT(updateLeft()));
75  left_property_->setMin(0);
76  top_property_ = new rviz::IntProperty("top", 128,
77  "top of the plotter window",
78  this, SLOT(updateTop()));
79  top_property_->setMin(0);
80 
81  max_value_property_ = new rviz::FloatProperty(
82  "max value", 100.0,
83  "max value, used only if auto scale is disabled",
84  this, SLOT(updateMaxValue()));
85  min_value_property_ = new rviz::FloatProperty(
86  "min value", 0.0,
87  "min value, used only if auto scale is disabled",
88  this, SLOT(updateMinValue()));
89  fg_color_property_ = new rviz::ColorProperty(
90  "foreground color", QColor(25, 255, 240),
91  "color to draw line",
92  this, SLOT(updateFGColor()));
93  fg_alpha_property_ = new rviz::FloatProperty(
94  "foreground alpha", 0.7,
95  "alpha belnding value for foreground",
96  this, SLOT(updateFGAlpha()));
97  fg_alpha_property_->setMin(0);
98  fg_alpha_property_->setMax(1.0);
99  bg_color_property_ = new rviz::ColorProperty(
100  "background color", QColor(0, 0, 0),
101  "background color",
102  this, SLOT(updateBGColor()));
103  bg_alpha_property_ = new rviz::FloatProperty(
104  "backround alpha", 0.0,
105  "alpha belnding value for background",
106  this, SLOT(updateBGAlpha()));
107  bg_alpha_property_->setMin(0);
108  bg_alpha_property_->setMax(1.0);
109  line_width_property_ = new rviz::IntProperty("linewidth", 1,
110  "linewidth of the plot",
111  this, SLOT(updateLineWidth()));
112  line_width_property_->setMin(1);
113  line_width_property_->setMax(1000);
114  show_border_property_ = new rviz::BoolProperty(
115  "border", true,
116  "show border or not",
117  this, SLOT(updateShowBorder()));
118  text_size_property_ = new rviz::IntProperty("text size", 12,
119  "text size of the caption",
120  this, SLOT(updateTextSize()));
121  text_size_property_->setMin(1);
122  text_size_property_->setMax(1000);
123  show_caption_property_ = new rviz::BoolProperty(
124  "show caption", true,
125  "show caption or not",
126  this, SLOT(updateShowCaption()));
127  update_interval_property_ = new rviz::FloatProperty(
128  "update interval", 0.04,
129  "update interval of the plotter",
130  this, SLOT(updateUpdateInterval()));
131  update_interval_property_->setMin(0.0);
132  update_interval_property_->setMax(100);
133  auto_color_change_property_
134  = new rviz::BoolProperty("auto color change",
135  false,
136  "change the color automatically",
137  this, SLOT(updateAutoColorChange()));
138  max_color_property_
139  = new rviz::ColorProperty(
140  "max color",
141  QColor(255, 0, 0),
142  "only used if auto color change is set to True.",
143  this, SLOT(updateMaxColor()));
144  }
145 
147  {
148  onDisable();
149  // delete update_topic_property_;
150  // delete buffer_length_property_;
151  // delete fg_color_property_;
152  // delete bg_color_property_;
153  // delete fg_alpha_property_;
154  // delete bg_alpha_property_;
155  // delete top_property_;
156  // delete left_property_;
157  // delete width_property_;
158  // delete height_property_;
159  // delete line_width_property_;
160  // delete show_border_property_;
161  // delete auto_color_change_property_;
162  // delete max_color_property_;
163  // delete update_interval_property_;
164  // delete show_caption_property_;
165  // delete text_size_property_;
166  // delete min_value_property_;
167  // delete max_value_property_;
168  // delete auto_color_change_property_;
169  }
170 
172  {
173  static int count = 0;
175  ss << "LinearGaugeDisplayObject" << count++;
176  overlay_.reset(new OverlayObject(ss.str()));
177  onEnable();
180  updateWidth();
181  updateHeight();
182  updateLeft();
183  updateTop();
184  updateFGColor();
185  updateBGColor();
186  updateFGAlpha();
187  updateBGAlpha();
188  updateLineWidth();
192  updateMaxColor();
194  updateTextSize();
195  updateMinValue();
196  updateMaxValue();
197  overlay_->updateTextureSize(width_property_->getInt(),
199  }
200 
202  {
204  QColor bg_color(bg_color_);
205  double max_gauge_length = 0.0;
206 
207  fg_color.setAlpha(fg_alpha_);
208  bg_color.setAlpha(bg_alpha_);
209 
210  if (auto_color_change_) {
211  double r
212  = std::min(std::max(data_ / (max_value_ - min_value_),
213  0.0), 1.0);
214  if (r > 0.3) {
215  double r2 = (r - 0.3) / 0.7;
216  fg_color.setRed((max_color_.red() - fg_color_.red()) * r2
217  + fg_color_.red());
218  fg_color.setGreen((max_color_.green() - fg_color_.green()) * r2
219  + fg_color_.green());
220  fg_color.setBlue((max_color_.blue() - fg_color_.blue()) * r2
221  + fg_color_.blue());
222  }
223  }
224 
225  {
226  ScopedPixelBuffer buffer = overlay_->getBuffer();
227  QImage Hud = buffer.getQImage(*overlay_);
228  // initilize by the background color
229  for (int i = 0; i < overlay_->getTextureWidth(); i++) {
230  for (int j = 0; j < overlay_->getTextureHeight(); j++) {
231  Hud.setPixel(i, j, bg_color.rgba());
232  }
233  }
234  // paste in HUD speedometer. I resize the image and offset it by 8 pixels from
235  // the bottom left edge of the render window
236  QPainter painter( &Hud );
237  painter.setRenderHint(QPainter::Antialiasing, true);
238  painter.setPen(QPen(fg_color, line_width_, Qt::SolidLine));
239 
240  uint16_t w = overlay_->getTextureWidth();
241  uint16_t h = overlay_->getTextureHeight() - caption_offset_;
242 
243  //draw gauge
244  if(vertical_gauge_)
245  {
246  double normalised_value = std::min(std::max((double)data_ - min_value_, 0.0), max_value_ - min_value_)*(h-2*height_padding_)/(max_value_-min_value_);
247  painter.fillRect(width_padding_, h-normalised_value-height_padding_, w-2*width_padding_, normalised_value, fg_color);
248  }
249  else
250  {
251  double normalised_value = std::min(std::max((double)data_ - min_value_, 0.0), max_value_ - min_value_)*(w-2*width_padding_)/(max_value_-min_value_);
252  painter.fillRect(width_padding_, height_padding_, normalised_value, h-(2*height_padding_), fg_color);
253  }
254 
255  // draw border
256  if (show_border_) {
257  painter.drawLine(0, 0, 0, h);
258  painter.drawLine(0, h, w, h);
259  painter.drawLine(w, h, w, 0);
260  painter.drawLine(w, 0, 0, 0);
261  }
262  // draw caption
263  if (show_caption_) {
264  QFont font = painter.font();
265  font.setPointSize(text_size_);
266  font.setBold(true);
267  painter.setFont(font);
268  painter.drawText(0, h, w, caption_offset_,
269  Qt::AlignCenter | Qt::AlignVCenter,
270  getName());
271  }
272 
273  //draw value
274  if (show_value_) {
275  QFont font = painter.font();
276  font.setPointSize(std::min(w-2*width_padding_, h-2*height_padding_));
277  font.setBold(true);
278  painter.setFont(font);
279  std::ostringstream ss;
280  ss << std::fixed << std::setprecision(2) << data_;
281 
282  if(w<h) //rotate text to fit gauge if needed
283  {
284  painter.translate(0, h);
285  painter.rotate(-90);
286  painter.drawText(0, 0, h, w,
287  Qt::AlignCenter | Qt::AlignVCenter,
288  ss.str().c_str());
289  painter.rotate(90);
290  painter.translate(0, -h);
291  }
292  else
293  {
294  painter.drawText(0, 0, w, h,
295  Qt::AlignCenter | Qt::AlignVCenter,
296  ss.str().c_str());
297  }
298  }
299 
300  // done
301  painter.end();
302  }
303  }
304 
305  void LinearGaugeDisplay::processMessage(const std_msgs::Float32::ConstPtr& msg)
306  {
307  boost::mutex::scoped_lock lock(mutex_);
308 
309  if (!isEnabled() || !overlay_->isVisible()) {
310  return;
311  }
312  if (data_ != msg->data || first_time_) {
313  first_time_ = false;
314  data_ = msg->data;
315  draw_required_ = true;
316  }
317 
318  }
319 
320  void LinearGaugeDisplay::update(float wall_dt, float ros_dt)
321  {
322  if (draw_required_) {
323  if (wall_dt + last_time_ > update_interval_) {
324  overlay_->updateTextureSize(texture_width_,
326  overlay_->setPosition(left_, top_);
327  overlay_->setDimensions(overlay_->getTextureWidth(), overlay_->getTextureHeight());
328  last_time_ = 0;
329  drawPlot();
330  draw_required_ = false;
331  }
332  else {
333  last_time_ = last_time_ + wall_dt;
334  }
335  }
336  }
337 
339  {
340  std::string topic_name = update_topic_property_->getTopicStd();
341  if (topic_name.length() > 0 && topic_name != "/") {
342  ros::NodeHandle n;
343  sub_ = n.subscribe(topic_name, 1, &LinearGaugeDisplay::processMessage, this);
344  }
345  }
346 
348  {
349  sub_.shutdown();
350  }
351 
353  {
354  last_time_ = 0;
355  draw_required_ = false;
356  subscribe();
357  overlay_->show();
358  }
359 
361  {
362  unsubscribe();
363  overlay_->hide();
364  }
365 
367  {
368  boost::mutex::scoped_lock lock(mutex_);
371  }
372 
374  {
375  boost::mutex::scoped_lock lock(mutex_);
377  draw_required_ = true;
378  }
379 
381  {
383  draw_required_ = true;
384  }
385 
387  {
389  draw_required_ = true;
390  }
391 
393  {
395  draw_required_ = true;
396  }
397 
399  {
401  draw_required_ = true;
402  }
403 
405  {
407  draw_required_ = true;
408  }
409 
411  {
413  draw_required_ = true;
414  }
415 
417  {
419  subscribe();
420  }
421 
423  {
425  draw_required_ = true;
426  }
427 
429  {
431  draw_required_ = true;
432  }
433 
435  {
437  draw_required_ = true;
438  }
439 
441  {
443  draw_required_ = true;
444  }
445 
447  {
449  if (auto_color_change_) {
451  }
452  else {
454  }
455  draw_required_ = true;
456  }
457 
459  {
461  draw_required_ = true;
462  }
463 
465  {
467  }
468 
470  {
472  QFont font;
473  font.setPointSize(text_size_);
474  caption_offset_ = QFontMetrics(font).height();
475  draw_required_ = true;
476  }
477 
479  {
481  if (show_caption_) {
483  }
484  else {
486  }
487  draw_required_ = true;
488  }
489 
491  {
493  }
494 
496  {
498  }
499 
500 
501 
502  bool LinearGaugeDisplay::isInRegion(int x, int y)
503  {
504  return (top_ < y && top_ + texture_height_ > y &&
505  left_ < x && left_ + texture_width_ > x);
506  }
507 
508  void LinearGaugeDisplay::movePosition(int x, int y)
509  {
510  top_ = y;
511  left_ = x;
512  }
513 
514  void LinearGaugeDisplay::setPosition(int x, int y)
515  {
518  }
519 
520 
521 }
522 
linear_gauge_display.h
rviz::BoolProperty::getBool
virtual bool getBool() const
jsk_rviz_plugins::LinearGaugeDisplay::updateFGColor
void updateFGColor()
Definition: linear_gauge_display.cpp:430
jsk_rviz_plugins::LinearGaugeDisplay::mutex_
boost::mutex mutex_
Definition: linear_gauge_display.h:204
rviz::Display::isEnabled
bool isEnabled() const
jsk_rviz_plugins::LinearGaugeDisplay::last_time_
float last_time_
Definition: linear_gauge_display.h:182
jsk_rviz_plugins::LinearGaugeDisplay::updateShowValue
void updateShowValue()
Definition: linear_gauge_display.cpp:454
jsk_rviz_plugins::LinearGaugeDisplay::width_padding_
const int width_padding_
Definition: linear_gauge_display.h:194
rviz::RosTopicProperty
rviz::ColorProperty::getColor
virtual QColor getColor() const
msg
msg
jsk_rviz_plugins::LinearGaugeDisplay::~LinearGaugeDisplay
virtual ~LinearGaugeDisplay()
Definition: linear_gauge_display.cpp:178
jsk_rviz_plugins::LinearGaugeDisplay::width_property_
rviz::IntProperty * width_property_
Definition: linear_gauge_display.h:157
jsk_rviz_plugins::LinearGaugeDisplay::show_border_property_
rviz::BoolProperty * show_border_property_
Definition: linear_gauge_display.h:155
jsk_rviz_plugins::LinearGaugeDisplay::updateUpdateInterval
void updateUpdateInterval()
Definition: linear_gauge_display.cpp:496
jsk_rviz_plugins::LinearGaugeDisplay::updateFGAlpha
void updateFGAlpha()
Definition: linear_gauge_display.cpp:436
jsk_rviz_plugins::LinearGaugeDisplay::max_value_property_
rviz::FloatProperty * max_value_property_
Definition: linear_gauge_display.h:166
jsk_rviz_plugins::LinearGaugeDisplay::line_width_property_
rviz::IntProperty * line_width_property_
Definition: linear_gauge_display.h:161
jsk_rviz_plugins::LinearGaugeDisplay::updateLineWidth
void updateLineWidth()
Definition: linear_gauge_display.cpp:472
rviz::Property::show
void show()
jsk_rviz_plugins::LinearGaugeDisplay::text_size_
int text_size_
Definition: linear_gauge_display.h:190
bounding_box_sample.w
w
Definition: bounding_box_sample.py:29
jsk_rviz_plugins::LinearGaugeDisplay::onInitialize
virtual void onInitialize()
Definition: linear_gauge_display.cpp:203
rviz_mouse_point_to_tablet.lock
lock
Definition: rviz_mouse_point_to_tablet.py:11
rviz::BoolProperty
jsk_rviz_plugins::LinearGaugeDisplay::bg_color_property_
rviz::ColorProperty * bg_color_property_
Definition: linear_gauge_display.h:151
jsk_rviz_plugins::LinearGaugeDisplay::processMessage
virtual void processMessage(const std_msgs::Float32::ConstPtr &msg)
Definition: linear_gauge_display.cpp:337
jsk_rviz_plugins::LinearGaugeDisplay::updateMaxValue
void updateMaxValue()
Definition: linear_gauge_display.cpp:527
jsk_rviz_plugins::LinearGaugeDisplay::updateLeft
void updateLeft()
Definition: linear_gauge_display.cpp:418
jsk_rviz_plugins::LinearGaugeDisplay::line_width_
int line_width_
Definition: linear_gauge_display.h:189
jsk_rviz_plugins::LinearGaugeDisplay::show_border_
bool show_border_
Definition: linear_gauge_display.h:176
ros::Subscriber::shutdown
void shutdown()
overlay_sample.bg_color
bg_color
Definition: overlay_sample.py:45
jsk_rviz_plugins::LinearGaugeDisplay::min_value_property_
rviz::FloatProperty * min_value_property_
Definition: linear_gauge_display.h:167
jsk_rviz_plugins::LinearGaugeDisplay::left_property_
rviz::IntProperty * left_property_
Definition: linear_gauge_display.h:159
rviz::UniformStringStream
jsk_rviz_plugins::LinearGaugeDisplay::auto_color_change_property_
rviz::BoolProperty * auto_color_change_property_
Definition: linear_gauge_display.h:162
jsk_rviz_plugins::LinearGaugeDisplay::sub_
ros::Subscriber sub_
Definition: linear_gauge_display.h:205
jsk_rviz_plugins::LinearGaugeDisplay::bg_alpha_
double bg_alpha_
Definition: linear_gauge_display.h:175
rviz::ColorProperty
jsk_rviz_plugins::LinearGaugeDisplay::max_value_
double max_value_
Definition: linear_gauge_display.h:193
jsk_rviz_plugins::LinearGaugeDisplay::fg_color_
QColor fg_color_
Definition: linear_gauge_display.h:170
jsk_rviz_plugins::LinearGaugeDisplay::height_property_
rviz::IntProperty * height_property_
Definition: linear_gauge_display.h:158
jsk_rviz_plugins::LinearGaugeDisplay::updateAutoColorChange
void updateAutoColorChange()
Definition: linear_gauge_display.cpp:478
rviz::Display
jsk_rviz_plugins::LinearGaugeDisplay::max_color_
QColor max_color_
Definition: linear_gauge_display.h:171
jsk_rviz_plugins::LinearGaugeDisplay::top_property_
rviz::IntProperty * top_property_
Definition: linear_gauge_display.h:160
rviz::FloatProperty
jsk_rviz_plugins::LinearGaugeDisplay::updateTextSize
void updateTextSize()
Definition: linear_gauge_display.cpp:501
rviz::IntProperty::setValue
bool setValue(const QVariant &new_value) override
class_list_macros.h
jsk_rviz_plugins::LinearGaugeDisplay::updateWidth
void updateWidth()
Definition: linear_gauge_display.cpp:398
rviz::Property::hide
void hide()
jsk_rviz_plugins::LinearGaugeDisplay::updateVerticalGauge
void updateVerticalGauge()
Definition: linear_gauge_display.cpp:460
jsk_rviz_plugins::LinearGaugeDisplay::LinearGaugeDisplay
LinearGaugeDisplay()
Definition: linear_gauge_display.cpp:75
jsk_rviz_plugins::LinearGaugeDisplay::update
virtual void update(float wall_dt, float ros_dt)
Definition: linear_gauge_display.cpp:352
jsk_rviz_plugins::LinearGaugeDisplay::unsubscribe
virtual void unsubscribe()
Definition: linear_gauge_display.cpp:379
jsk_rviz_plugins::LinearGaugeDisplay::min_value_
double min_value_
Definition: linear_gauge_display.h:192
jsk_rviz_plugins::LinearGaugeDisplay::overlay_
OverlayObject::Ptr overlay_
Definition: linear_gauge_display.h:169
overlay_sample.font
font
Definition: overlay_sample.py:30
jsk_rviz_plugins::LinearGaugeDisplay
Definition: linear_gauge_display.h:87
rviz::FloatProperty::getFloat
virtual float getFloat() const
jsk_rviz_plugins::LinearGaugeDisplay::updateShowBorder
void updateShowBorder()
Definition: linear_gauge_display.cpp:466
jsk_rviz_plugins::LinearGaugeDisplay::show_caption_
bool show_caption_
Definition: linear_gauge_display.h:179
rviz
jsk_rviz_plugins::LinearGaugeDisplay::updateMaxColor
void updateMaxColor()
Definition: linear_gauge_display.cpp:490
jsk_rviz_plugins::LinearGaugeDisplay::updateHeight
void updateHeight()
Definition: linear_gauge_display.cpp:405
bounding_box_sample.x
x
Definition: bounding_box_sample.py:26
jsk_rviz_plugins::LinearGaugeDisplay::fg_alpha_property_
rviz::FloatProperty * fg_alpha_property_
Definition: linear_gauge_display.h:152
jsk_rviz_plugins::LinearGaugeDisplay::show_value_property_
rviz::BoolProperty * show_value_property_
Definition: linear_gauge_display.h:148
jsk_rviz_plugins::LinearGaugeDisplay::top_
int top_
Definition: linear_gauge_display.h:188
jsk_rviz_plugins::LinearGaugeDisplay::text_size_property_
rviz::IntProperty * text_size_property_
Definition: linear_gauge_display.h:165
jsk_rviz_plugins::LinearGaugeDisplay::updateTopic
void updateTopic()
Definition: linear_gauge_display.cpp:448
bounding_box_sample.r
r
Definition: bounding_box_sample.py:10
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::LinearGaugeDisplay::updateMinValue
void updateMinValue()
Definition: linear_gauge_display.cpp:522
jsk_rviz_plugins::LinearGaugeDisplay::draw_required_
bool draw_required_
Definition: linear_gauge_display.h:181
bounding_box_sample.y
y
Definition: bounding_box_sample.py:27
jsk_rviz_plugins::LinearGaugeDisplay::data_
float data_
Definition: linear_gauge_display.h:197
rviz::RosTopicProperty::getTopicStd
std::string getTopicStd() const
jsk_rviz_plugins::LinearGaugeDisplay::onDisable
virtual void onDisable()
Definition: linear_gauge_display.cpp:392
jsk_rviz_plugins::LinearGaugeDisplay::subscribe
virtual void subscribe()
Definition: linear_gauge_display.cpp:370
jsk_rviz_plugins::LinearGaugeDisplay::texture_height_
uint16_t texture_height_
Definition: linear_gauge_display.h:186
PLUGINLIB_EXPORT_CLASS
PLUGINLIB_EXPORT_CLASS(jsk_rviz_plugins::PictogramArrayDisplay, rviz::Display)
rviz::Property::getName
virtual QString getName() const
jsk_rviz_plugins::LinearGaugeDisplay::movePosition
virtual void movePosition(int x, int y)
Definition: linear_gauge_display.cpp:540
jsk_rviz_plugins::LinearGaugeDisplay::vertical_gauge_
bool vertical_gauge_
Definition: linear_gauge_display.h:180
point_test.count
int count
Definition: point_test.py:15
jsk_rviz_plugins::LinearGaugeDisplay::auto_color_change_
bool auto_color_change_
Definition: linear_gauge_display.h:177
jsk_rviz_plugins::LinearGaugeDisplay::bg_color_
QColor bg_color_
Definition: linear_gauge_display.h:172
jsk_rviz_plugins::LinearGaugeDisplay::texture_width_
uint16_t texture_width_
Definition: linear_gauge_display.h:185
jsk_rviz_plugins::LinearGaugeDisplay::updateShowCaption
void updateShowCaption()
Definition: linear_gauge_display.cpp:510
jsk_rviz_plugins::LinearGaugeDisplay::show_value_
bool show_value_
Definition: linear_gauge_display.h:178
jsk_rviz_plugins::LinearGaugeDisplay::update_interval_
float update_interval_
Definition: linear_gauge_display.h:183
jsk_rviz_plugins::LinearGaugeDisplay::update_interval_property_
rviz::FloatProperty * update_interval_property_
Definition: linear_gauge_display.h:154
jsk_rviz_plugins::LinearGaugeDisplay::first_time_
bool first_time_
Definition: linear_gauge_display.h:198
jsk_rviz_plugins::LinearGaugeDisplay::fg_alpha_
double fg_alpha_
Definition: linear_gauge_display.h:174
jsk_rviz_plugins::LinearGaugeDisplay::left_
int left_
Definition: linear_gauge_display.h:187
rviz::IntProperty::getInt
virtual int getInt() const
jsk_rviz_plugins::LinearGaugeDisplay::update_topic_property_
rviz::RosTopicProperty * update_topic_property_
Definition: linear_gauge_display.h:147
jsk_rviz_plugins::LinearGaugeDisplay::onEnable
virtual void onEnable()
Definition: linear_gauge_display.cpp:384
jsk_rviz_plugins::LinearGaugeDisplay::height_padding_
const int height_padding_
Definition: linear_gauge_display.h:195
jsk_rviz_plugins::LinearGaugeDisplay::caption_offset_
int caption_offset_
Definition: linear_gauge_display.h:191
jsk_rviz_plugins::LinearGaugeDisplay::max_color_property_
rviz::ColorProperty * max_color_property_
Definition: linear_gauge_display.h:163
jsk_rviz_plugins::LinearGaugeDisplay::updateBGColor
void updateBGColor()
Definition: linear_gauge_display.cpp:424
jsk_rviz_plugins::LinearGaugeDisplay::setPosition
virtual void setPosition(int x, int y)
Definition: linear_gauge_display.cpp:546
jsk_rviz_plugins::LinearGaugeDisplay::updateTop
void updateTop()
Definition: linear_gauge_display.cpp:412
jsk_rviz_plugins::LinearGaugeDisplay::drawPlot
virtual void drawPlot()
Definition: linear_gauge_display.cpp:233
jsk_rviz_plugins
Definition: __init__.py:1
jsk_rviz_plugins::LinearGaugeDisplay::fg_color_property_
rviz::ColorProperty * fg_color_property_
Definition: linear_gauge_display.h:150
jsk_rviz_plugins::LinearGaugeDisplay::bg_alpha_property_
rviz::FloatProperty * bg_alpha_property_
Definition: linear_gauge_display.h:153
ros::NodeHandle
jsk_rviz_plugins::LinearGaugeDisplay::vertical_gauge_property_
rviz::BoolProperty * vertical_gauge_property_
Definition: linear_gauge_display.h:149
jsk_rviz_plugins::LinearGaugeDisplay::show_caption_property_
rviz::BoolProperty * show_caption_property_
Definition: linear_gauge_display.h:164
uniform_string_stream.h
jsk_rviz_plugins::LinearGaugeDisplay::updateBGAlpha
void updateBGAlpha()
Definition: linear_gauge_display.cpp:442
overlay_sample.fg_color
fg_color
Definition: overlay_sample.py:44
rviz::IntProperty
jsk_rviz_plugins::LinearGaugeDisplay::isInRegion
virtual bool isInRegion(int x, int y)
Definition: linear_gauge_display.cpp:534
display_context.h


jsk_rviz_plugins
Author(s): Kei Okada , Yohei Kakiuchi , Shohei Fujii , Ryohei Ueda
autogenerated on Mon Jan 22 2024 03:47:13