Ignition Gui

API Reference

7.0.0~pre1

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 load to the world.

Configuration

This plugin doesn't accept any custom configuration. More...

#include <Teleop.hh>

Public Slots

void OnAngularVelSelection (double _velocity)
 Callback in Qt thread when the angular velocity changes. More...
 
void OnKeySwitch (bool _checked)
 Callback in Qt thread when the keyboard is enabled or disabled. More...
 
void OnLinearVelSelection (double _velocity)
 Callback in Qt thread when the linear velocity changes. More...
 
void OnSlidersSwitch (bool _checked)
 Callback in Qt thread when the sliders is enabled or disabled. More...
 
void OnTeleopTwist ()
 Publish the twist message to the selected command velocity topic. More...
 
void OnTopicSelection (const QString &_topic)
 Callback in Qt thread when the topic changes. More...
 

Signals

void AngularDirectionChanged ()
 Notify that the angular direction changed. More...
 
void LinearDirectionChanged ()
 Notify that the linear direction changed. More...
 

Public Member Functions

 Teleop ()
 Constructor. More...
 
virtual ~Teleop ()
 Destructor. More...
 
Q_INVOKABLE int AngularDirection () const
 Returns the angular direction variable value. When the turn is counterclockwise it takes the value 1, when is clockwise it takes the value -1, and when it's 0 the movement stops. More...
 
Q_INVOKABLE int LinearDirection () const
 Returns the linear direction variable value. When the movement is forward it takes the value 1, when is backward it takes the value -1, and when it's 0 the movement stops. 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 void setAngularDirection (int _angularDir)
 Set the angular direction of the movement. More...
 
void SetKeyDirection ()
 Sets the movement direction when the keyboard is used. More...
 
Q_INVOKABLE void setLinearDirection (int _linearDir)
 Set the linear direction of the movement. 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 QObject *receiver, const char *method)
 
bool disconnect (const char *signal, 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

int angularDir
 Angular direction. More...
 
int linearDir
 Linear direction. 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 load to the world.

Configuration

This plugin doesn't accept any custom configuration.

Constructor & Destructor Documentation

◆ Teleop()

Teleop ( )

Constructor.

◆ ~Teleop()

virtual ~Teleop ( )
virtual

Destructor.

Member Function Documentation

◆ AngularDirection()

Q_INVOKABLE int AngularDirection ( ) const

Returns the angular direction variable value. When the turn is counterclockwise it takes the value 1, when is clockwise it takes the value -1, and when it's 0 the movement stops.

◆ AngularDirectionChanged

void AngularDirectionChanged ( )
signal

Notify that the angular direction changed.

◆ eventFilter()

bool eventFilter ( QObject _obj,
QEvent _event 
)
overrideprotectedvirtual

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

Reimplemented from QObject.

◆ LinearDirection()

Q_INVOKABLE int LinearDirection ( ) const

Returns the linear direction variable value. When the movement is forward it takes the value 1, when is backward it takes the value -1, and when it's 0 the movement stops.

◆ LinearDirectionChanged

void LinearDirectionChanged ( )
signal

Notify that the linear direction changed.

◆ LoadConfig()

virtual void LoadConfig ( const tinyxml2::XMLElement *  )
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.

◆ OnAngularVelSelection

void OnAngularVelSelection ( double  _velocity)
slot

Callback in Qt thread when the angular velocity changes.

Parameters
[in]_velocityvariable to indicate the angular velocity.

◆ 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.

◆ OnLinearVelSelection

void OnLinearVelSelection ( double  _velocity)
slot

Callback in Qt thread when the linear velocity changes.

Parameters
[in]_velocityvariable to indicate the linear velocity.

◆ OnSlidersSwitch

void OnSlidersSwitch ( bool  _checked)
slot

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

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

◆ OnTeleopTwist

void OnTeleopTwist ( )
slot

Publish the twist message to the selected command velocity topic.

◆ OnTopicSelection

void OnTopicSelection ( const QString _topic)
slot

Callback in Qt thread when the topic changes.

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

◆ setAngularDirection()

Q_INVOKABLE void setAngularDirection ( int  _angularDir)

Set the angular direction of the movement.

Parameters
[in]_angularDirModifier of the velocity for setting the direction of the rotation.

◆ SetKeyDirection()

void SetKeyDirection ( )

Sets the movement direction when the keyboard is used.

◆ setLinearDirection()

Q_INVOKABLE void setLinearDirection ( int  _linearDir)

Set the linear direction of the movement.

Parameters
[in]_linearDirModifier of the velocity for setting the movement direction.

Property Documentation

◆ angularDir

int angularDir
readwrite

Angular direction.

◆ linearDir

int linearDir
readwrite

Linear direction.


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