Classes | Public Member Functions | Protected Slots | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
mapviz_plugins::MarkerPlugin Class Reference

#include <marker_plugin.h>

Inheritance diagram for mapviz_plugins::MarkerPlugin:
Inheritance graph
[legend]

Classes

struct  MarkerData
 
struct  StampedPoint
 

Public Member Functions

void ClearHistory ()
 
void Draw (double x, double y, double scale)
 
QWidget * GetConfigWidget (QWidget *parent)
 
bool Initialize (QGLWidget *canvas)
 
void LoadConfig (const YAML::Node &node, const std::string &path)
 
 MarkerPlugin ()
 
void Paint (QPainter *painter, double x, double y, double scale)
 
void SaveConfig (YAML::Emitter &emitter, const std::string &path)
 
void Shutdown ()
 
bool SupportsPainting ()
 
void Transform ()
 
virtual ~MarkerPlugin ()
 
- Public Member Functions inherited from mapviz::MapvizPlugin
int DrawOrder () const
 
void DrawPlugin (double x, double y, double scale)
 
bool GetTransform (const ros::Time &stamp, swri_transform_util::Transform &transform, bool use_latest_transforms=true)
 
bool GetTransform (const std::string &source, const ros::Time &stamp, swri_transform_util::Transform &transform)
 
virtual bool Initialize (boost::shared_ptr< tf::TransformListener > tf_listener, QGLWidget *canvas)
 
std::string Name () const
 
void PaintPlugin (QPainter *painter, double x, double y, double scale)
 
void PrintMeasurements ()
 
void SetDrawOrder (int order)
 
void SetIcon (IconWidget *icon)
 
void SetName (const std::string &name)
 
virtual void SetNode (const ros::NodeHandle &node)
 
void SetTargetFrame (std::string frame_id)
 
void SetType (const std::string &type)
 
void SetUseLatestTransforms (bool value)
 
void SetVisible (bool visible)
 
std::string Type () const
 
bool Visible () const
 
virtual ~MapvizPlugin ()
 

Protected Slots

void SelectTopic ()
 
void TopicEdited ()
 

Protected Member Functions

void PrintError (const std::string &message)
 
void PrintInfo (const std::string &message)
 
void PrintWarning (const std::string &message)
 
void timerEvent (QTimerEvent *)
 
- Protected Member Functions inherited from mapviz::MapvizPlugin
 MapvizPlugin ()
 

Private Member Functions

void handleMarker (const visualization_msgs::Marker &marker)
 
void handleMarkerArray (const visualization_msgs::MarkerArray &markers)
 
void handleMessage (const topic_tools::ShapeShifter::ConstPtr &msg)
 
void transformArrow (MarkerData &markerData, const swri_transform_util::Transform &transform)
 

Private Attributes

QWidget * config_widget_
 
bool connected_
 
bool has_message_
 
ros::Subscriber marker_sub_
 
std::map< std::string, std::map< int, MarkerData > > markers_
 
std::string topic_
 
Ui::marker_config ui_
 

Additional Inherited Members

- Public Slots inherited from mapviz::MapvizPlugin
virtual void DrawIcon ()
 
- Signals inherited from mapviz::MapvizPlugin
void DrawOrderChanged (int draw_order)
 
void SizeChanged ()
 
void TargetFrameChanged (const std::string &target_frame)
 
void UseLatestTransformsChanged (bool use_latest_transforms)
 
void VisibleChanged (bool visible)
 
- Static Public Member Functions inherited from mapviz::MapvizPlugin
static void PrintErrorHelper (QLabel *status_label, const std::string &message, double throttle=0.0)
 
static void PrintInfoHelper (QLabel *status_label, const std::string &message, double throttle=0.0)
 
static void PrintWarningHelper (QLabel *status_label, const std::string &message, double throttle=0.0)
 
- Protected Attributes inherited from mapviz::MapvizPlugin
QGLWidget * canvas_
 
int draw_order_
 
IconWidgeticon_
 
bool initialized_
 
std::string name_
 
ros::NodeHandle node_
 
std::string source_frame_
 
std::string target_frame_
 
boost::shared_ptr< tf::TransformListenertf_
 
