Public Types | Public Member Functions | Protected Slots | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
mapviz_plugins::DisparityPlugin Class Reference

#include <disparity_plugin.h>

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

Public Types

enum  Anchor {
  TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT,
  CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER,
  BOTTOM_RIGHT
}
 
enum  Units { PIXELS, PERCENT }
 

Public Member Functions

 DisparityPlugin ()
 
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)
 
void SaveConfig (YAML::Emitter &emitter, const std::string &path)
 
void Shutdown ()
 
void Transform ()
 
virtual ~DisparityPlugin ()
 
- 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 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
 
virtual void Paint (QPainter *painter, double x, double y, double scale)
 
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 SetVisible (bool visible)
 
std::string Type () const
 
bool Visible () const
 
virtual ~MapvizPlugin ()
 

Protected Slots

void SelectTopic ()
 
void SetAnchor (QString anchor)
 
void SetHeight (int height)
 
void SetOffsetX (int offset)
 
void SetOffsetY (int offset)
 
void SetSubscription (bool visible)
 
void SetUnits (QString units)
 
void SetWidth (int width)
 
void TopicEdited ()
 

Protected Member Functions

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

Private Member Functions

std::string AnchorToString (Anchor anchor)
 
void disparityCallback (const stereo_msgs::DisparityImageConstPtr &image)
 
void DrawIplImage (cv::Mat *image)
 
void ScaleImage (double width, double height)
 
std::string UnitsToString (Units units)
 

Private Attributes

Anchor anchor_
 
QWidget * config_widget_
 
stereo_msgs::DisparityImage disparity_
 
cv::Mat_< cv::Vec3b > disparity_color_
 
ros::Subscriber disparity_sub_
 
bool has_image_
 
bool has_message_
 
double height_
 
double last_height_
 
double last_width_
 
double offset_x_
 
double offset_y_
 
cv::Mat scaled_image_
 
std::string topic_
 
Ui::disparity_config ui_
 
Units units_
 
double width_
 

Static Private Attributes

const static unsigned char COLOR_MAP []
 

Additional Inherited Members

- Public Slots inherited from mapviz::MapvizPlugin
virtual void DrawIcon ()
 
virtual bool SupportsPainting ()
 
- 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 visible_
 

Detailed Description

Definition at line 60 of file disparity_plugin.h.

Member Enumeration Documentation

◆ Anchor

Enumerator
TOP_LEFT 
TOP_CENTER 
TOP_RIGHT 
CENTER_LEFT 
CENTER 
CENTER_RIGHT 
BOTTOM_LEFT 
BOTTOM_CENTER 
BOTTOM_RIGHT 

Definition at line 65 of file disparity_plugin.h.

◆ Units

Enumerator
PIXELS 
PERCENT 

Definition at line 76 of file disparity_plugin.h.

Constructor & Destructor Documentation

◆ DisparityPlugin()

mapviz_plugins::DisparityPlugin::DisparityPlugin ( )

Definition at line 56 of file disparity_plugin.cpp.

◆ ~DisparityPlugin()

mapviz_plugins::DisparityPlugin::~DisparityPlugin ( )
virtual

Definition at line 91 of file disparity_plugin.cpp.

Member Function Documentation

◆ AnchorToString()

std::string mapviz_plugins::DisparityPlugin::AnchorToString ( Anchor  anchor)
private

Definition at line 509 of file disparity_plugin.cpp.

◆ disparityCallback()

void mapviz_plugins::DisparityPlugin::disparityCallback ( const stereo_msgs::DisparityImageConstPtr &  image)
private

Definition at line 234 of file disparity_plugin.cpp.

◆ Draw()

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

Implements mapviz::MapvizPlugin.

Definition at line 362 of file disparity_plugin.cpp.

◆ DrawIplImage()

void mapviz_plugins::DisparityPlugin::DrawIplImage ( cv::Mat *  image)
private

Definition at line 327 of file disparity_plugin.cpp.

◆ GetConfigWidget()

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

Reimplemented from mapviz::MapvizPlugin.

Definition at line 303 of file disparity_plugin.cpp.

◆ Initialize()

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

Implements mapviz::MapvizPlugin.

Definition at line 310 of file disparity_plugin.cpp.

◆ LoadConfig()

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

Implements mapviz::MapvizPlugin.

Definition at line 447 of file disparity_plugin.cpp.

◆ PrintError()

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

Implements mapviz::MapvizPlugin.

Definition at line 288 of file disparity_plugin.cpp.

◆ PrintInfo()

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

Implements mapviz::MapvizPlugin.

Definition at line 293 of file disparity_plugin.cpp.

◆ PrintWarning()

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

Implements mapviz::MapvizPlugin.

Definition at line 298 of file disparity_plugin.cpp.

◆ SaveConfig()

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

Implements mapviz::MapvizPlugin.

Definition at line 498 of file disparity_plugin.cpp.

◆ ScaleImage()

void mapviz_plugins::DisparityPlugin::ScaleImage ( double  width,
double  height 
)
private

