Class Mapviz

Inheritance Relationships

Base Type

  • public QMainWindow

Class Documentation

class Mapviz : public QMainWindow

Public Functions

Mapviz(bool is_standalone, int argc, char **argv, QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags())
~Mapviz()
rclcpp::Node::SharedPtr GetNode()
void Initialize()

Public Slots

void AutoSave()
void OpenConfig()
void SaveConfig()
void ClearConfig()
void SelectNewDisplay()
void RemoveDisplay()
void RemoveDisplay(QListWidgetItem *item)
void RenameDisplay()
void RenameDisplay(QListWidgetItem *item)
void ReorderDisplays()
void FixedFrameSelected(const QString &text)
void TargetFrameSelected(const QString &text)
void ToggleUseLatestTransforms(bool on)
void UpdateFrames()
void SpinOnce()
void UpdateSizeHints()
void ToggleConfigPanel(bool on)
void ToggleStatusBar(bool on)
void ToggleCaptureTools(bool on)
void ToggleFixOrientation(bool on)
void ToggleRotate90(bool on)
void ToggleEnableAntialiasing(bool on)
void ToggleShowPlugin(QListWidgetItem *item, bool visible)
void ToggleRecord(bool on)
void SetImageTransport(QAction *transport_action)
void UpdateImageTransportMenu()
void CaptureVideoFrame()
void StopRecord()
void Screenshot()
void Force720p(bool on)
void Force480p(bool on)
void SetResizable(bool on)
void SelectBackgroundColor(const QColor &color)
void SetCaptureDirectory()
void Hover(double x, double y, double scale)
void Recenter()
void HandleProfileTimer()
void ClearHistory()

Signals

void FrameGrabbed(QImage)

Emitted every time a frame is grabbed when Mapviz is in video recording mode, typically at a rate of 30 FPS. Note that the QImage emitted says its format is ARGB, but its pixel order is actually BGRA.

void ImageTransportChanged()

Protected Functions

void Open(const std::string &filename)
void Save(const std::string &filename)
MapvizPluginPtr CreateNewDisplay(const std::string &name, const std::string &type, bool visible, bool collapsed, int draw_order = 0)
void AddDisplay(const mapviz_interfaces::srv::AddMapvizDisplay::Request::SharedPtr req, mapviz_interfaces::srv::AddMapvizDisplay::Response::SharedPtr resp)
void ClearDisplays()
void AdjustWindowSize()
QString GetDefaultConfigPath()
virtual void showEvent(QShowEvent *event)
virtual void closeEvent(QCloseEvent *event)

Protected Attributes

Ui::mapviz ui_
QMenu *image_transport_menu_
QTimer frame_timer_
QTimer spin_timer_
QTimer save_timer_
QTimer record_timer_
QTimer profile_timer_
QLabel *xy_pos_label_
QLabel *lat_lon_pos_label_
QWidget *spacer1_
QWidget *spacer2_
QWidget *spacer3_
QPushButton *recenter_button_
QPushButton *rec_button_
QPushButton *stop_button_
QPushButton *screenshot_button_
int argc_
char **argv_
bool is_standalone_
bool initialized_
bool force_720p_
bool force_480p_
bool resizable_
QColor background_
std::string capture_directory_
QThread video_thread_
VideoWriter *vid_writer_
bool updating_frames_
std::shared_ptr<rclcpp::Node> node_
rclcpp::Service<mapviz_interfaces::srv::AddMapvizDisplay>::SharedPtr add_display_srv_
std::shared_ptr<tf2_ros::Buffer> tf_buf_
std::shared_ptr<tf2_ros::TransformListener> tf_
swri_transform_util::TransformManagerPtr tf_manager_
pluginlib::ClassLoader<MapvizPlugin> *loader_
MapCanvas *canvas_
std::map<QListWidgetItem*, MapvizPluginPtr> plugins_
Stopwatch meas_spin_

Protected Static Attributes

static const QString ROS_WORKSPACE_VAR
static const QString MAPVIZ_CONFIG_FILE
static const char IMAGE_TRANSPORT_PARAM[]