MIRA
|
A view plugin for steering a robot using arrow keys or button clicks. More...
#include <gui/views/DriveView.h>
Signals | |
void | viewClosed (ViewPart *view) |
void | viewDestroyed (ViewPart *view) |
void | viewActivated (ViewPart *view) |
void | minimizedRequested (ViewPart *view) |
void | currentDockLocationChanged (Qt::DockWidgetArea area) |
Public Member Functions | |
virtual void | init (IWorkbenchPartSite *site) |
IWorkbenchPartSite * | getSite () |
virtual void | activate () |
virtual void | deactivate () |
virtual Qt::DockWidgetArea | getDefaultDockArea () const |
bool | isVisible () const |
Qt::DockWidgetArea | getDockArea () const |
bool | isActivated () const |
Class const & | getClass () const |
Static Public Member Functions | |
static PseudoClass const & | CLASS () |
Protected Slots | |
virtual void | onVisibilityChanged (bool visible) |
void | onMinimizeRequested () |
void | onDockLocationChanged (Qt::DockWidgetArea area) |
void | onTopLevelChanged (bool topLevel) |
Protected Member Functions | |
virtual QWidget * | createPartControl () |
Implementation of mira::ViewPart. More... | |
void | driveServiceChanged () |
virtual void | focusInEvent (QFocusEvent *) |
virtual void | closeEvent (QCloseEvent *) |
QMenu * | getViewMenu () |
ViewPartTitleBar * | getTitleBar () |
void | paintEvent (QPaintEvent *event) |
virtual Class const & | internalGetClass () const=0 |
Protected Attributes | |
float | velocityIncrement |
The velocity increment, default: 0.1f [m/s]. More... | |
Duration | watchdogTimeout |
Watchdog interval for stopping when no commands are signaled. default: 5sec. More... | |
ServiceProperty | driveService |
The service name used for sending driving commands. More... | |
ChannelProperty< bool > | motorstopChannel |
The channel used for listening to the motorstop status. More... | |
ViewPartTitleBar * | mTitleBar |
A view plugin for steering a robot using arrow keys or button clicks.
Using the keyboard the robot can be steered with:
The keyboard control only works, if the drive view window has the current keyboard input focus!
If the robot has a current rotation velocity of non-zero and Up or Down is pressed, the translation is not changed but the rotation velocity is set to zero. So the robot stops turning and continues to move straight forward or backward.
The drive view uses RPCs of a service object, which can be configured by the member driveService. To be able to drive the robot, this service must provide at least the method IMotorController::setVelocity(const Velocity2&). Furthermore, the service should provide the methods IMotorController::resetMotorStop() and IMotorController::resetOdometry() to be able to reset the "stop" flag and to reset the odometry to zero (see class robot::IDrive for more details).
If no service is explicitly given by driveService, the DriveView tries to find a service called "IDrive".
|
protectedvirtual |
Implementation of mira::ViewPart.
Implements ViewPart.
|
protected |
|
protected |
The velocity increment, default: 0.1f [m/s].
|
protected |
Watchdog interval for stopping when no commands are signaled. default: 5sec.
|
protected |
The service name used for sending driving commands.
|
protected |
The channel used for listening to the motorstop status.