You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/RFC Simulation Interfaces.md
+89Lines changed: 89 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,97 @@ Standardization would improve user experience when using their validation, testi
31
31
32
32
- If there is any new terminology, it should be defined here. -->
33
33
34
+
The ROS 2 simulator that is compatible with simulation interfaces has a number of requirements to follow.
35
+
36
+
It needs to advertise supported features via the ROS 2 service [GetSimulatorFeatures.srv](https://github.com/adamdbrw/simulation_interfaces/blob/simulation_interfaces/srv/GetSimulatorFeatures.srv)
37
+
That service in its response provides the caller with a list of features [SimulatorFeatures.msg](https://github.com/adamdbrw/simulation_interfaces/blob/simulation_interfaces/msg/SimulatorFeatures.msg)
38
+
In this RFC we are proposing to support the following features:
39
+
40
+
- SPAWNING
41
+
- DELETING
42
+
- NAMED_POSES
43
+
- POSE_BOUNDS
44
+
- ENTITY_BOUNDS
45
+
46
+
- ENTITY_STATE_LISTING
47
+
- ENTITY_STATE_SETTING
48
+
49
+
- SIMULATION_RESET
50
+
- SIMULATION_RESET_TIME
51
+
- SIMULATION_RESET_SPAWNED
52
+
53
+
- SIMULATION_PAUSE
54
+
55
+
We do not plan to support the moment:
56
+
- SIMULATION_RESET_STATE
57
+
- STEP_SIMULATION_SINGLE
58
+
- STEP_SIMULATION_MULTIPLE
59
+
- STEP_SIMULATION_ACTION
60
+
61
+
Following formats will be supported for spawnaning (field `spawn_formats` of [SimulatorFeatures.msg](https://github.com/adamdbrw/simulation_interfaces/blob/simulation_interfaces/msg/SimulatorFeatures.msg)):
62
+
```
63
+
[`.spawnables`]
64
+
```
65
+
66
+
**Note** other formats e.g. `URDF` and `SDF` are supported by ROS 2 Gem but only in Editor.
67
+
Those tools are not available in the game mode, so spawning `SDF` and `URDF` would require:
68
+
- Handling mesh importing in Game Launcher and preparing it to use with Mesh Feature processor
69
+
- Creating materials and texture assets in runtime
70
+
- PhysX (or other Physics engine) collider mesh cooking with decomposition.
71
+
72
+
Such feature, would be usefull, but it is out of scope of this RFC.
73
+
34
74
### Technical design description:
35
75
76
+
Spawning, gathering information and despawning will be carried by
77
+
`ROS 2 Entity manager`.
78
+
This manager will be a system component that will be part of ROS 2 Gem.
79
+
It will advertise following services:
80
+
81
+
#### GetSpawnables
82
+
Service definition : [GetSpawnables](https://github.com/adamdbrw/simulation_interfaces/blob/simulation_interfaces/srv/GetSpawnables.srv)
83
+
```
84
+
# Return a list of resources which are valid as SpawnEntity uri fields (e.g. visible to or registered in simulator).
85
+
# This interface is an optional extension and might not be implemented by your simulator, check the result_code.
86
+
87
+
string[] sources # Optional field for additional sources (local or remote) to search.
88
+
# By default, each simulator has visibility of spawnables through
89
+
# some mechanisms, e.g. a set of paths, registered assets etc.
90
+
# Since the simulator cannot possibly look everywhere,
91
+
# this field allows the user to specify additional sources.
92
+
# Unrecognized values are listed as such in the result.error_message,
93
+
# but do not hinder success of the response.
94
+
# Sources may include subcategories and be simulator-specific.
95
+
96
+
---
97
+
98
+
Result result
99
+
Spawnable[] spawnables # Spawnable objects with URI and additional information.
100
+
```
101
+
Definition of individual spawnable [Spawnable.msg](https://github.com/adamdbrw/simulation_interfaces/blob/simulation_interfaces/msg/Spawnable.msg)
102
+
```
103
+
# Robot or other object which can be spawned in simulation runtime.
104
+
105
+
string uri # URI which will be accepted by SpawnEntity service.
106
+
string description # Optional description for the user, e.g. "robot X with sensors A,B,C".
107
+
Bounds spawn_bounds # Optional spawn area bounds which fully encompass this object.
108
+
```
109
+
110
+
This service is advertising available spawnables that can be used in simulation.
111
+
We will take asset catalog to find spawnables.
112
+
There is usefull API in the Engine to get products assets:
0 commit comments