Go to the documentation of this file.
30 #ifndef MAPVIZ_MAPVIZ_PLUGIN_H_
31 #define MAPVIZ_MAPVIZ_PLUGIN_H_
36 #include <boost/make_shared.hpp>
37 #include <boost/shared_ptr.hpp>
81 virtual void Draw(
double x,
double y,
double scale) = 0;
87 virtual void Paint(QPainter* painter,
double x,
double y,
double scale) {};
127 void PaintPlugin(QPainter* painter,
double x,
double y,
double scale)
136 Paint(painter, x, y, scale);
178 if (stamp !=
ros::Time() && elapsed >
tf_->getCacheLength())
187 else if (elapsed.
toSec() < 0.1)
202 virtual void LoadConfig(
const YAML::Node& load,
const std::string& path) = 0;
203 virtual void SaveConfig(YAML::Emitter& emitter,
const std::string& path) = 0;
207 virtual void PrintError(
const std::string& message) = 0;
208 virtual void PrintInfo(
const std::string& message) = 0;
209 virtual void PrintWarning(
const std::string& message) = 0;
221 static void PrintErrorHelper(QLabel *status_label,
const std::string& message,
double throttle = 0.0);
222 static void PrintInfoHelper(QLabel *status_label,
const std::string& message,
double throttle = 0.0);
223 static void PrintWarningHelper(QLabel *status_label,
const std::string& message,
double throttle = 0.0);
264 virtual bool Initialize(QGLWidget* canvas) = 0;
290 if (message == status_label->text().toStdString())
301 QPalette p(status_label->palette());
302 p.setColor(QPalette::Text, Qt::red);
303 status_label->setPalette(p);
304 status_label->setText(message.c_str());
310 if (message == status_label->text().toStdString())
321 QPalette p(status_label->palette());
322 p.setColor(QPalette::Text, Qt::darkGreen);
323 status_label->setPalette(p);
324 status_label->setText(message.c_str());
330 if (message == status_label->text().toStdString())
341 QPalette p(status_label->palette());
342 p.setColor(QPalette::Text, Qt::darkYellow);
343 status_label->setPalette(p);
344 status_label->setText(message.c_str());
348 #endif // MAPVIZ_MAPVIZ_PLUGIN_H_
void SetVisible(bool visible)
#define ROS_ERROR_THROTTLE(period,...)
virtual void Transform()=0
boost::shared_ptr< tf::TransformListener > tf_
boost::shared_ptr< MapvizPlugin > MapvizPluginPtr
virtual bool SupportsPainting()
virtual void SetNode(const ros::NodeHandle &node)
virtual void LoadConfig(const YAML::Node &load, const std::string &path)=0
virtual void PrintWarning(const std::string &message)=0
#define ROS_WARN_THROTTLE(period,...)
static void PrintErrorHelper(QLabel *status_label, const std::string &message, double throttle=0.0)
void SetType(const std::string &type)
virtual void PrintError(const std::string &message)=0
void SetTargetFrame(std::string frame_id)
bool GetTransform(const std::string &source, const ros::Time &stamp, swri_transform_util::Transform &transform)
void DrawPlugin(double x, double y, double scale)
Stopwatch meas_transform_
virtual void Draw(double x, double y, double scale)=0
virtual void Shutdown()=0
static void PrintWarningHelper(QLabel *status_label, const std::string &message, double throttle=0.0)
void SetDrawOrder(int order)
static void PrintInfoHelper(QLabel *status_label, const std::string &message, double throttle=0.0)
virtual bool Initialize(boost::shared_ptr< tf::TransformListener > tf_listener, swri_transform_util::TransformManagerPtr tf_manager, QGLWidget *canvas)
virtual QWidget * GetConfigWidget(QWidget *parent)
virtual void ClearHistory()
void UseLatestTransformsChanged(bool use_latest_transforms)
void VisibleChanged(bool visible)
void SetIcon(IconWidget *icon)
virtual void SaveConfig(YAML::Emitter &emitter, const std::string &path)=0
virtual void PrintInfo(const std::string &message)=0
void DrawOrderChanged(int draw_order)
std::string target_frame_
void TargetFrameChanged(const std::string &target_frame)
swri_transform_util::TransformManagerPtr tf_manager_
virtual void Paint(QPainter *painter, double x, double y, double scale)
void SetName(const std::string &name)
std::string source_frame_
void PaintPlugin(QPainter *painter, double x, double y, double scale)
bool GetTransform(const ros::Time &stamp, swri_transform_util::Transform &transform)
void printInfo(const std::string &name) const
#define ROS_INFO_THROTTLE(period,...)
mapviz
Author(s): Marc Alban
autogenerated on Sun Sep 8 2024 02:27:09