-
Notifications
You must be signed in to change notification settings - Fork 14
Add array spawn service. #20
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Spawn entities (a robot, other object) by name or URI | ||
| # Support for this interface is indicated through the SPAWNING_ARRAY value in GetSimulationFeatures. | ||
|
|
||
| string names[] # A list of names given to every entity | ||
| # If string is empty, a name field in the uri file or resource_string will be used, | ||
| # if supported and not empty (e.g. "name" field in SDFormat, URDF). | ||
| # If the name is still empty or not unique (as determined by the simulator), | ||
| # the service returns a generated name in the entity_name response field if the | ||
| # allow_renaming field is set to true. Otherwise, the service call fails and an | ||
| # error is returned. | ||
| bool allow_renaming[] # Determines whether the spawning succeeds with a non-unique name. | ||
| # If it is set to true, the user should always check entity_name response field | ||
| # and use it for any further interactions. | ||
|
|
||
| Resource entity_resources[] # List of resources such as SDFormat, URDF, USD or MJCF file, a native prefab, etc. | ||
| # Valid URIs can be determined by calling GetSpawnables first. | ||
| # Check simulator format support via the spawn_formats field in GetSimulatorFeatures. | ||
| # Using resource_string is supported if GetSimulatorFeatures includes | ||
| # the SPAWNING_RESOURCE_STRING feature. | ||
|
|
||
| string entity_namespaces[] # Spawn entities with theirs interfaces under those namespaces. | ||
| geometry_msgs/PoseStamped initial_poses[] # Array of initial poses for every enttiy. | ||
| # The header contains a reference frame, which defaults to global "world" frame. | ||
| # This frame must be known to the simulator, e.g. of an object spawned earlier. | ||
| # The timestamp field in the header is ignored. | ||
|
|
||
| --- | ||
|
|
||
| # Additional result.result_code values for this service. Check result.error_message for further details. | ||
| uint8 NAME_NOT_UNIQUE = 101 # Given name is already taken by entity and allow_renaming is false. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it needed to repeat those here? Wouldn't it be better to link to SpawnEntity.srv? |
||
| uint8 NAME_INVALID = 102 # Given name is invalid in the simulator (e.g. does not meet naming | ||
| # requirements such as allowed characters). This is also returned if name is | ||
| # empty and allow_renaming is false. | ||
| uint8 UNSUPPORTED_FORMAT = 103 # Format for uri or resource string is unsupported. Check supported formats | ||
| # through GetSimulatorFeatures service, in spawn_formats field. | ||
| uint8 NO_RESOURCE = 104 # Both uri and resource string are empty. | ||
| uint8 NAMESPACE_INVALID = 105 # Namespace does not meet namespace naming standards. | ||
| uint8 RESOURCE_PARSE_ERROR = 106 # Resource file or string failed to parse. | ||
| uint8 MISSING_ASSETS = 107 # At least one of resource assets (such as meshes) was not found. | ||
| uint8 UNSUPPORTED_ASSETS = 108 # At least one of resource assets (such as meshes) is not supported. | ||
| uint8 INVALID_POSE = 109 # initial_pose is invalid, such as when the quaternion is invalid or position | ||
| # exceeds simulator world bounds. | ||
|
|
||
| Result results[] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should also be |
||
| string entity_names[] # List of names of spawned entities, guaranteed to be unique in the simulation. | ||
| # If allow_renaming is true, it may differ from the request name field. | ||
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.
Add a comment about the array lengths. Do all of them need to be filled? Or are empty arrays supported? And what about unfinished arrays? (i.e. names[] has 5 elems but allow_renaming[] only 3).