From c89bbb75385441de975420ce756700fd1d2de09f Mon Sep 17 00:00:00 2001 From: Maksim Derbasov Date: Mon, 17 Aug 2026 01:31:14 +0900 Subject: [PATCH] Teleop: make default velocities configurable Signed-off-by: Maksim Derbasov --- src/plugins/teleop/Teleop.cc | 7 +++++++ src/plugins/teleop/Teleop.hh | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/plugins/teleop/Teleop.cc b/src/plugins/teleop/Teleop.cc index 29bfd0ba1..b9e0f5b48 100644 --- a/src/plugins/teleop/Teleop.cc +++ b/src/plugins/teleop/Teleop.cc @@ -125,6 +125,13 @@ void Teleop::LoadConfig(const tinyxml2::XMLElement *_pluginElem) auto topicElem = _pluginElem->FirstChildElement("topic"); if (nullptr != topicElem && nullptr != topicElem->GetText()) this->SetTopic(topicElem->GetText()); + if (auto maxFwd = _pluginElem->FirstChildElement("max_forward_velocity")) + this->SetMaxForwardVel(maxFwd->DoubleText(this->dataPtr->maxForwardVel)); + if (auto maxVrt = _pluginElem->FirstChildElement("max_vertical_velocity")) + this->SetMaxVerticalVel( + maxVrt->DoubleText(this->dataPtr->maxVerticalVel)); + if (auto maxYaw = _pluginElem->FirstChildElement("max_yaw_velocity")) + this->SetMaxYawVel(maxYaw->DoubleText(this->dataPtr->maxYawVel)); } App()->findChild()->QuickWindow()->installEventFilter(this); diff --git a/src/plugins/teleop/Teleop.hh b/src/plugins/teleop/Teleop.hh index 6bab0107b..200b51eca 100644 --- a/src/plugins/teleop/Teleop.hh +++ b/src/plugins/teleop/Teleop.hh @@ -45,6 +45,9 @@ namespace gz::gui::plugins /// vehicle in the world. /// ## Configuration /// * ``: Topic to publish twist messages to. + /// * ``: Maximum forward velocity. + /// * ``: Maximum vertical velocity. + /// * ``: Maximum yaw velocity. class Teleop_EXPORTS_API Teleop : public Plugin { Q_OBJECT