Definition at line 317 of file disparity_plugin.cpp.

◆ SelectTopic

void mapviz_plugins::DisparityPlugin::SelectTopic ( )
protectedslot

Definition at line 184 of file disparity_plugin.cpp.

◆ SetAnchor

void mapviz_plugins::DisparityPlugin::SetAnchor ( QString  anchor)
protectedslot

Definition at line 115 of file disparity_plugin.cpp.

◆ SetHeight

void mapviz_plugins::DisparityPlugin::SetHeight ( int  height)
protectedslot

Definition at line 110 of file disparity_plugin.cpp.

◆ SetOffsetX

void mapviz_plugins::DisparityPlugin::SetOffsetX ( int  offset)
protectedslot

Definition at line 95 of file disparity_plugin.cpp.

◆ SetOffsetY

void mapviz_plugins::DisparityPlugin::SetOffsetY ( int  offset)
protectedslot

Definition at line 100 of file disparity_plugin.cpp.

◆ SetSubscription

void mapviz_plugins::DisparityPlugin::SetSubscription ( bool  visible)
protectedslot

Definition at line 166 of file disparity_plugin.cpp.

◆ SetUnits

void mapviz_plugins::DisparityPlugin::SetUnits ( QString  units)
protectedslot

Definition at line 155 of file disparity_plugin.cpp.

◆ SetWidth

void mapviz_plugins::DisparityPlugin::SetWidth ( int  width)
protectedslot

Definition at line 105 of file disparity_plugin.cpp.

◆ Shutdown()

void mapviz_plugins::DisparityPlugin::Shutdown ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 82 of file disparity_plugin.h.

◆ TopicEdited

void mapviz_plugins::DisparityPlugin::TopicEdited ( )
protectedslot

Definition at line 200 of file disparity_plugin.cpp.

◆ Transform()

void mapviz_plugins::DisparityPlugin::Transform ( )
inlinevirtual

Implements mapviz::MapvizPlugin.

Definition at line 86 of file disparity_plugin.h.

◆ UnitsToString()

std::string mapviz_plugins::DisparityPlugin::UnitsToString ( Units  units)
private

Definition at line 553 of file disparity_plugin.cpp.

Member Data Documentation

◆ anchor_

Anchor mapviz_plugins::DisparityPlugin::anchor_
private

Definition at line 114 of file disparity_plugin.h.

◆ COLOR_MAP

const unsigned char mapviz_plugins::DisparityPlugin::COLOR_MAP
staticprivate

Definition at line 142 of file disparity_plugin.h.

◆ config_widget_

QWidget* mapviz_plugins::DisparityPlugin::config_widget_
private

Definition at line 111 of file disparity_plugin.h.

◆ disparity_

stereo_msgs::DisparityImage mapviz_plugins::DisparityPlugin::disparity_
private

Definition at line 129 of file disparity_plugin.h.

◆ disparity_color_

cv::Mat_<cv::Vec3b> mapviz_plugins::DisparityPlugin::disparity_color_
private

Definition at line 131 of file disparity_plugin.h.

◆ disparity_sub_

ros::Subscriber mapviz_plugins::DisparityPlugin::disparity_sub_
private

Definition at line 126 of file disparity_plugin.h.

◆ has_image_

bool mapviz_plugins::DisparityPlugin::has_image_
private

Definition at line 121 of file disparity_plugin.h.

◆ has_message_

bool mapviz_plugins::DisparityPlugin::has_message_
private

Definition at line 127 of file disparity_plugin.h.

◆ height_

double mapviz_plugins::DisparityPlugin::height_
private

Definition at line 119 of file disparity_plugin.h.

◆ last_height_

double mapviz_plugins::DisparityPlugin::last_height_
private

Definition at line 124 of file disparity_plugin.h.

◆ last_width_

double mapviz_plugins::DisparityPlugin::last_width_
private

Definition at line 123 of file disparity_plugin.h.

◆ offset_x_

double mapviz_plugins::DisparityPlugin::offset_x_
private

Definition at line 116 of file disparity_plugin.h.

◆ offset_y_

double mapviz_plugins::DisparityPlugin::offset_y_
private

Definition at line 117 of file disparity_plugin.h.

◆ scaled_image_

cv::Mat mapviz_plugins::DisparityPlugin::scaled_image_
private

Definition at line 132 of file disparity_plugin.h.

◆ topic_

std::string mapviz_plugins::DisparityPlugin::topic_
private

Definition at line 113 of file disparity_plugin.h.

◆ ui_

Ui::disparity_config mapviz_plugins::DisparityPlugin::ui_
private

Definition at line 110 of file disparity_plugin.h.

◆ units_

Units mapviz_plugins::DisparityPlugin::units_
private

Definition at line 115 of file disparity_plugin.h.

◆ width_

double mapviz_plugins::DisparityPlugin::width_
private

Definition at line 118 of file disparity_plugin.h.


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


mapviz_plugins
Author(s): Marc Alban
autogenerated on Sun Sep 8 2024 02:27:14