-
Notifications
You must be signed in to change notification settings - Fork 340
Add EntitySemantics system that enables setting categories and tags #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
…d removal (gazebosim#3002) This is necessary for use with the `SetState` API. This API is commonly used to create a local version of the servers ECM that is periodically synchronized. However, without exposing this function into our public API additions and removals of entities or components are not reflected in the local ECM. Currently, we use `friend` relationships for the `GuiRunner` class to allow it to run these functions, but this is not feasible for external code that wants to use `SetState`. https://github.com/gazebosim/gz-sim/blob/5ce62a8826b930078fae940288ac9677aae9ec7b/include/gz/sim/EntityComponentManager.hh#L834, https://github.com/gazebosim/gz-sim/blob/5ce62a8826b930078fae940288ac9677aae9ec7b/src/gui/GuiRunner.cc#L316-L318 Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch updates the bazel build to include the new entity_semantics system. We can include it here or submit another PR for this.
bazel.patch
diff --git a/BUILD.bazel b/BUILD.bazel
index 5fbd1714d..a09fe2810 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -701,6 +701,26 @@ gz_sim_system_libraries(
# ],
# )
+gz_sim_system_libraries(
+ srcs = glob(
+ [
+ "src/systems/entity_semantics/**/*.cc",
+ "src/systems/entity_semantics/**/*.hh",
+ ],
+ ),
+ so_lib_name = "gz-sim-entity-semantics-system.so",
+ static_lib_name = "gz-sim-entity-semantics-system-static",
+ visibility = ["//visibility:public"],
+ deps = [
+ ":gz-sim",
+ "@gz-common",
+ "@gz-common//profiler",
+ "@gz-plugin//:register",
+ "@gz-transport",
+ "@sdformat",
+ ],
+)
+
gz_sim_system_libraries(
srcs = glob(
[
namespace gz::sim::systems | ||
{ | ||
////////////////////////////////////////////////// | ||
void EntitySemantics::PreUpdate(const UpdateInfo &, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows CI picked up a warning here:
C:\J\workspace\gz_sim-pr-cnlwin\ws\src\gz-sim\src\systems\entity_semantics\EntitySemantics.cc(70,6): error C2653: 'EntitySemantics': is not a class or namespace name [C:\J\workspace\gz_sim-pr-cnlwin\ws\build\gz-sim\src\systems\entity_semantics\gz-sim-entity-semantics-system.vcxproj]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully fixed by 6cc2ac6
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Ian Chen <ichen@openrobotics.org>
Thanks for the Bazel patch: 9097a00 |
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
The |
🎉 New feature
Summary
System for assigning semantics to entities, such as models, by classifying them into categories and assigning them tags.
Reference:
https://github.com/ros-simulation/simulation_interfaces/blob/1.0.0/msg/EntityCategory.msg,
https://github.com/ros-simulation/simulation_interfaces/blob/1.0.0/msg/TagsFilter.msg
This system is meant to be attached to a
<world>
, but it parses parametersfound in entities such as models.
Example:
This is a nice to have for gazebosim/ros_gz#790 in order to implement the GetEntityInfo service as well as to allow filtering based on categories and tags in GetEntities
Test it
Future work:
Label
system which is used to add semantic labels to visuals for segmentation.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.