From 317a3246ce3d7d7ee88212d3a3f7ee954f5bf607 Mon Sep 17 00:00:00 2001 From: Ayush Ghosh Date: Tue, 1 Apr 2025 13:06:44 -0700 Subject: [PATCH 01/13] Added new interfaces for simulation worlds --- CMakeLists.txt | 5 +++++ README.md | 6 +++++- msg/SimulatorFeatures.msg | 5 +++++ msg/WorldResource.msg | 16 ++++++++++++++++ srv/GetAvailableWorlds.srv | 10 ++++++++++ srv/GetCurrentWorld.srv | 8 ++++++++ srv/LoadWorld.srv | 23 +++++++++++++++++++++++ srv/UnloadWorld.srv | 7 +++++++ 8 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 msg/WorldResource.msg create mode 100644 srv/GetAvailableWorlds.srv create mode 100644 srv/GetCurrentWorld.srv create mode 100644 srv/LoadWorld.srv create mode 100644 srv/UnloadWorld.srv diff --git a/CMakeLists.txt b/CMakeLists.txt index f9f6b0d..278d47f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ set(msg_files "msg/SimulatorFeatures.msg" "msg/Spawnable.msg" "msg/TagsFilter.msg" + "msg/WorldResource.msg" ) set(srv_files @@ -47,6 +48,10 @@ set(srv_files "srv/SetSimulationState.srv" "srv/SpawnEntity.srv" "srv/StepSimulation.srv" + "srv/LoadWorld.srv" + "srv/UnloadWorld.srv" + "srv/GetCurrentWorld.srv" + "srv/GetAvailableWorlds.srv" ) set(action_files diff --git a/README.md b/README.md index 55c9481..d52b436 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,8 @@ Some interfaces represent optional utility and are considered lower priority: - [GetNamedPoseBounds](srv/GetNamedPoseBounds.srv) - [GetNamedPoses](srv/GetNamedPoses.srv) - [GetSpawnables](srv/GetSpawnables.srv) -- [SetEntityInfo](srv/SetEntityInfo.srv) \ No newline at end of file +- [SetEntityInfo](srv/SetEntityInfo.srv) +- [GetAvailableWorlds](srv/GetAvailableWorlds.srv) +- [LoadWorld](srv/LoadWorld.srv) +- [UnloadWorld](srv/UnloadWorld.srv) +- [GetCurrentWorld](srv/GetCurrentWorld.srv) \ No newline at end of file diff --git a/msg/SimulatorFeatures.msg b/msg/SimulatorFeatures.msg index 023c80d..244d7db 100644 --- a/msg/SimulatorFeatures.msg +++ b/msg/SimulatorFeatures.msg @@ -31,6 +31,11 @@ uint8 STEP_SIMULATION_MULTIPLE = 32 # Supports multi-stepping through simu # service or through SimulateSteps action. uint8 STEP_SIMULATION_ACTION = 33 # Supports SimulateSteps action interface. +uint8 WORLD_LOADING = 40 # Supports LoadWorld interface +uint8 WORLD_LOADING_RESOURCE_STRING = 41 # Supports LoadWorld resource_string field +uint8 WORLD_UNLOADING = 42 # Supports UnloadWorld interface +uint8 WORLD_INFO_GETTING = 43 # Supports GetCurrentWorld interface +uint8 AVAILABLE_WORLDS = 44 # Supports GetAvailableWorlds interface uint16[] features # A list of simulation features as specified by the list above. diff --git a/msg/WorldResource.msg b/msg/WorldResource.msg new file mode 100644 index 0000000..3f5b3a4 --- /dev/null +++ b/msg/WorldResource.msg @@ -0,0 +1,16 @@ +# World resource that can be loaded into the simulation + +# World name +string name + +# URI which will be accepted by LoadWorld service +string uri + +# Optional description of the world +string description + +# Optional tags describing the world (e.g., "indoor", "outdoor", "warehouse") +string[] tags + +# Whether this is the simulator's default/initial world +bool is_default \ No newline at end of file diff --git a/srv/GetAvailableWorlds.srv b/srv/GetAvailableWorlds.srv new file mode 100644 index 0000000..8a4b9c5 --- /dev/null +++ b/srv/GetAvailableWorlds.srv @@ -0,0 +1,10 @@ +# Return a list of available world resources which are valid as LoadWorld uri fields + +# Optional field for additional sources (local or remote) to search +string[] sources +--- +# Standard result message +simulation_interfaces/Result result + +# Available world resources with URI and additional information +simulation_interfaces/WorldResource[] worlds \ No newline at end of file diff --git a/srv/GetCurrentWorld.srv b/srv/GetCurrentWorld.srv new file mode 100644 index 0000000..586f77b --- /dev/null +++ b/srv/GetCurrentWorld.srv @@ -0,0 +1,8 @@ +# Get information about the currently loaded world in the simulation + +--- +# Standard result message +simulation_interfaces/Result result + +# Information about the currently loaded world +simulation_interfaces/WorldResource world \ No newline at end of file diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv new file mode 100644 index 0000000..ebfa8d7 --- /dev/null +++ b/srv/LoadWorld.srv @@ -0,0 +1,23 @@ +# Load a simulation world from a file or resource + +# Resource such as SDF, URDF, USD, or MJCF world file +string uri + +# World definition passed as a string +string resource_string + +# If true, existing entities will be cleared before loading the new world +bool clear_entities +--- +# Error Codes +uint8 UNSUPPORTED_FORMAT = 101 # Format for uri or resource string is unsupported +uint8 NO_RESOURCE = 102 # Both uri and resource string are empty +uint8 RESOURCE_PARSE_ERROR = 103 # Resource file or string failed to parse +uint8 MISSING_ASSETS = 104 # At least one of resource assets (such as meshes) was not found +uint8 UNSUPPORTED_ASSETS = 105 # At least one of resource assets (such as meshes) is not supported + +# Standard result message +simulation_interfaces/Result result + +# Information about the loaded world +simulation_interfaces/WorldResource world diff --git a/srv/UnloadWorld.srv b/srv/UnloadWorld.srv new file mode 100644 index 0000000..2491202 --- /dev/null +++ b/srv/UnloadWorld.srv @@ -0,0 +1,7 @@ +# Unload the current simulation world + +# If true, existing dynamically spawned entities will remain +bool keep_entities +--- +# Standard result message +simulation_interfaces/Result result \ No newline at end of file From 7fa4b9772fed445629bbca067e4f879376b6e8eb Mon Sep 17 00:00:00 2001 From: Ayush Ghosh Date: Tue, 1 Apr 2025 13:09:31 -0700 Subject: [PATCH 02/13] Fix formatting --- msg/WorldResource.msg | 2 +- srv/GetAvailableWorlds.srv | 2 +- srv/GetCurrentWorld.srv | 2 +- srv/UnloadWorld.srv | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/msg/WorldResource.msg b/msg/WorldResource.msg index 3f5b3a4..dbfb307 100644 --- a/msg/WorldResource.msg +++ b/msg/WorldResource.msg @@ -13,4 +13,4 @@ string description string[] tags # Whether this is the simulator's default/initial world -bool is_default \ No newline at end of file +bool is_default diff --git a/srv/GetAvailableWorlds.srv b/srv/GetAvailableWorlds.srv index 8a4b9c5..5250719 100644 --- a/srv/GetAvailableWorlds.srv +++ b/srv/GetAvailableWorlds.srv @@ -7,4 +7,4 @@ string[] sources simulation_interfaces/Result result # Available world resources with URI and additional information -simulation_interfaces/WorldResource[] worlds \ No newline at end of file +simulation_interfaces/WorldResource[] worlds diff --git a/srv/GetCurrentWorld.srv b/srv/GetCurrentWorld.srv index 586f77b..566584c 100644 --- a/srv/GetCurrentWorld.srv +++ b/srv/GetCurrentWorld.srv @@ -5,4 +5,4 @@ simulation_interfaces/Result result # Information about the currently loaded world -simulation_interfaces/WorldResource world \ No newline at end of file +simulation_interfaces/WorldResource world diff --git a/srv/UnloadWorld.srv b/srv/UnloadWorld.srv index 2491202..2cd44ca 100644 --- a/srv/UnloadWorld.srv +++ b/srv/UnloadWorld.srv @@ -4,4 +4,4 @@ bool keep_entities --- # Standard result message -simulation_interfaces/Result result \ No newline at end of file +simulation_interfaces/Result result From 4a2b01a050f33076cf8be6ff90a0aa556660ff30 Mon Sep 17 00:00:00 2001 From: Ayush Ghosh Date: Tue, 1 Apr 2025 14:51:56 -0700 Subject: [PATCH 03/13] Updated descriptions --- srv/GetAvailableWorlds.srv | 2 ++ srv/GetCurrentWorld.srv | 2 ++ srv/LoadWorld.srv | 5 +++++ srv/UnloadWorld.srv | 2 ++ 4 files changed, 11 insertions(+) diff --git a/srv/GetAvailableWorlds.srv b/srv/GetAvailableWorlds.srv index 5250719..80a7ee2 100644 --- a/srv/GetAvailableWorlds.srv +++ b/srv/GetAvailableWorlds.srv @@ -1,4 +1,6 @@ # Return a list of available world resources which are valid as LoadWorld uri fields +# +# Support for this interface is indicated through the AVAILABLE_WORLDS value in GetSimulatorFeatures. # Optional field for additional sources (local or remote) to search string[] sources diff --git a/srv/GetCurrentWorld.srv b/srv/GetCurrentWorld.srv index 566584c..5473f8b 100644 --- a/srv/GetCurrentWorld.srv +++ b/srv/GetCurrentWorld.srv @@ -1,4 +1,6 @@ # Get information about the currently loaded world in the simulation +# +# Support for this interface is indicated through the WORLD_INFO_GETTING value in GetSimulatorFeatures. --- # Standard result message diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index ebfa8d7..756923d 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -1,4 +1,9 @@ # Load a simulation world from a file or resource +# +# Support for this interface is indicated through the WORLD_LOADING value in GetSimulatorFeatures. +# Support for the resource_string field is indicated through the WORLD_LOADING_RESOURCE_STRING value in GetSimulatorFeatures. + +# Existing worlds will be unloaded before attempting to load a new one. # Resource such as SDF, URDF, USD, or MJCF world file string uri diff --git a/srv/UnloadWorld.srv b/srv/UnloadWorld.srv index 2cd44ca..1004429 100644 --- a/srv/UnloadWorld.srv +++ b/srv/UnloadWorld.srv @@ -1,4 +1,6 @@ # Unload the current simulation world +# +# Support for this interface is indicated through the WORLD_UNLOADING value in GetSimulatorFeatures. # If true, existing dynamically spawned entities will remain bool keep_entities From 1d526615c798f1edf2a8a93985d5307603337d1c Mon Sep 17 00:00:00 2001 From: Ayush Ghosh Date: Thu, 10 Apr 2025 19:46:58 -0700 Subject: [PATCH 04/13] Added STATE_INITIALIZING in SimulationState.msg --- msg/SimulationState.msg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/msg/SimulationState.msg b/msg/SimulationState.msg index 41e3942..65d3bd6 100644 --- a/msg/SimulationState.msg +++ b/msg/SimulationState.msg @@ -13,4 +13,6 @@ uint8 STATE_QUITTING = 3 # Closing the simulator application. Swit # Running simulation application is outside of the simulation interfaces as # there is no service to handle the call when the simulator is not up. +uint8 STATE_INITIALIZING = 4 # Simulation resources are being loaded. The simulation is inactive + # and cannot be started, stopped, or paused. uint8 state From 26c067e957ecb82ff9b885c30b184c6d64687e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20D=C4=85browski?= Date: Thu, 17 Apr 2025 13:45:42 +0200 Subject: [PATCH 05/13] suggested changes to simulation interface worlds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adam Dąbrowski --- msg/SimulatorFeatures.msg | 2 +- msg/WorldResource.msg | 14 ++++++++------ srv/GetAvailableWorlds.srv | 17 +++++++++++------ srv/GetCurrentWorld.srv | 12 +++++++----- srv/LoadWorld.srv | 39 +++++++++++++++++++------------------- srv/UnloadWorld.srv | 11 ++++++----- 6 files changed, 53 insertions(+), 42 deletions(-) diff --git a/msg/SimulatorFeatures.msg b/msg/SimulatorFeatures.msg index 244d7db..a4ca133 100644 --- a/msg/SimulatorFeatures.msg +++ b/msg/SimulatorFeatures.msg @@ -32,7 +32,7 @@ uint8 STEP_SIMULATION_MULTIPLE = 32 # Supports multi-stepping through simu uint8 STEP_SIMULATION_ACTION = 33 # Supports SimulateSteps action interface. uint8 WORLD_LOADING = 40 # Supports LoadWorld interface -uint8 WORLD_LOADING_RESOURCE_STRING = 41 # Supports LoadWorld resource_string field +uint8 WORLD_LOADING_STRING = 41 # Supports LoadWorld resource_string field uint8 WORLD_UNLOADING = 42 # Supports UnloadWorld interface uint8 WORLD_INFO_GETTING = 43 # Supports GetCurrentWorld interface uint8 AVAILABLE_WORLDS = 44 # Supports GetAvailableWorlds interface diff --git a/msg/WorldResource.msg b/msg/WorldResource.msg index dbfb307..db92f48 100644 --- a/msg/WorldResource.msg +++ b/msg/WorldResource.msg @@ -1,9 +1,14 @@ -# World resource that can be loaded into the simulation +# World is a virtual environment in which the simulation happens. +# Worlds are also known as scenes or levels in some simulators. +# Depending on the world format, loading of a world might be associated with changes +# in certain parameters, including physics settings such as gravity. +# World resources may be defined in standard or simulation-specific formats, +# and, depending on the simulator, loaded from local or remote repositories. -# World name +# World name, which is not necessarily unique. string name -# URI which will be accepted by LoadWorld service +# URI which will be accepted by LoadWorld service, unique per world. string uri # Optional description of the world @@ -11,6 +16,3 @@ string description # Optional tags describing the world (e.g., "indoor", "outdoor", "warehouse") string[] tags - -# Whether this is the simulator's default/initial world -bool is_default diff --git a/srv/GetAvailableWorlds.srv b/srv/GetAvailableWorlds.srv index 80a7ee2..4232c9e 100644 --- a/srv/GetAvailableWorlds.srv +++ b/srv/GetAvailableWorlds.srv @@ -1,12 +1,17 @@ -# Return a list of available world resources which are valid as LoadWorld uri fields -# +# Return a list of available world resources which can be used with LoadWorld. # Support for this interface is indicated through the AVAILABLE_WORLDS value in GetSimulatorFeatures. -# Optional field for additional sources (local or remote) to search +# Optional field for additional sources (local or remote) to search, +# specified as standard URIs if possible. string[] sources + +# Only get worlds with tags matching the filter +TagsFilter filter + --- + # Standard result message -simulation_interfaces/Result result +Result result -# Available world resources with URI and additional information -simulation_interfaces/WorldResource[] worlds +# Available world resources. +WorldResource[] worlds diff --git a/srv/GetCurrentWorld.srv b/srv/GetCurrentWorld.srv index 5473f8b..4ab9aad 100644 --- a/srv/GetCurrentWorld.srv +++ b/srv/GetCurrentWorld.srv @@ -1,10 +1,12 @@ -# Get information about the currently loaded world in the simulation -# +# Get information about the currently loaded world in the simulation. # Support for this interface is indicated through the WORLD_INFO_GETTING value in GetSimulatorFeatures. --- + +uint8 NO_WORLD_LOADED = 101 # No world is loaded at the moment. + # Standard result message -simulation_interfaces/Result result +Result result -# Information about the currently loaded world -simulation_interfaces/WorldResource world +# Information about the currently loaded world. Only valid if result is RESULT_OK. +WorldResource world diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index 756923d..a5a3cfd 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -1,28 +1,29 @@ -# Load a simulation world from a file or resource -# +# Load a simulation world from a file or resource. # Support for this interface is indicated through the WORLD_LOADING value in GetSimulatorFeatures. -# Support for the resource_string field is indicated through the WORLD_LOADING_RESOURCE_STRING value in GetSimulatorFeatures. +# Resource_string field support is indicated through the WORLD_RESOURCE_STRING value in GetSimulatorFeatures. +# Currently loaded worlds will be unloaded before attempting to load a new one. +# Any previously spawned entities will be removed. -# Existing worlds will be unloaded before attempting to load a new one. - -# Resource such as SDF, URDF, USD, or MJCF world file +# Resource such as SDF, URDF, USD, MJCF, or other simulator-native format world file. string uri -# World definition passed as a string +# Simulation world passed as a string. This field is used if the uri field is empty. string resource_string -# If true, existing entities will be cleared before loading the new world -bool clear_entities +# Fail on unsupported elements (such as SDFormat sub-tags). By default, such elements are ignored. +bool fail_on_unsupported_element + +# Ignore missing or unsupported assets. By default, missing or unsupported assets result in failure. +bool ignore_missing_or_unsupported_assets + --- -# Error Codes -uint8 UNSUPPORTED_FORMAT = 101 # Format for uri or resource string is unsupported -uint8 NO_RESOURCE = 102 # Both uri and resource string are empty -uint8 RESOURCE_PARSE_ERROR = 103 # Resource file or string failed to parse -uint8 MISSING_ASSETS = 104 # At least one of resource assets (such as meshes) was not found -uint8 UNSUPPORTED_ASSETS = 105 # At least one of resource assets (such as meshes) is not supported -# Standard result message -simulation_interfaces/Result result +uint8 UNSUPPORTED_FORMAT = 101 # Format for uri or resource string is unsupported. +uint8 NO_RESOURCE = 102 # Both uri and resource string are empty. +uint8 RESOURCE_PARSE_ERROR = 103 # Resource file or string failed to parse. +uint8 MISSING_ASSETS = 104 # At least one of resource assets (such as meshes) was not found. +uint8 UNSUPPORTED_ASSETS = 105 # At least one of resource assets (such as meshes) is not supported. +uint8 UNSUPPORTED_ELEMENTS = 106 # At least one of world definition elements such as format tags is unsupported. -# Information about the loaded world -simulation_interfaces/WorldResource world +# Standard result message +Result result diff --git a/srv/UnloadWorld.srv b/srv/UnloadWorld.srv index 1004429..49ced6a 100644 --- a/srv/UnloadWorld.srv +++ b/srv/UnloadWorld.srv @@ -1,9 +1,10 @@ -# Unload the current simulation world -# +# Unload the current simulation world. # Support for this interface is indicated through the WORLD_UNLOADING value in GetSimulatorFeatures. +# Any previously spawned entities will be removed. -# If true, existing dynamically spawned entities will remain -bool keep_entities --- + +uint8 NO_WORLD_LOADED = 101 # No world is loaded at the moment. + # Standard result message -simulation_interfaces/Result result +Result result From bc1330a84c3a20a2f5920556d689f7f2351b2076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20D=C4=85browski?= Date: Tue, 22 Apr 2025 10:44:30 +0200 Subject: [PATCH 06/13] Applied review remarks + added extra feature field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adam Dąbrowski --- msg/SimulatorFeatures.msg | 9 +++++---- srv/GetAvailableWorlds.srv | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/msg/SimulatorFeatures.msg b/msg/SimulatorFeatures.msg index a4ca133..2ea1ce3 100644 --- a/msg/SimulatorFeatures.msg +++ b/msg/SimulatorFeatures.msg @@ -32,10 +32,11 @@ uint8 STEP_SIMULATION_MULTIPLE = 32 # Supports multi-stepping through simu uint8 STEP_SIMULATION_ACTION = 33 # Supports SimulateSteps action interface. uint8 WORLD_LOADING = 40 # Supports LoadWorld interface -uint8 WORLD_LOADING_STRING = 41 # Supports LoadWorld resource_string field -uint8 WORLD_UNLOADING = 42 # Supports UnloadWorld interface -uint8 WORLD_INFO_GETTING = 43 # Supports GetCurrentWorld interface -uint8 AVAILABLE_WORLDS = 44 # Supports GetAvailableWorlds interface +uint8 WORLD_RESOURCE_STRING = 41 # Supports LoadWorld resource_string field +uint8 WORLD_TAGS = 42 # Supports world tags and tag filtering +uint8 WORLD_UNLOADING = 43 # Supports UnloadWorld interface +uint8 WORLD_INFO_GETTING = 44 # Supports GetCurrentWorld interface +uint8 AVAILABLE_WORLDS = 45 # Supports GetAvailableWorlds interface uint16[] features # A list of simulation features as specified by the list above. diff --git a/srv/GetAvailableWorlds.srv b/srv/GetAvailableWorlds.srv index 4232c9e..c47a4a0 100644 --- a/srv/GetAvailableWorlds.srv +++ b/srv/GetAvailableWorlds.srv @@ -5,7 +5,8 @@ # specified as standard URIs if possible. string[] sources -# Only get worlds with tags matching the filter +# Only get worlds with tags matching the filter. The filter is optional and none by default. +# This feature is supported if WORLD_TAGS feature is included in output of GetSimulatorFeatures. TagsFilter filter --- From 1d17053d17aeb7592d02ba3dbc1ca1910e2fefea Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Fri, 2 May 2025 00:38:01 +0200 Subject: [PATCH 07/13] Update srv/GetAvailableWorlds.srv Co-authored-by: Martin Pecka --- srv/GetAvailableWorlds.srv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/GetAvailableWorlds.srv b/srv/GetAvailableWorlds.srv index c47a4a0..5ca6e07 100644 --- a/srv/GetAvailableWorlds.srv +++ b/srv/GetAvailableWorlds.srv @@ -5,7 +5,7 @@ # specified as standard URIs if possible. string[] sources -# Only get worlds with tags matching the filter. The filter is optional and none by default. +# Only get worlds with tags matching the filter. The filter is optional and matches everything by default. # This feature is supported if WORLD_TAGS feature is included in output of GetSimulatorFeatures. TagsFilter filter From ebc825a89304b580da3ca57a472781007bc0c30a Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Fri, 2 May 2025 00:40:18 +0200 Subject: [PATCH 08/13] Update srv/LoadWorld.srv Co-authored-by: Martin Pecka --- srv/LoadWorld.srv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index a5a3cfd..b2bb60f 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -1,6 +1,6 @@ # Load a simulation world from a file or resource. # Support for this interface is indicated through the WORLD_LOADING value in GetSimulatorFeatures. -# Resource_string field support is indicated through the WORLD_RESOURCE_STRING value in GetSimulatorFeatures. +# resource_string field support is indicated through the WORLD_RESOURCE_STRING value in GetSimulatorFeatures. # Currently loaded worlds will be unloaded before attempting to load a new one. # Any previously spawned entities will be removed. From ac35bad284d8a5fb83382095d9b2cefd5883b82a Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Fri, 2 May 2025 00:47:11 +0200 Subject: [PATCH 09/13] Removed urdf mention in LoadWorld service --- srv/LoadWorld.srv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index b2bb60f..6b3e91f 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -4,7 +4,7 @@ # Currently loaded worlds will be unloaded before attempting to load a new one. # Any previously spawned entities will be removed. -# Resource such as SDF, URDF, USD, MJCF, or other simulator-native format world file. +# Resource such as SDF, USD, MJCF, or other simulator-native format world file. string uri # Simulation world passed as a string. This field is used if the uri field is empty. From a509fe16ee8a8e41608ac1b3bc1d4791005cf41f Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Mon, 5 May 2025 17:05:10 +0200 Subject: [PATCH 10/13] Update srv/LoadWorld.srv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adam Dąbrowski --- srv/LoadWorld.srv | 1 + 1 file changed, 1 insertion(+) diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index 6b3e91f..32c19aa 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -1,4 +1,5 @@ # Load a simulation world from a file or resource. +# This means clearing the current scene (removing all entities), loading the new world and setting the simulation to the stopped state. # Support for this interface is indicated through the WORLD_LOADING value in GetSimulatorFeatures. # resource_string field support is indicated through the WORLD_RESOURCE_STRING value in GetSimulatorFeatures. # Currently loaded worlds will be unloaded before attempting to load a new one. From fdf07e45930e601d3fe59e49ab2d89292e12d967 Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Tue, 6 May 2025 12:50:17 +0200 Subject: [PATCH 11/13] Added WorldResource in LoadWorld and renamed to STATE_NO_WORLD in SimulationState --- msg/SimulationState.msg | 4 ++-- srv/LoadWorld.srv | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/msg/SimulationState.msg b/msg/SimulationState.msg index 65d3bd6..c5e4175 100644 --- a/msg/SimulationState.msg +++ b/msg/SimulationState.msg @@ -13,6 +13,6 @@ uint8 STATE_QUITTING = 3 # Closing the simulator application. Swit # Running simulation application is outside of the simulation interfaces as # there is no service to handle the call when the simulator is not up. -uint8 STATE_INITIALIZING = 4 # Simulation resources are being loaded. The simulation is inactive - # and cannot be started, stopped, or paused. +uint8 STATE_NO_WORLD = 4 # Simulation world is currently unloaded and a new world has not finished loading yet. + # The simulation is inactive and cannot be started, stopped, or paused. uint8 state diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index 32c19aa..aa79694 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -3,7 +3,7 @@ # Support for this interface is indicated through the WORLD_LOADING value in GetSimulatorFeatures. # resource_string field support is indicated through the WORLD_RESOURCE_STRING value in GetSimulatorFeatures. # Currently loaded worlds will be unloaded before attempting to load a new one. -# Any previously spawned entities will be removed. +# Any previously spawned entities will be removed. Once a world is loaded, simulation will be left in a Stopped state. # Resource such as SDF, USD, MJCF, or other simulator-native format world file. string uri @@ -28,3 +28,6 @@ uint8 UNSUPPORTED_ELEMENTS = 106 # At least one of world definition elements # Standard result message Result result + +# Information about the loaded world. Only valid if result is RESULT_OK. +WorldResource world \ No newline at end of file From bf5f7b6ca7bfab7e716bd74d4c498596e754928e Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Tue, 6 May 2025 12:55:20 +0200 Subject: [PATCH 12/13] Fix formatting --- srv/LoadWorld.srv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srv/LoadWorld.srv b/srv/LoadWorld.srv index aa79694..60d437a 100644 --- a/srv/LoadWorld.srv +++ b/srv/LoadWorld.srv @@ -30,4 +30,4 @@ uint8 UNSUPPORTED_ELEMENTS = 106 # At least one of world definition elements Result result # Information about the loaded world. Only valid if result is RESULT_OK. -WorldResource world \ No newline at end of file +WorldResource world From 7e4a6548bfd6deefc8a05cbb20cbae06073ed260 Mon Sep 17 00:00:00 2001 From: Ayush Ghosh <149644562+ayushgnv@users.noreply.github.com> Date: Wed, 18 Jun 2025 23:42:01 -0700 Subject: [PATCH 13/13] Update msg/SimulationState.msg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adam Dąbrowski --- msg/SimulationState.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msg/SimulationState.msg b/msg/SimulationState.msg index c5e4175..cc13a48 100644 --- a/msg/SimulationState.msg +++ b/msg/SimulationState.msg @@ -13,6 +13,6 @@ uint8 STATE_QUITTING = 3 # Closing the simulator application. Swit # Running simulation application is outside of the simulation interfaces as # there is no service to handle the call when the simulator is not up. -uint8 STATE_NO_WORLD = 4 # Simulation world is currently unloaded and a new world has not finished loading yet. +uint8 STATE_NO_WORLD = 4 # Simulation world is currently unloaded, and/or a new world has not finished loading yet. # The simulation is inactive and cannot be started, stopped, or paused. uint8 state