swri_transform_util::TransformManager tf_manager_
 
std::string type_
 
bool use_latest_transforms_
 
bool visible_
 

Detailed Description

Definition at line 61 of file marker_plugin.h.

Constructor & Destructor Documentation

mapviz_plugins::MarkerPlugin::MarkerPlugin ( )

Definition at line 60 of file marker_plugin.cpp.

mapviz_plugins::MarkerPlugin::~MarkerPlugin ( )
virtual

Definition at line 82 of file marker_plugin.cpp.

Member Function Documentation

void mapviz_plugins::MarkerPlugin::ClearHistory ( )
virtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 86 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::Draw ( double  x,
double  y,
double  scale 
)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 427 of file marker_plugin.cpp.

QWidget * mapviz_plugins::MarkerPlugin::GetConfigWidget ( QWidget *  parent)
virtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 413 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::handleMarker ( const visualization_msgs::Marker &  marker)
private

Definition at line 147 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::handleMarkerArray ( const visualization_msgs::MarkerArray &  markers)
private

Definition at line 390 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::handleMessage ( const topic_tools::ShapeShifter::ConstPtr msg)
private

Definition at line 130 of file marker_plugin.cpp.

bool mapviz_plugins::MarkerPlugin::Initialize ( QGLWidget *  canvas)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 420 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::LoadConfig ( const YAML::Node &  node,
const std::string &  path 
)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 734 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::Paint ( QPainter *  painter,
double  x,
double  y,
double  scale 
)
virtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 644 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::PrintError ( const std::string &  message)
protectedvirtual

Implements mapviz::MapvizPlugin.

Definition at line 398 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::PrintInfo ( const std::string &  message)
protectedvirtual

Implements mapviz::MapvizPlugin.

Definition at line 403 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::PrintWarning ( const std::string &  message)
protectedvirtual

Implements mapviz::MapvizPlugin.

Definition at line 408 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::SaveConfig ( YAML::Emitter &  emitter,
const std::string &  path 
)
virtual

Implements mapviz::MapvizPlugin.

Definition at line 746 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::SelectTopic ( )
protectedslot

Definition at line 91 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::Shutdown ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 70 of file marker_plugin.h.

bool mapviz_plugins::MarkerPlugin::SupportsPainting ( )
inlinevirtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 84 of file marker_plugin.h.

void mapviz_plugins::MarkerPlugin::timerEvent ( QTimerEvent *  event)
protected

Definition at line 751 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::TopicEdited ( )
protectedslot

Definition at line 106 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::Transform ( )
virtual

Implements mapviz::MapvizPlugin.

Definition at line 696 of file marker_plugin.cpp.

void mapviz_plugins::MarkerPlugin::transformArrow ( MarkerData markerData,
const swri_transform_util::Transform transform 
)
private

Given a MarkerData that represents an arrow and a transform, this function will generate the points involved in drawing the arrow and then transform all of them into the target frame.

Parameters
[in,out]markerDataA marker that represents an arrow.
[in]transformThe tf that should be applied to the arrow's points.

Definition at line 349 of file marker_plugin.cpp.

Member Data Documentation

QWidget* mapviz_plugins::MarkerPlugin::config_widget_
private

Definition at line 137 of file marker_plugin.h.

bool mapviz_plugins::MarkerPlugin::connected_
private

Definition at line 142 of file marker_plugin.h.

bool mapviz_plugins::MarkerPlugin::has_message_
private

Definition at line 143 of file marker_plugin.h.

ros::Subscriber mapviz_plugins::MarkerPlugin::marker_sub_
private

Definition at line 141 of file marker_plugin.h.

std::map<std::string, std::map<int, MarkerData> > mapviz_plugins::MarkerPlugin::markers_
private

Definition at line 145 of file marker_plugin.h.

std::string mapviz_plugins::MarkerPlugin::topic_
private

Definition at line 139 of file marker_plugin.h.

Ui::marker_config mapviz_plugins::MarkerPlugin::ui_
private

Definition at line 136 of file marker_plugin.h.


The documentation for this class was generated from the following files:


mapviz_plugins
Author(s): Marc Alban
autogenerated on Thu Jun 6 2019 19:25:16