Skip to content

Commit bd2c0b4

Browse files
committed
Fixed formatting and updated the world services
1 parent 651fb61 commit bd2c0b4

File tree

4 files changed

+33
-35
lines changed

4 files changed

+33
-35
lines changed

srv/GetAvailableWorlds.srv

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Return a list of available world resources which can be used with LoadWorld.
22
# Support for this interface is indicated through the AVAILABLE_WORLDS value in GetSimulatorFeatures.
3+
# By default, a simulator will search its default local and online sources. If some
4+
# default sources can't be accessed (e.g. due to connectivity issues), the
5+
# DEFAULT_SOURCES_FAILED error result code will be returned.
36

4-
# Optional field for additional sources (local or remote) to search,
5-
# specified as standard URIs if possible.
6-
string[] additional_sources
7+
string[] additional_sources # Optional field for additional sources (local or remote) to search,
8+
# specified as standard URIs if possible.
79

8-
# Only get worlds with tags matching the filter. The filter is optional and matches everything by default.
9-
# This feature is supported if WORLD_TAGS feature is included in output of GetSimulatorFeatures.
10-
TagsFilter filter
10+
TagsFilter filter # Only get worlds with tags matching the filter. The filter is optional and matches everything by default.
11+
# This feature is supported if WORLD_TAGS feature is included in output of GetSimulatorFeatures.
1112

13+
bool offline_only # If true, only offline/local sources should be searched. Defaults to false.
14+
15+
bool continue_on_error # If true, the simulator will continue to search sources even if some fail.
16+
# The service will return success if any source yielded worlds. Defaults to false.
1217
---
1318

14-
# Standard result message
15-
Result result
19+
uint8 DEFAULT_SOURCES_FAILED = 101 # Some default sources could not be accessed.
20+
21+
Result result # Standard result message. A specific result code should be used if some sources were not accessible.
1622

17-
# Available world resources.
18-
WorldResource[] worlds
23+
WorldResource[] worlds # Available world resources.

srv/GetCurrentWorld.srv

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
---
55

6-
uint8 NO_WORLD_LOADED = 101 # No world is loaded at the moment.
6+
uint8 NO_WORLD_LOADED = 101 # No world is loaded at the moment.
77

8-
# Standard result message
9-
Result result
8+
Result result # Standard result message
109

11-
# Information about the currently loaded world. Only valid if result is RESULT_OK.
12-
WorldResource world
10+
WorldResource world # Information about the currently loaded world. Only valid if result is RESULT_OK.

srv/LoadWorld.srv

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,25 @@
55
# Currently loaded worlds will be unloaded before attempting to load a new one.
66
# Any previously spawned entities will be removed. Once a world is loaded, simulation will be left in a Stopped state.
77

8-
# Resource such as SDF, USD, MJCF, or other simulator-native format world file.
9-
string uri
8+
string uri # Resource such as SDF, USD, MJCF, or other simulator-native format world file.
109

11-
# Simulation world passed as a string. This field is used if the uri field is empty.
12-
string resource_string
10+
string resource_string # Simulation world passed as a string. This field is used if the uri field is empty.
1311

14-
# Fail on unsupported elements (such as SDFormat sub-tags). By default, such elements are ignored.
15-
bool fail_on_unsupported_element
12+
bool fail_on_unsupported_element # Fail on unsupported elements (such as SDFormat sub-tags). By default, such elements are ignored.
1613

17-
# Ignore missing or unsupported assets. By default, missing or unsupported assets result in failure.
18-
bool ignore_missing_or_unsupported_assets
14+
15+
bool ignore_missing_or_unsupported_assets # Ignore missing or unsupported assets. By default, missing or unsupported assets result in failure.
1916

2017
---
2118

22-
uint8 UNSUPPORTED_FORMAT = 101 # Format for uri or resource string is unsupported.
23-
uint8 NO_RESOURCE = 102 # Both uri and resource string are empty.
24-
uint8 RESOURCE_PARSE_ERROR = 103 # Resource file or string failed to parse.
25-
uint8 MISSING_ASSETS = 104 # At least one of resource assets (such as meshes) was not found.
26-
uint8 UNSUPPORTED_ASSETS = 105 # At least one of resource assets (such as meshes) is not supported.
27-
uint8 UNSUPPORTED_ELEMENTS = 106 # At least one of world definition elements such as format tags is unsupported.
19+
uint8 UNSUPPORTED_FORMAT = 101 # Format for uri or resource string is unsupported.
20+
uint8 NO_RESOURCE = 102 # Both uri and resource string are empty.
21+
uint8 RESOURCE_PARSE_ERROR = 103 # Resource file or string failed to parse.
22+
uint8 MISSING_ASSETS = 104 # At least one of resource assets (such as meshes) was not found.
23+
uint8 UNSUPPORTED_ASSETS = 105 # At least one of resource assets (such as meshes) is not supported.
24+
uint8 UNSUPPORTED_ELEMENTS = 106 # At least one of world definition elements such as format tags is unsupported.
25+
2826

29-
# Standard result message
30-
Result result
27+
Result result # Standard result message
3128

32-
# Information about the loaded world. Only valid if result is RESULT_OK.
33-
WorldResource world
29+
WorldResource world # Information about the loaded world. Only valid if result is RESULT_OK.

srv/UnloadWorld.srv

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66

77
uint8 NO_WORLD_LOADED = 101 # No world is loaded at the moment.
88

9-
# Standard result message
10-
Result result
9+
Result result # Standard result message

0 commit comments

Comments
 (0)