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  Color
 
struct  MarkerData
 
struct  StampedPoint
 

Public Member Functions

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
virtual void ClearHistory ()
 
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, swri_transform_util::TransformManagerPtr tf_manager, 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 ClearHistory ()
 
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::unordered_map< std::string, bool, MarkerNsHashmarker_visible_
 
std::unordered_map< MarkerId, MarkerData, MarkerIdHashmarkers_
 
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::TransformManagerPtr tf_manager_
 
std::string type_
 
bool use_latest_transforms_
 
bool visible_
 

Detailed Description

Definition at line 74 of file marker_plugin.h.

Constructor & Destructor Documentation

◆ MarkerPlugin()

mapviz_plugins::MarkerPlugin::MarkerPlugin ( )

Definition at line 47 of file marker_plugin.cpp.

◆ ~MarkerPlugin()

mapviz_plugins::MarkerPlugin::~MarkerPlugin ( )
virtual

Definition at line 70 of file marker_plugin.cpp.

Member Function Documentation

◆ ClearHistory

void mapviz_plugins::MarkerPlugin::ClearHistory ( )
protectedslot

Definition at line 74 of file marker_plugin.cpp.

◆ Draw()

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

Implements mapviz::MapvizPlugin.

Definition at line 420 of file marker_plugin.cpp.

◆ GetConfigWidget()

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

Reimplemented from mapviz::MapvizPlugin.

Definition at line 406 of file marker_plugin.cpp.

◆ handleMarker()

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

Definition at line 140 of file marker_plugin.cpp.

◆ handleMarkerArray()

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

Definition at line 383 of file marker_plugin.cpp.

◆ handleMessage()

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

Definition at line 123 of file marker_plugin.cpp.

◆ Initialize()

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

Implements mapviz::MapvizPlugin.

Definition at line 413 of file marker_plugin.cpp.

◆ LoadConfig()

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

Implements mapviz::MapvizPlugin.

Definition at line 693 of file marker_plugin.cpp.

◆ Paint()

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

Reimplemented from mapviz::MapvizPlugin.

Definition at line 596 of file marker_plugin.cpp.

◆ PrintError()

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

Implements mapviz::MapvizPlugin.

Definition at line 391 of file marker_plugin.cpp.

◆ PrintInfo()

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

Implements mapviz::MapvizPlugin.

Definition at line 396 of file marker_plugin.cpp.

◆ PrintWarning()

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

Implements mapviz::MapvizPlugin.

Definition at line 401 of file marker_plugin.cpp.

◆ SaveConfig()

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

Implements mapviz::MapvizPlugin.

Definition at line 705 of file marker_plugin.cpp.

◆ SelectTopic

void mapviz_plugins::MarkerPlugin::SelectTopic ( )
protectedslot

Definition at line 82 of file marker_plugin.cpp.

◆ Shutdown()

void mapviz_plugins::MarkerPlugin::Shutdown ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 83 of file marker_plugin.h.

◆ SupportsPainting()

bool mapviz_plugins::MarkerPlugin::SupportsPainting ( )
inlinevirtual

Reimplemented from mapviz::MapvizPlugin.

Definition at line 95 of file marker_plugin.h.

◆ timerEvent()

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

Definition at line 710 of file marker_plugin.cpp.

◆ TopicEdited

void mapviz_plugins::MarkerPlugin::TopicEdited ( )
protectedslot

Definition at line 97 of file marker_plugin.cpp.

◆ Transform()

void mapviz_plugins::MarkerPlugin::Transform ( )
virtual

Implements mapviz::MapvizPlugin.

Definition at line 661 of file marker_plugin.cpp.

◆ transformArrow()

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 342 of file marker_plugin.cpp.

Member Data Documentation

◆ config_widget_

QWidget* mapviz_plugins::MarkerPlugin::config_widget_
private

Definition at line 154 of file marker_plugin.h.

◆ connected_

bool mapviz_plugins::MarkerPlugin::connected_
private

Definition at line 159 of file marker_plugin.h.

◆ has_message_

bool mapviz_plugins::MarkerPlugin::has_message_
private

Definition at line 160 of file marker_plugin.h.

◆ marker_sub_

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

Definition at line 158 of file marker_plugin.h.

◆ marker_visible_

std::unordered_map<std::string, bool, MarkerNsHash> mapviz_plugins::MarkerPlugin::marker_visible_
private

Definition at line 163 of file marker_plugin.h.

◆ markers_

std::unordered_map<MarkerId, MarkerData, MarkerIdHash> mapviz_plugins::MarkerPlugin::markers_
private

Definition at line 162 of file marker_plugin.h.

◆ topic_

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

Definition at line 156 of file marker_plugin.h.

◆ ui_

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

Definition at line 153 of file marker_plugin.h.


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


mapviz_plugins
Author(s): Marc Alban
autogenerated on Fri Dec 16 2022 03:59:34