47 #ifndef _MIRA_DRIVEVIEW_H_ 48 #define _MIRA_DRIVEVIEW_H_ 50 #include <QPushButton> 61 #include <ui_DriveView.h> 63 namespace mira {
namespace robot {
100 (
"Category",
"Robot")
101 (
"Name",
"DriveView")
102 (
"Description",
"View for driving a robot around"))
112 template <
typename Reflector>
113 void reflect(Reflector& r)
116 "Increment for velocity in [m/s]", 0.1f);
118 "Watchdog for stopping when no commands are signaled for " 124 "The channel used to check motorstop status", ui);
159 class DriveView::UI :
public QWidget,
public IAuthorityProvider,
protected Ui::DriveViewWidget
171 void onResetMotorStop();
172 void onSuspendBumper();
173 void onResetOdometry();
174 void onEnableMotors();
175 void onDisableMotors();
177 void updateService(
bool serviceChanged =
false);
179 void onMute(
bool mute);
182 virtual Authority& getAuthority() {
return mAuthority; }
189 QTimer* mCommandTimer;
190 QTimer* mServiceTimer;
192 std::string mService;
197 bool mWaitingForSuspendBumperEnabled;
200 void waitForSuspendBumperEnabled();
203 virtual void keyPressEvent(QKeyEvent *pEvent);
205 void enableDriveButtons(
bool enable);
206 void enableMotorButtons(
bool enable);
207 void enableBumperButton(
bool enable);
209 void muteAllINavigation(
bool mute);
212 QTabBar* getTabBar(QTabWidget* widget);
217 bool mServiceQueried;
static void channelProperty(Reflector &r, const std::string &name, ChannelProperty &channel, const std::string &comment, IAuthorityProvider *authorityProvider)
ServiceProperty driveService
The service name used for sending driving commands.
Definition: DriveView.h:144
virtual QWidget * createPartControl()
Implementation of mira::ViewPart.
void driveServiceChanged()
#define MIRA_META_OBJECT(classIdentifier, MetaInfo)
Setter< T > setterNotify(T &member, boost::function< void()> notifyFn)
ChannelProperty< bool > motorstopChannel
The channel used for listening to the motorstop status.
Definition: DriveView.h:147
Duration watchdogTimeout
Watchdog interval for stopping when no commands are signaled. default: 5sec.
Definition: DriveView.h:141
float velocityIncrement
The velocity increment, default: 0.1f [m/s].
Definition: DriveView.h:138
A view plugin for steering a robot using arrow keys or button clicks.
Definition: DriveView.h:97