Skip to content

Conversation

arjo129
Copy link
Contributor

@arjo129 arjo129 commented Jun 18, 2025

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

🎉 New feature

Closes #

Summary

Adds a ui to attach a plugin from the Qt GUI itself to an object.
add_plugin_ux

Test it

Right click on any entity, click "Attach Plugin" you should see the UI and plugin.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Generated-by: Remove this if GenAI was not used.

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

Adds a ui to attach a plugin from the Qt GUI itself to an object.

Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 requested a review from mjcarroll as a code owner June 18, 2025 09:49
@github-actions github-actions bot added the 🪵 jetty Gazebo Jetty label Jun 18, 2025

emit ContextMenuRequested(visual->Name().c_str());
uint64_t entityId = kNullEntity;
if (std::holds_alternative<uint64_t>(visual->UserData("gazebo-entity")))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <variant>

}

emit ContextMenuRequested(visual->Name().c_str());
uint64_t entityId = kNullEntity;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <cstdint>


this->dataPtr->removeService =
"/world/" + this->dataPtr->worldName + "/remove";

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove new line

/////////////////////////////////////////////////
void EntityContextMenu::OnAddPlugin(const QString &_name,
const QString &_filename, const QString &_innerXml,
const uint64_t _entity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <cstdint>

}
this->dataPtr->addPluginService =
"/world/" + this->dataPtr->worldName + "/entity/system/add";
std::function<void(const msgs::Boolean &, const bool)> cb =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <functional>

Comment on lines 382 to 384
"/world/" + this->dataPtr->worldName + "/remove";

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"/world/" + this->dataPtr->worldName + "/remove";
}
"/world/" + this->dataPtr->worldName + "/remove";
}

this->dataPtr->worldName = worldNameVariant.toString().toStdString();
}

this->dataPtr->removeService =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if service name is valid transport::TopicUtils::AsValidTopic

Comment on lines 92 to 93
/// \param[in] _request Request type
/// \param[in] _data Request data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix doc

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Jun 18, 2025
arjo129 added 3 commits June 19, 2025 02:47
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
@iche033
Copy link
Contributor

iche033 commented Jun 20, 2025

note the component inspector also has a + on the top right corner that pops up a dialog for adding a plugin to an entity. It would be nice to consolidate / reuse the code if possible.

@arjo129
Copy link
Contributor Author

arjo129 commented Jun 20, 2025

Oh wow I was not aware of this, will look into how we canreuse the code across both the "+" is incredibly small on my gazebosim which is probably why I missed it. Also the fact that its in the component inspector and not the component inspector editor where I'd expect it to be.

@azeey azeey added this to the Jetty Release milestone Jul 28, 2025
@arjo129 arjo129 moved this from In review to In progress in Core development Aug 7, 2025
@azeey
Copy link
Contributor

azeey commented Aug 18, 2025

It would be great to get this in since it's a lot more discoverable than the one in the component inspector, but as @iche033 said, is there a way we could reuse the existing code?

@arjo129
Copy link
Contributor Author

arjo129 commented Aug 24, 2025

I don't think this will make jetty.

@arjo129 arjo129 removed this from the Jetty Release milestone Aug 24, 2025
@azeey
Copy link
Contributor

azeey commented Aug 25, 2025

@arjo129, okay. thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪵 jetty Gazebo Jetty
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

4 participants