|
1 | | -# Spawn entities (a robot, other object) by name or URI |
2 | | -# Support for this interface is indicated through the SPAWNING_ARRAY value in GetSimulationFeatures. |
| 1 | +# Spawn entities (a robot, other object) by name or URI in a batch. |
| 2 | +# Support for this interface is indicated through the SPAWNING_BATCH value in GetSimulationFeatures. |
3 | 3 |
|
4 | 4 | string names[] # A list of names given to every entity |
5 | 5 | # If string is empty, a name field in the uri file or resource_string will be used, |
6 | 6 | # if supported and not empty (e.g. "name" field in SDFormat, URDF). |
7 | 7 | # If the name is still empty or not unique (as determined by the simulator), |
8 | 8 | # the service returns a generated name in the entity_name response field if the |
9 | 9 | # allow_renaming field is set to true. Otherwise, the service call fails and an |
10 | | - # error is returned. |
| 10 | + # error is returned. |
11 | 11 | bool allow_renaming[] # Determines whether the spawning succeeds with a non-unique name. |
12 | 12 | # If it is set to true, the user should always check entity_name response field |
13 | | - # and use it for any further interactions. |
| 13 | + # and use it for any further interactions. Number of elements have to match Number |
| 14 | + # of elements in names. |
14 | 15 |
|
15 | 16 | Resource entity_resources[] # List of resources such as SDFormat, URDF, USD or MJCF file, a native prefab, etc. |
16 | 17 | # Valid URIs can be determined by calling GetSpawnables first. |
17 | 18 | # Check simulator format support via the spawn_formats field in GetSimulatorFeatures. |
18 | 19 | # Using resource_string is supported if GetSimulatorFeatures includes |
19 | | - # the SPAWNING_RESOURCE_STRING feature. |
| 20 | + # the SPAWNING_RESOURCE_STRING feature. Number of elements have to match Number |
| 21 | + # of elements in names. |
20 | 22 |
|
21 | | -string entity_namespaces[] # Spawn entities with theirs interfaces under those namespaces. |
| 23 | +string entity_namespaces[] # Spawn entities with theirs interfaces under those namespaces. Number of elements have to match Number |
| 24 | + # of elements in names. |
22 | 25 | geometry_msgs/PoseStamped initial_poses[] # Array of initial poses for every enttiy. |
23 | 26 | # The header contains a reference frame, which defaults to global "world" frame. |
24 | 27 | # This frame must be known to the simulator, e.g. of an object spawned earlier. |
25 | | - # The timestamp field in the header is ignored. |
| 28 | + # The timestamp field in the header is ignored. Number of elements have to match Number |
| 29 | + # of elements in names. |
26 | 30 |
|
27 | 31 | --- |
28 | 32 |
|
29 | 33 | # Additional result.result_code values for this service. Check result.error_message for further details. |
30 | | -uint8 NAME_NOT_UNIQUE = 101 # Given name is already taken by entity and allow_renaming is false. |
31 | | -uint8 NAME_INVALID = 102 # Given name is invalid in the simulator (e.g. does not meet naming |
32 | | - # requirements such as allowed characters). This is also returned if name is |
33 | | - # empty and allow_renaming is false. |
34 | | -uint8 UNSUPPORTED_FORMAT = 103 # Format for uri or resource string is unsupported. Check supported formats |
35 | | - # through GetSimulatorFeatures service, in spawn_formats field. |
36 | | -uint8 NO_RESOURCE = 104 # Both uri and resource string are empty. |
37 | | -uint8 NAMESPACE_INVALID = 105 # Namespace does not meet namespace naming standards. |
38 | | -uint8 RESOURCE_PARSE_ERROR = 106 # Resource file or string failed to parse. |
39 | | -uint8 MISSING_ASSETS = 107 # At least one of resource assets (such as meshes) was not found. |
40 | | -uint8 UNSUPPORTED_ASSETS = 108 # At least one of resource assets (such as meshes) is not supported. |
41 | | -uint8 INVALID_POSE = 109 # initial_pose is invalid, such as when the quaternion is invalid or position |
42 | | - # exceeds simulator world bounds. |
43 | 34 |
|
44 | | -Result results[] |
| 35 | +uint8 BATCH_SPAWN_MISMATCH = 110 # There is a mismatch in number of elements in names, allow_renaming, entity_resources, |
| 36 | + # entity_namespaces, initial_poses. |
| 37 | +uint8 BATCH_SPAWN_FAILED = 120 # There was at least one failed spawn request. Check individual results in results. |
| 38 | + |
| 39 | +Result result # If all spawning request succeeded it will give RESULT_OK or BATCH_SPAWN_FAILED |
| 40 | +Result results[] # Individual spawn request results. Supported return codes are in SpanwEntity.srv. |
45 | 41 | string entity_names[] # List of names of spawned entities, guaranteed to be unique in the simulation. |
46 | 42 | # If allow_renaming is true, it may differ from the request name field. |
0 commit comments