Gazebo Gui

API Reference

3.12.1

Publish teleop stokes to a user selected topic, or to '/cmd_vel' if no topic is selected. Buttons, the keyboard or sliders can be used to move a vehicle in the world. More...

#include <Teleop.hh>

Public Slots

void OnKeySwitch (bool _checked)
 Callback in Qt thread when the keyboard is enabled or disabled. More...
 
void OnTeleopTwist (double _forwardVel, double _verticalVel, double _angVel)
 Publish the twist message to the selected command velocity topic. More...
 
void SetMaxForwardVel (double _velocity)
 Callback in Qt thread when the forward velocity changes. More...
 
void SetMaxVerticalVel (double _velocity)
 Callback in Qt thread when the vertical velocity changes. More...
 
void SetMaxYawVel (double _velocity)
 Callback in Qt thread when the yaw velocity changes. More...
 
void SetTopic (const QString &_topic)
 Callback in Qt thread when the topic changes. More...
 

Signals

void MaxForwardVelChanged ()
 Notify that forward velocity has changed. More...
 
void MaxVerticalVelChanged ()
 Notify that vertical velocity has changed. More...
 
void MaxYawVelChanged ()
 Notify that yaw velocity has changed. More...
 
void TopicChanged ()
 Notify that topic has changed. More...
 

Public Member Functions

 Teleop ()
 Constructor. More...
 
virtual ~Teleop ()
 Destructor. More...
 
virtual void LoadConfig (const tinyxml2::XMLElement *) override
 Load the plugin with a configuration file. Override this on custom plugins to handle custom configurations. More...
 
Q_INVOKABLE double MaxForwardVel () const
 Get the forward velocity. More...
 
Q_INVOKABLE double MaxVerticalVel () const
 Get the vertical velocity. More...
 
Q_INVOKABLE double MaxYawVel () const
 Get the yaw velocity. More...
 
void SetKeyScale ()
 Sets the movement scale when the keyboard is used. More...
 
Q_INVOKABLE QString Topic () const
 Get the topic as a string, for example '/echo'. More...
 
- Public Member Functions inherited from Plugin
 Plugin ()
 Constructor. More...
 
virtual ~Plugin ()
 Destructor. More...
 
QQuickItem * CardItem () const
 Get the card item which contains this plugin. The item is generated the first time this function is run. More...
 
virtual std::string ConfigStr ()
 Get the configuration XML as a string. More...
 
QQmlContext * Context () const
 Get the QML context where the plugin was created. More...
 
bool DeleteLaterRequested () const
 Get the value of the the delete_later element from the configuration file, which defaults to false. More...
 
void Load (const tinyxml2::XMLElement *_pluginElem)
 Load the plugin with a configuration file. This loads the default parameters and then calls LoadConfig(), which should be overridden to load custom parameters. More...
 
QQuickItem * PluginItem () const
 Get the plugin item. More...
 
void PostParentChanges ()
 Apply changes which should come after the plugin already has a parent. More...
 
virtual std::string Title () const
 Get title. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual ~QObject ()
 
bool blockSignals (bool block)
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThreadthread () const
 

Protected Member Functions

bool eventFilter (QObject *_obj, QEvent *_event) override
 Filters events of type 'keypress' and 'keyrelease'. More...
 
- Protected Member Functions inherited from Plugin
void DeleteLater ()
 Wait until the plugin has a parent, then close and delete the parent. More...
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Properties

double maxForwardVel
 Forward velocity. More...
 
double maxVerticalVel
 Vertical velocity. More...
 
double maxYawVel
 Yaw velocity. More...
 
QString topic
 Topic. More...
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Protected Attributes inherited from Plugin
std::string configStr
 XML configuration. More...
 
std::string title = ""
 Title to be displayed on top of plugin. More...
 

Detailed Description

Publish teleop stokes to a user selected topic, or to '/cmd_vel' if no topic is selected. Buttons, the keyboard or sliders can be used to move a vehicle in the world.

Configuration

  • <topic>: Topic to publish twist messages to.

Constructor & Destructor Documentation

◆ Teleop()

Teleop ( )

Constructor.

◆ ~Teleop()

virtual ~Teleop ( )
virtual

Destructor.

Member Function Documentation

◆ eventFilter()

bool eventFilter ( QObject _obj,
QEvent _event 
)
overrideprotectedvirtual

Filters events of type 'keypress' and 'keyrelease'.

Reimplemented from QObject.

◆ LoadConfig()

virtual void LoadConfig ( const tinyxml2::XMLElement *  _pluginElem)
overridevirtual

Load the plugin with a configuration file. Override this on custom plugins to handle custom configurations.

Called when a plugin is first created. This function should not be blocking.

See also
Load
Parameters
[in]_pluginElemElement containing configuration

Reimplemented from Plugin.

◆ MaxForwardVel()

Q_INVOKABLE double MaxForwardVel ( ) const

Get the forward velocity.

Returns
Forward velocity.

◆ MaxForwardVelChanged

void MaxForwardVelChanged ( )
signal

Notify that forward velocity has changed.

◆ MaxVerticalVel()

Q_INVOKABLE double MaxVerticalVel ( ) const

Get the vertical velocity.

Returns
Vertical velocity.

◆ MaxVerticalVelChanged

void MaxVerticalVelChanged ( )
signal

Notify that vertical velocity has changed.

◆ MaxYawVel()

Q_INVOKABLE double MaxYawVel ( ) const

Get the yaw velocity.

Returns
Yaw velocity.

◆ MaxYawVelChanged

void MaxYawVelChanged ( )
signal

Notify that yaw velocity has changed.

◆ OnKeySwitch

void OnKeySwitch ( bool  _checked)
slot

Callback in Qt thread when the keyboard is enabled or disabled.

Parameters
[in]_checkedvariable to indicate the state of the switch.

◆ OnTeleopTwist

void OnTeleopTwist ( double  _forwardVel,
double  _verticalVel,
double  _angVel 
)
slot

Publish the twist message to the selected command velocity topic.

Parameters
[in]_forwardVelForward velocity
[in]_verticalVelVertical velocity
[in]_angVelYaw velocity

◆ SetKeyScale()

void SetKeyScale ( )

Sets the movement scale when the keyboard is used.

◆ SetMaxForwardVel

void SetMaxForwardVel ( double  _velocity)
slot

Callback in Qt thread when the forward velocity changes.

Parameters
[in]_velocityvariable to indicate the forward velocity.

◆ SetMaxVerticalVel

void SetMaxVerticalVel ( double  _velocity)
slot

Callback in Qt thread when the vertical velocity changes.

Parameters
[in]_velocityvariable to indicate the vertical velocity.

◆ SetMaxYawVel

void SetMaxYawVel ( double  _velocity)
slot

Callback in Qt thread when the yaw velocity changes.

Parameters
[in]_velocityvariable to indicate the yaw velocity.

◆ SetTopic

void SetTopic ( const QString _topic)
slot

Callback in Qt thread when the topic changes.

Parameters
[in]_topicvariable to indicate the topic to publish the Twist commands.

◆ Topic()

Q_INVOKABLE QString Topic ( ) const

Get the topic as a string, for example '/echo'.

Returns
Topic

◆ TopicChanged

void TopicChanged ( )
signal

Notify that topic has changed.

Property Documentation

◆ maxForwardVel

double maxForwardVel
readwrite

Forward velocity.

◆ maxVerticalVel

double maxVerticalVel
readwrite

Vertical velocity.

◆ maxYawVel

double maxYawVel
readwrite

Yaw velocity.

◆ topic

QString topic
readwrite

Topic.


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