Go to the documentation of this file.
33 #include <QPushButton>
34 #include <QHBoxLayout>
35 #include <QButtonGroup>
56 pause_button_ =
new QPushButton(QIcon::fromTheme(
"media-playback-pause"),
"Pause");
75 "Allows you to synchronize the ROS time and Tf transforms to a given source.");
82 QHBoxLayout* layout =
new QHBoxLayout(
this);
84 layout->addSpacing(10);
86 layout->addWidget(
new QLabel(
"Synchronization:"));
89 layout->addSpacing(10);
91 layout->addWidget(
new QLabel(
"ROS Time:"));
93 layout->addWidget(
new QLabel(
"ROS Elapsed:"));
95 layout->addWidget(
new QLabel(
"Wall Time:"));
97 layout->addWidget(
new QLabel(
"Wall Elapsed:"));
100 layout->setContentsMargins(11, 5, 11, 5);
101 this->setLayout(layout);
124 if (
config.mapGetInt(
"SyncMode", &sync_mode))
141 DisplayGroup* display_group = qobject_cast<DisplayGroup*>(display);
147 for (
int i = 0; i < display_group->
numDisplays(); i++)
161 QString name = display->
getName();
171 Display* display = qobject_cast<Display*>(sender());
175 QString name = display->
getName();
204 QLineEdit* label =
new QLineEdit;
205 label->setReadOnly(
true);
211 label->setText(QString::number(time,
'f', 2));
double getROSTimeElapsed()
Return the ROS time in seconds since the last reset.
void displayAdded(rviz::Display *display)
double getROSTime()
Return the ROS time, in seconds.
DisplayGroup * getRootDisplayGroup() const override
void pauseToggled(bool checked)
QComboBox * sync_mode_selector_
void fillTimeLabel(QLineEdit *label, double time)
QLineEdit * wall_elapsed_label_
void save(Config config) const override
virtual Display * getDisplayAt(int index) const
Return the index-th Display in this group, or NULL if the index is invalid.
void notifyConfigChanged()
Notify this VisualizationManager that something about its display configuration has changed.
double getWallClockElapsed()
Return the wall clock time in seconds since the last reset.
QComboBox * sync_source_selector_
QLineEdit * ros_time_label_
void onInitialize() override
void setSyncMode(SyncMode mode)
Set synchronization mode (off/exact/approximate)
QLineEdit * ros_elapsed_label_
TimePanel(QWidget *parent=nullptr)
void displayRemoved(rviz::Display *display)
void timeSignal(ros::Time time, QPrivateSignal)
void onTimeSignal(ros::Time time)
void onDisplayAdded(rviz::Display *display)
virtual int numDisplays() const
Return the number of child Displays.
QLineEdit * makeTimeLabel()
FrameManager * getFrameManager() const override
Return the FrameManager instance.
void syncTime(ros::Time time)
Synchronize with given time.
QLineEdit * wall_time_label_
virtual QString getName() const
Return the name of this Property as a QString.
void syncSourceSelected(int index)
virtual void load(const Config &config)
Override to load configuration data. This version loads the name of the panel.
void load(const Config &config) override
virtual void save(Config config) const
Override to save configuration data. This version saves the name and class ID of the panel.
void preUpdate()
Emitted before updating all Displays.
void onDisplayRemoved(rviz::Display *display)
double getWallClock()
Return the wall clock time, in seconds since 1970.
void syncModeSelected(int index)
QPushButton * pause_button_
QString config_sync_source_
Configuration data storage class.
A Display object which stores other Displays as children.
void setPause(bool pause)
Enable/disable pause mode.
VisualizationManager * vis_manager_
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:10