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>
|
void | OnKeySwitch (bool _checked) |
| Callback in Qt thread when the keyboard is enabled or disabled.
|
|
void | OnTeleopTwist (double _forwardVel, double _verticalVel, double _angVel) |
| Publish the twist message to the selected command velocity topic.
|
|
void | SetMaxForwardVel (double _velocity) |
| Callback in Qt thread when the forward velocity changes.
|
|
void | SetMaxVerticalVel (double _velocity) |
| Callback in Qt thread when the vertical velocity changes.
|
|
void | SetMaxYawVel (double _velocity) |
| Callback in Qt thread when the yaw velocity changes.
|
|
void | SetTopic (const QString &_topic) |
| Callback in Qt thread when the topic changes.
|
|
|
| Teleop () |
| Constructor.
|
|
| ~Teleop () override |
| Destructor.
|
|
void | LoadConfig (const tinyxml2::XMLElement *) override |
|
Q_INVOKABLE double | MaxForwardVel () const |
| Get the forward velocity.
|
|
Q_INVOKABLE double | MaxVerticalVel () const |
| Get the vertical velocity.
|
|
Q_INVOKABLE double | MaxYawVel () const |
| Get the yaw velocity.
|
|
void | SetKeyScale () |
| Sets the movement scale when the keyboard is used.
|
|
Q_INVOKABLE QString | Topic () const |
| Get the topic as a string, for example '/echo'.
|
|
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.
◆ Teleop()
◆ ~Teleop()
◆ eventFilter()
Filters events of type 'keypress' and 'keyrelease'.
◆ LoadConfig()
void LoadConfig |
( |
const tinyxml2::XMLElement * |
| ) |
|
|
override |
◆ 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] | _checked | variable 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] | _forwardVel | Forward velocity |
[in] | _verticalVel | Vertical velocity |
[in] | _angVel | Yaw velocity |
◆ 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] | _velocity | variable to indicate the forward velocity. |
◆ SetMaxVerticalVel
void SetMaxVerticalVel |
( |
double |
_velocity | ) |
|
|
slot |
Callback in Qt thread when the vertical velocity changes.
- Parameters
-
[in] | _velocity | variable to indicate the vertical velocity. |
◆ SetMaxYawVel
void SetMaxYawVel |
( |
double |
_velocity | ) |
|
|
slot |
Callback in Qt thread when the yaw velocity changes.
- Parameters
-
[in] | _velocity | variable to indicate the yaw velocity. |
◆ SetTopic
void SetTopic |
( |
const QString & |
_topic | ) |
|
|
slot |
Callback in Qt thread when the topic changes.
- Parameters
-
[in] | _topic | variable 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
Notify that topic has changed.
◆ maxForwardVel
◆ maxVerticalVel
◆ maxYawVel
◆ topic
The documentation for this class was generated from the following file: