wandelbots-isaacsim-api 2.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. wandelbots_isaacsim_api/__init__.py +50 -0
  2. wandelbots_isaacsim_api/api/__init__.py +25 -0
  3. wandelbots_isaacsim_api/api/collision_world_api.py +316 -0
  4. wandelbots_isaacsim_api/api/default_api.py +800 -0
  5. wandelbots_isaacsim_api/api/manipulators_motion_group_api.py +1619 -0
  6. wandelbots_isaacsim_api/api/periphery_camera_api.py +3434 -0
  7. wandelbots_isaacsim_api/api/prims_api.py +4963 -0
  8. wandelbots_isaacsim_api/api/stage_api.py +2351 -0
  9. wandelbots_isaacsim_api/api/teaching_api.py +1312 -0
  10. wandelbots_isaacsim_api/api/trajectory_api.py +1686 -0
  11. wandelbots_isaacsim_api/api/ui_api.py +562 -0
  12. wandelbots_isaacsim_api/api_client.py +800 -0
  13. wandelbots_isaacsim_api/api_response.py +21 -0
  14. wandelbots_isaacsim_api/collision/__init__.py +0 -0
  15. wandelbots_isaacsim_api/collision/utils.py +99 -0
  16. wandelbots_isaacsim_api/configuration.py +561 -0
  17. wandelbots_isaacsim_api/exceptions.py +216 -0
  18. wandelbots_isaacsim_api/models/__init__.py +135 -0
  19. wandelbots_isaacsim_api/models/auth0_credentials.py +100 -0
  20. wandelbots_isaacsim_api/models/body_apply_relative_pose.py +99 -0
  21. wandelbots_isaacsim_api/models/body_assign_default_poses.py +91 -0
  22. wandelbots_isaacsim_api/models/body_reset_to_default_poses.py +91 -0
  23. wandelbots_isaacsim_api/models/body_set_joint_state.py +93 -0
  24. wandelbots_isaacsim_api/models/body_set_prim_metadata.py +97 -0
  25. wandelbots_isaacsim_api/models/body_set_prim_visibility.py +103 -0
  26. wandelbots_isaacsim_api/models/body_set_semantic_label.py +93 -0
  27. wandelbots_isaacsim_api/models/body_update_colliders.py +93 -0
  28. wandelbots_isaacsim_api/models/body_update_pose.py +97 -0
  29. wandelbots_isaacsim_api/models/bounding_box2_d.py +98 -0
  30. wandelbots_isaacsim_api/models/bounding_box3_d.py +100 -0
  31. wandelbots_isaacsim_api/models/box.py +119 -0
  32. wandelbots_isaacsim_api/models/box_sweep_parameters.py +111 -0
  33. wandelbots_isaacsim_api/models/capsule.py +105 -0
  34. wandelbots_isaacsim_api/models/collider.py +101 -0
  35. wandelbots_isaacsim_api/models/convex_hull.py +103 -0
  36. wandelbots_isaacsim_api/models/create_ghost_object.py +102 -0
  37. wandelbots_isaacsim_api/models/custom_prim.py +100 -0
  38. wandelbots_isaacsim_api/models/custom_prim_data.py +93 -0
  39. wandelbots_isaacsim_api/models/cylinder.py +105 -0
  40. wandelbots_isaacsim_api/models/ghost_object.py +106 -0
  41. wandelbots_isaacsim_api/models/ghost_object_source.py +93 -0
  42. wandelbots_isaacsim_api/models/gizmo_prim.py +98 -0
  43. wandelbots_isaacsim_api/models/http_validation_error.py +108 -0
  44. wandelbots_isaacsim_api/models/instance_segmentation_data.py +97 -0
  45. wandelbots_isaacsim_api/models/instance_segmentation_info.py +91 -0
  46. wandelbots_isaacsim_api/models/motion_group_configuration.py +99 -0
  47. wandelbots_isaacsim_api/models/motion_stream_configuration.py +101 -0
  48. wandelbots_isaacsim_api/models/patch_trajectory_data.py +107 -0
  49. wandelbots_isaacsim_api/models/plane.py +101 -0
  50. wandelbots_isaacsim_api/models/point_cloud.py +95 -0
  51. wandelbots_isaacsim_api/models/pose.py +137 -0
  52. wandelbots_isaacsim_api/models/pose_position_inner.py +138 -0
  53. wandelbots_isaacsim_api/models/prim.py +165 -0
  54. wandelbots_isaacsim_api/models/prim_selection.py +91 -0
  55. wandelbots_isaacsim_api/models/quat_pose.py +92 -0
  56. wandelbots_isaacsim_api/models/relative_pose_mode.py +39 -0
  57. wandelbots_isaacsim_api/models/response_get_pose.py +134 -0
  58. wandelbots_isaacsim_api/models/response_get_relative_pose.py +134 -0
  59. wandelbots_isaacsim_api/models/response_list_default_poses_value.py +140 -0
  60. wandelbots_isaacsim_api/models/semantic_segmentation_data.py +97 -0
  61. wandelbots_isaacsim_api/models/semantic_segmentation_info.py +91 -0
  62. wandelbots_isaacsim_api/models/shape.py +194 -0
  63. wandelbots_isaacsim_api/models/simulation_state.py +101 -0
  64. wandelbots_isaacsim_api/models/sphere.py +103 -0
  65. wandelbots_isaacsim_api/models/sphere_sweep_parameters.py +107 -0
  66. wandelbots_isaacsim_api/models/stage_units.py +91 -0
  67. wandelbots_isaacsim_api/models/sweep_arguments.py +134 -0
  68. wandelbots_isaacsim_api/models/tcp_source.py +99 -0
  69. wandelbots_isaacsim_api/models/trajectory_data.py +101 -0
  70. wandelbots_isaacsim_api/models/trajectory_marker.py +97 -0
  71. wandelbots_isaacsim_api/models/trajectory_object.py +101 -0
  72. wandelbots_isaacsim_api/models/trajectory_options.py +94 -0
  73. wandelbots_isaacsim_api/models/usd_stage_model.py +91 -0
  74. wandelbots_isaacsim_api/models/validation_error.py +112 -0
  75. wandelbots_isaacsim_api/models/validation_error_loc_inner.py +138 -0
  76. wandelbots_isaacsim_api/models/ws_pose.py +92 -0
  77. wandelbots_isaacsim_api/py.typed +0 -0
  78. wandelbots_isaacsim_api/rest.py +212 -0
  79. wandelbots_isaacsim_api/trajectory/__init__.py +17 -0
  80. wandelbots_isaacsim_api/trajectory/trajectory_viewer.py +111 -0
  81. wandelbots_isaacsim_api/trajectory/utils.py +154 -0
  82. wandelbots_isaacsim_api-2.2.2.dist-info/LICENSE +201 -0
  83. wandelbots_isaacsim_api-2.2.2.dist-info/METADATA +60 -0
  84. wandelbots_isaacsim_api-2.2.2.dist-info/RECORD +85 -0
  85. wandelbots_isaacsim_api-2.2.2.dist-info/WHEEL +4 -0
@@ -0,0 +1,3434 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Wandelbots Omniservice
5
+
6
+ A microservice-based framework for managing Omniverse functionalities
7
+
8
+ The version of the OpenAPI document: 2.2.2
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from furl import furl
16
+ import json
17
+ import humps
18
+ import re
19
+ import warnings
20
+ import websockets
21
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
22
+ from typing import Any, AsyncGenerator, Callable, Dict, List, Optional, Tuple, Union
23
+ from typing_extensions import Annotated
24
+ from urllib.parse import quote
25
+
26
+ from pydantic import Field, StrictBytes, StrictFloat, StrictInt, StrictStr, field_validator
27
+ from typing import List, Optional, Tuple, Union
28
+ from typing_extensions import Annotated
29
+ from wandelbots_isaacsim_api.models.bounding_box2_d import BoundingBox2D
30
+ from wandelbots_isaacsim_api.models.bounding_box3_d import BoundingBox3D
31
+ from wandelbots_isaacsim_api.models.instance_segmentation_data import InstanceSegmentationData
32
+ from wandelbots_isaacsim_api.models.point_cloud import PointCloud
33
+ from wandelbots_isaacsim_api.models.semantic_segmentation_data import SemanticSegmentationData
34
+
35
+ from wandelbots_isaacsim_api.api_client import ApiClient, RequestSerialized
36
+ from wandelbots_isaacsim_api.api_response import ApiResponse
37
+ from wandelbots_isaacsim_api.rest import RESTResponseType
38
+
39
+ class PeripheryCameraApi:
40
+ """NOTE: This class is auto generated by OpenAPI Generator
41
+ Ref: https://openapi-generator.tech
42
+
43
+ Do not edit the class manually.
44
+ """
45
+
46
+ def __init__(self, api_client=None) -> None:
47
+ if api_client is None:
48
+ api_client = ApiClient.get_default()
49
+ self.api_client = api_client
50
+
51
+ @validate_call
52
+ async def capture_boundingbox2d(
53
+ self,
54
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
55
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
56
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in the 2D bounding box output. If not specified, returns all labeled instances.")] = None,
57
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
58
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
59
+ _request_timeout: Union[
60
+ None,
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Tuple[
63
+ Annotated[StrictFloat, Field(gt=0)],
64
+ Annotated[StrictFloat, Field(gt=0)]
65
+ ]
66
+ ] = None,
67
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
68
+ _content_type: Optional[StrictStr] = None,
69
+ _headers: Optional[Dict[StrictStr, Any]] = None,
70
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
71
+ ) -> List[BoundingBox2D]:
72
+ """Capture Boundingbox 2D
73
+
74
+ Retrieves 2D bounding box data for specified object classes from the scene. Use the `set_semantic_label` endpoint to assign labels to scene entities.
75
+
76
+ :param result_type: Format which will be used to represent the captured data (required)
77
+ :type result_type: str
78
+ :param camera_prim_path: Path of camera prim (required)
79
+ :type camera_prim_path: str
80
+ :param object_class: Classes of objects to include in the 2D bounding box output. If not specified, returns all labeled instances.
81
+ :type object_class: List[Optional[str]]
82
+ :param width: Image width in px
83
+ :type width: int
84
+ :param height: Image height in px
85
+ :type height: int
86
+ :param _request_timeout: timeout setting for this request. If one
87
+ number provided, it will be total request
88
+ timeout. It can also be a pair (tuple) of
89
+ (connection, read) timeouts.
90
+ :type _request_timeout: int, tuple(int, int), optional
91
+ :param _request_auth: set to override the auth_settings for an a single
92
+ request; this effectively ignores the
93
+ authentication in the spec for a single request.
94
+ :type _request_auth: dict, optional
95
+ :param _content_type: force content-type for the request.
96
+ :type _content_type: str, Optional
97
+ :param _headers: set to override the headers for a single
98
+ request; this effectively ignores the headers
99
+ in the spec for a single request.
100
+ :type _headers: dict, optional
101
+ :param _host_index: set to override the host_index for a single
102
+ request; this effectively ignores the host_index
103
+ in the spec for a single request.
104
+ :type _host_index: int, optional
105
+ :return: Returns the result object.
106
+ """ # noqa: E501
107
+
108
+ _param = self._capture_boundingbox2d_serialize(
109
+ result_type=result_type,
110
+ camera_prim_path=camera_prim_path,
111
+ object_class=object_class,
112
+ width=width,
113
+ height=height,
114
+ _request_auth=_request_auth,
115
+ _content_type=_content_type,
116
+ _headers=_headers,
117
+ _host_index=_host_index
118
+ )
119
+
120
+ _response_types_map: Dict[str, Optional[str]] = {
121
+ '200': "List[BoundingBox2D]",
122
+ '404': None,
123
+ '500': None,
124
+ '422': "HTTPValidationError",
125
+ }
126
+ response_data = await self.api_client.call_api(
127
+ *_param,
128
+ _request_timeout=_request_timeout
129
+ )
130
+ await response_data.read()
131
+ return self.api_client.response_deserialize(
132
+ response_data=response_data,
133
+ response_types_map=_response_types_map,
134
+ ).data
135
+
136
+
137
+ @validate_call
138
+ async def capture_boundingbox2d_with_http_info(
139
+ self,
140
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
141
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
142
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in the 2D bounding box output. If not specified, returns all labeled instances.")] = None,
143
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
144
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
145
+ _request_timeout: Union[
146
+ None,
147
+ Annotated[StrictFloat, Field(gt=0)],
148
+ Tuple[
149
+ Annotated[StrictFloat, Field(gt=0)],
150
+ Annotated[StrictFloat, Field(gt=0)]
151
+ ]
152
+ ] = None,
153
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
154
+ _content_type: Optional[StrictStr] = None,
155
+ _headers: Optional[Dict[StrictStr, Any]] = None,
156
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
157
+ ) -> ApiResponse[List[BoundingBox2D]]:
158
+ """Capture Boundingbox 2D
159
+
160
+ Retrieves 2D bounding box data for specified object classes from the scene. Use the `set_semantic_label` endpoint to assign labels to scene entities.
161
+
162
+ :param result_type: Format which will be used to represent the captured data (required)
163
+ :type result_type: str
164
+ :param camera_prim_path: Path of camera prim (required)
165
+ :type camera_prim_path: str
166
+ :param object_class: Classes of objects to include in the 2D bounding box output. If not specified, returns all labeled instances.
167
+ :type object_class: List[Optional[str]]
168
+ :param width: Image width in px
169
+ :type width: int
170
+ :param height: Image height in px
171
+ :type height: int
172
+ :param _request_timeout: timeout setting for this request. If one
173
+ number provided, it will be total request
174
+ timeout. It can also be a pair (tuple) of
175
+ (connection, read) timeouts.
176
+ :type _request_timeout: int, tuple(int, int), optional
177
+ :param _request_auth: set to override the auth_settings for an a single
178
+ request; this effectively ignores the
179
+ authentication in the spec for a single request.
180
+ :type _request_auth: dict, optional
181
+ :param _content_type: force content-type for the request.
182
+ :type _content_type: str, Optional
183
+ :param _headers: set to override the headers for a single
184
+ request; this effectively ignores the headers
185
+ in the spec for a single request.
186
+ :type _headers: dict, optional
187
+ :param _host_index: set to override the host_index for a single
188
+ request; this effectively ignores the host_index
189
+ in the spec for a single request.
190
+ :type _host_index: int, optional
191
+ :return: Returns the result object.
192
+ """ # noqa: E501
193
+
194
+ _param = self._capture_boundingbox2d_serialize(
195
+ result_type=result_type,
196
+ camera_prim_path=camera_prim_path,
197
+ object_class=object_class,
198
+ width=width,
199
+ height=height,
200
+ _request_auth=_request_auth,
201
+ _content_type=_content_type,
202
+ _headers=_headers,
203
+ _host_index=_host_index
204
+ )
205
+
206
+ _response_types_map: Dict[str, Optional[str]] = {
207
+ '200': "List[BoundingBox2D]",
208
+ '404': None,
209
+ '500': None,
210
+ '422': "HTTPValidationError",
211
+ }
212
+ response_data = await self.api_client.call_api(
213
+ *_param,
214
+ _request_timeout=_request_timeout
215
+ )
216
+ await response_data.read()
217
+ return self.api_client.response_deserialize(
218
+ response_data=response_data,
219
+ response_types_map=_response_types_map,
220
+ )
221
+
222
+
223
+ @validate_call
224
+ async def capture_boundingbox2d_without_preload_content(
225
+ self,
226
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
227
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
228
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in the 2D bounding box output. If not specified, returns all labeled instances.")] = None,
229
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
230
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
231
+ _request_timeout: Union[
232
+ None,
233
+ Annotated[StrictFloat, Field(gt=0)],
234
+ Tuple[
235
+ Annotated[StrictFloat, Field(gt=0)],
236
+ Annotated[StrictFloat, Field(gt=0)]
237
+ ]
238
+ ] = None,
239
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
240
+ _content_type: Optional[StrictStr] = None,
241
+ _headers: Optional[Dict[StrictStr, Any]] = None,
242
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
243
+ ) -> RESTResponseType:
244
+ """Capture Boundingbox 2D
245
+
246
+ Retrieves 2D bounding box data for specified object classes from the scene. Use the `set_semantic_label` endpoint to assign labels to scene entities.
247
+
248
+ :param result_type: Format which will be used to represent the captured data (required)
249
+ :type result_type: str
250
+ :param camera_prim_path: Path of camera prim (required)
251
+ :type camera_prim_path: str
252
+ :param object_class: Classes of objects to include in the 2D bounding box output. If not specified, returns all labeled instances.
253
+ :type object_class: List[Optional[str]]
254
+ :param width: Image width in px
255
+ :type width: int
256
+ :param height: Image height in px
257
+ :type height: int
258
+ :param _request_timeout: timeout setting for this request. If one
259
+ number provided, it will be total request
260
+ timeout. It can also be a pair (tuple) of
261
+ (connection, read) timeouts.
262
+ :type _request_timeout: int, tuple(int, int), optional
263
+ :param _request_auth: set to override the auth_settings for an a single
264
+ request; this effectively ignores the
265
+ authentication in the spec for a single request.
266
+ :type _request_auth: dict, optional
267
+ :param _content_type: force content-type for the request.
268
+ :type _content_type: str, Optional
269
+ :param _headers: set to override the headers for a single
270
+ request; this effectively ignores the headers
271
+ in the spec for a single request.
272
+ :type _headers: dict, optional
273
+ :param _host_index: set to override the host_index for a single
274
+ request; this effectively ignores the host_index
275
+ in the spec for a single request.
276
+ :type _host_index: int, optional
277
+ :return: Returns the result object.
278
+ """ # noqa: E501
279
+
280
+ _param = self._capture_boundingbox2d_serialize(
281
+ result_type=result_type,
282
+ camera_prim_path=camera_prim_path,
283
+ object_class=object_class,
284
+ width=width,
285
+ height=height,
286
+ _request_auth=_request_auth,
287
+ _content_type=_content_type,
288
+ _headers=_headers,
289
+ _host_index=_host_index
290
+ )
291
+
292
+ _response_types_map: Dict[str, Optional[str]] = {
293
+ '200': "List[BoundingBox2D]",
294
+ '404': None,
295
+ '500': None,
296
+ '422': "HTTPValidationError",
297
+ }
298
+ response_data = await self.api_client.call_api(
299
+ *_param,
300
+ _request_timeout=_request_timeout
301
+ )
302
+ return response_data.response
303
+
304
+
305
+ def _capture_boundingbox2d_serialize(
306
+ self,
307
+ result_type,
308
+ camera_prim_path,
309
+ object_class,
310
+ width,
311
+ height,
312
+ _request_auth,
313
+ _content_type,
314
+ _headers,
315
+ _host_index,
316
+ ) -> RequestSerialized:
317
+
318
+ _host = None
319
+
320
+ _collection_formats: Dict[str, str] = {
321
+ 'object_class': 'multi',
322
+ }
323
+
324
+ _path_params: Dict[str, str] = {}
325
+ _query_params: List[Tuple[str, str]] = []
326
+ _header_params: Dict[str, Optional[str]] = _headers or {}
327
+ _form_params: List[Tuple[str, str]] = []
328
+ _files: Dict[str, Union[str, bytes]] = {}
329
+ _body_params: Optional[bytes] = None
330
+
331
+ # process the path parameters
332
+ # process the query parameters
333
+ if result_type is not None:
334
+
335
+ _query_params.append(('result_type', result_type))
336
+
337
+ if object_class is not None:
338
+
339
+ _query_params.append(('object_class', object_class))
340
+
341
+ if camera_prim_path is not None:
342
+
343
+ _query_params.append(('camera_prim_path', camera_prim_path))
344
+
345
+ if width is not None:
346
+
347
+ _query_params.append(('width', width))
348
+
349
+ if height is not None:
350
+
351
+ _query_params.append(('height', height))
352
+
353
+ # process the header parameters
354
+ # process the form parameters
355
+ # process the body parameter
356
+
357
+
358
+ # set the HTTP header `Accept`
359
+ _header_params['Accept'] = self.api_client.select_header_accept(
360
+ [
361
+ 'application/json',
362
+ 'image/png'
363
+ ]
364
+ )
365
+
366
+
367
+ # authentication setting
368
+ _auth_settings: List[str] = [
369
+ ]
370
+
371
+ return self.api_client.param_serialize(
372
+ method='GET',
373
+ resource_path='/periphery/cameras/capture/bounding-box-2d',
374
+ path_params=_path_params,
375
+ query_params=_query_params,
376
+ header_params=_header_params,
377
+ body=_body_params,
378
+ post_params=_form_params,
379
+ files=_files,
380
+ auth_settings=_auth_settings,
381
+ collection_formats=_collection_formats,
382
+ _host=_host,
383
+ _request_auth=_request_auth
384
+ )
385
+
386
+
387
+
388
+ @validate_call
389
+ async def capture_boundingbox3d(
390
+ self,
391
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
392
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in the 3D bounding box output. If not specified, returns all labeled instances.")] = None,
393
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
394
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
395
+ _request_timeout: Union[
396
+ None,
397
+ Annotated[StrictFloat, Field(gt=0)],
398
+ Tuple[
399
+ Annotated[StrictFloat, Field(gt=0)],
400
+ Annotated[StrictFloat, Field(gt=0)]
401
+ ]
402
+ ] = None,
403
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
404
+ _content_type: Optional[StrictStr] = None,
405
+ _headers: Optional[Dict[StrictStr, Any]] = None,
406
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
407
+ ) -> List[BoundingBox3D]:
408
+ """Capture Boundingbox 3D
409
+
410
+ Retrieves 3D bounding box data for specified object classes from the scene. Use the `set_semantic_label` endpoint to assign labels to scene entities.
411
+
412
+ :param camera_prim_path: Path of camera prim (required)
413
+ :type camera_prim_path: str
414
+ :param object_class: Classes of objects to include in the 3D bounding box output. If not specified, returns all labeled instances.
415
+ :type object_class: List[Optional[str]]
416
+ :param width: Image width in px
417
+ :type width: int
418
+ :param height: Image height in px
419
+ :type height: int
420
+ :param _request_timeout: timeout setting for this request. If one
421
+ number provided, it will be total request
422
+ timeout. It can also be a pair (tuple) of
423
+ (connection, read) timeouts.
424
+ :type _request_timeout: int, tuple(int, int), optional
425
+ :param _request_auth: set to override the auth_settings for an a single
426
+ request; this effectively ignores the
427
+ authentication in the spec for a single request.
428
+ :type _request_auth: dict, optional
429
+ :param _content_type: force content-type for the request.
430
+ :type _content_type: str, Optional
431
+ :param _headers: set to override the headers for a single
432
+ request; this effectively ignores the headers
433
+ in the spec for a single request.
434
+ :type _headers: dict, optional
435
+ :param _host_index: set to override the host_index for a single
436
+ request; this effectively ignores the host_index
437
+ in the spec for a single request.
438
+ :type _host_index: int, optional
439
+ :return: Returns the result object.
440
+ """ # noqa: E501
441
+
442
+ _param = self._capture_boundingbox3d_serialize(
443
+ camera_prim_path=camera_prim_path,
444
+ object_class=object_class,
445
+ width=width,
446
+ height=height,
447
+ _request_auth=_request_auth,
448
+ _content_type=_content_type,
449
+ _headers=_headers,
450
+ _host_index=_host_index
451
+ )
452
+
453
+ _response_types_map: Dict[str, Optional[str]] = {
454
+ '200': "List[BoundingBox3D]",
455
+ '404': None,
456
+ '500': None,
457
+ '422': "HTTPValidationError",
458
+ }
459
+ response_data = await self.api_client.call_api(
460
+ *_param,
461
+ _request_timeout=_request_timeout
462
+ )
463
+ await response_data.read()
464
+ return self.api_client.response_deserialize(
465
+ response_data=response_data,
466
+ response_types_map=_response_types_map,
467
+ ).data
468
+
469
+
470
+ @validate_call
471
+ async def capture_boundingbox3d_with_http_info(
472
+ self,
473
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
474
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in the 3D bounding box output. If not specified, returns all labeled instances.")] = None,
475
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
476
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
477
+ _request_timeout: Union[
478
+ None,
479
+ Annotated[StrictFloat, Field(gt=0)],
480
+ Tuple[
481
+ Annotated[StrictFloat, Field(gt=0)],
482
+ Annotated[StrictFloat, Field(gt=0)]
483
+ ]
484
+ ] = None,
485
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
486
+ _content_type: Optional[StrictStr] = None,
487
+ _headers: Optional[Dict[StrictStr, Any]] = None,
488
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
489
+ ) -> ApiResponse[List[BoundingBox3D]]:
490
+ """Capture Boundingbox 3D
491
+
492
+ Retrieves 3D bounding box data for specified object classes from the scene. Use the `set_semantic_label` endpoint to assign labels to scene entities.
493
+
494
+ :param camera_prim_path: Path of camera prim (required)
495
+ :type camera_prim_path: str
496
+ :param object_class: Classes of objects to include in the 3D bounding box output. If not specified, returns all labeled instances.
497
+ :type object_class: List[Optional[str]]
498
+ :param width: Image width in px
499
+ :type width: int
500
+ :param height: Image height in px
501
+ :type height: int
502
+ :param _request_timeout: timeout setting for this request. If one
503
+ number provided, it will be total request
504
+ timeout. It can also be a pair (tuple) of
505
+ (connection, read) timeouts.
506
+ :type _request_timeout: int, tuple(int, int), optional
507
+ :param _request_auth: set to override the auth_settings for an a single
508
+ request; this effectively ignores the
509
+ authentication in the spec for a single request.
510
+ :type _request_auth: dict, optional
511
+ :param _content_type: force content-type for the request.
512
+ :type _content_type: str, Optional
513
+ :param _headers: set to override the headers for a single
514
+ request; this effectively ignores the headers
515
+ in the spec for a single request.
516
+ :type _headers: dict, optional
517
+ :param _host_index: set to override the host_index for a single
518
+ request; this effectively ignores the host_index
519
+ in the spec for a single request.
520
+ :type _host_index: int, optional
521
+ :return: Returns the result object.
522
+ """ # noqa: E501
523
+
524
+ _param = self._capture_boundingbox3d_serialize(
525
+ camera_prim_path=camera_prim_path,
526
+ object_class=object_class,
527
+ width=width,
528
+ height=height,
529
+ _request_auth=_request_auth,
530
+ _content_type=_content_type,
531
+ _headers=_headers,
532
+ _host_index=_host_index
533
+ )
534
+
535
+ _response_types_map: Dict[str, Optional[str]] = {
536
+ '200': "List[BoundingBox3D]",
537
+ '404': None,
538
+ '500': None,
539
+ '422': "HTTPValidationError",
540
+ }
541
+ response_data = await self.api_client.call_api(
542
+ *_param,
543
+ _request_timeout=_request_timeout
544
+ )
545
+ await response_data.read()
546
+ return self.api_client.response_deserialize(
547
+ response_data=response_data,
548
+ response_types_map=_response_types_map,
549
+ )
550
+
551
+
552
+ @validate_call
553
+ async def capture_boundingbox3d_without_preload_content(
554
+ self,
555
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
556
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in the 3D bounding box output. If not specified, returns all labeled instances.")] = None,
557
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
558
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
559
+ _request_timeout: Union[
560
+ None,
561
+ Annotated[StrictFloat, Field(gt=0)],
562
+ Tuple[
563
+ Annotated[StrictFloat, Field(gt=0)],
564
+ Annotated[StrictFloat, Field(gt=0)]
565
+ ]
566
+ ] = None,
567
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
568
+ _content_type: Optional[StrictStr] = None,
569
+ _headers: Optional[Dict[StrictStr, Any]] = None,
570
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
571
+ ) -> RESTResponseType:
572
+ """Capture Boundingbox 3D
573
+
574
+ Retrieves 3D bounding box data for specified object classes from the scene. Use the `set_semantic_label` endpoint to assign labels to scene entities.
575
+
576
+ :param camera_prim_path: Path of camera prim (required)
577
+ :type camera_prim_path: str
578
+ :param object_class: Classes of objects to include in the 3D bounding box output. If not specified, returns all labeled instances.
579
+ :type object_class: List[Optional[str]]
580
+ :param width: Image width in px
581
+ :type width: int
582
+ :param height: Image height in px
583
+ :type height: int
584
+ :param _request_timeout: timeout setting for this request. If one
585
+ number provided, it will be total request
586
+ timeout. It can also be a pair (tuple) of
587
+ (connection, read) timeouts.
588
+ :type _request_timeout: int, tuple(int, int), optional
589
+ :param _request_auth: set to override the auth_settings for an a single
590
+ request; this effectively ignores the
591
+ authentication in the spec for a single request.
592
+ :type _request_auth: dict, optional
593
+ :param _content_type: force content-type for the request.
594
+ :type _content_type: str, Optional
595
+ :param _headers: set to override the headers for a single
596
+ request; this effectively ignores the headers
597
+ in the spec for a single request.
598
+ :type _headers: dict, optional
599
+ :param _host_index: set to override the host_index for a single
600
+ request; this effectively ignores the host_index
601
+ in the spec for a single request.
602
+ :type _host_index: int, optional
603
+ :return: Returns the result object.
604
+ """ # noqa: E501
605
+
606
+ _param = self._capture_boundingbox3d_serialize(
607
+ camera_prim_path=camera_prim_path,
608
+ object_class=object_class,
609
+ width=width,
610
+ height=height,
611
+ _request_auth=_request_auth,
612
+ _content_type=_content_type,
613
+ _headers=_headers,
614
+ _host_index=_host_index
615
+ )
616
+
617
+ _response_types_map: Dict[str, Optional[str]] = {
618
+ '200': "List[BoundingBox3D]",
619
+ '404': None,
620
+ '500': None,
621
+ '422': "HTTPValidationError",
622
+ }
623
+ response_data = await self.api_client.call_api(
624
+ *_param,
625
+ _request_timeout=_request_timeout
626
+ )
627
+ return response_data.response
628
+
629
+
630
+ def _capture_boundingbox3d_serialize(
631
+ self,
632
+ camera_prim_path,
633
+ object_class,
634
+ width,
635
+ height,
636
+ _request_auth,
637
+ _content_type,
638
+ _headers,
639
+ _host_index,
640
+ ) -> RequestSerialized:
641
+
642
+ _host = None
643
+
644
+ _collection_formats: Dict[str, str] = {
645
+ 'object_class': 'multi',
646
+ }
647
+
648
+ _path_params: Dict[str, str] = {}
649
+ _query_params: List[Tuple[str, str]] = []
650
+ _header_params: Dict[str, Optional[str]] = _headers or {}
651
+ _form_params: List[Tuple[str, str]] = []
652
+ _files: Dict[str, Union[str, bytes]] = {}
653
+ _body_params: Optional[bytes] = None
654
+
655
+ # process the path parameters
656
+ # process the query parameters
657
+ if object_class is not None:
658
+
659
+ _query_params.append(('object_class', object_class))
660
+
661
+ if camera_prim_path is not None:
662
+
663
+ _query_params.append(('camera_prim_path', camera_prim_path))
664
+
665
+ if width is not None:
666
+
667
+ _query_params.append(('width', width))
668
+
669
+ if height is not None:
670
+
671
+ _query_params.append(('height', height))
672
+
673
+ # process the header parameters
674
+ # process the form parameters
675
+ # process the body parameter
676
+
677
+
678
+ # set the HTTP header `Accept`
679
+ _header_params['Accept'] = self.api_client.select_header_accept(
680
+ [
681
+ 'application/json'
682
+ ]
683
+ )
684
+
685
+
686
+ # authentication setting
687
+ _auth_settings: List[str] = [
688
+ ]
689
+
690
+ return self.api_client.param_serialize(
691
+ method='GET',
692
+ resource_path='/periphery/cameras/capture/bounding-box-3d',
693
+ path_params=_path_params,
694
+ query_params=_query_params,
695
+ header_params=_header_params,
696
+ body=_body_params,
697
+ post_params=_form_params,
698
+ files=_files,
699
+ auth_settings=_auth_settings,
700
+ collection_formats=_collection_formats,
701
+ _host=_host,
702
+ _request_auth=_request_auth
703
+ )
704
+
705
+
706
+
707
+ @validate_call
708
+ async def capture_color_image(
709
+ self,
710
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
711
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
712
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
713
+ _request_timeout: Union[
714
+ None,
715
+ Annotated[StrictFloat, Field(gt=0)],
716
+ Tuple[
717
+ Annotated[StrictFloat, Field(gt=0)],
718
+ Annotated[StrictFloat, Field(gt=0)]
719
+ ]
720
+ ] = None,
721
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
722
+ _content_type: Optional[StrictStr] = None,
723
+ _headers: Optional[Dict[StrictStr, Any]] = None,
724
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
725
+ ) -> bytearray:
726
+ """Capture Color Image
727
+
728
+ Retrieves the raw RGB color image from the camera's point of view. - Returns a PNG image captured from the current camera.
729
+
730
+ :param camera_prim_path: Path of camera prim (required)
731
+ :type camera_prim_path: str
732
+ :param width: Image width in px
733
+ :type width: int
734
+ :param height: Image height in px
735
+ :type height: int
736
+ :param _request_timeout: timeout setting for this request. If one
737
+ number provided, it will be total request
738
+ timeout. It can also be a pair (tuple) of
739
+ (connection, read) timeouts.
740
+ :type _request_timeout: int, tuple(int, int), optional
741
+ :param _request_auth: set to override the auth_settings for an a single
742
+ request; this effectively ignores the
743
+ authentication in the spec for a single request.
744
+ :type _request_auth: dict, optional
745
+ :param _content_type: force content-type for the request.
746
+ :type _content_type: str, Optional
747
+ :param _headers: set to override the headers for a single
748
+ request; this effectively ignores the headers
749
+ in the spec for a single request.
750
+ :type _headers: dict, optional
751
+ :param _host_index: set to override the host_index for a single
752
+ request; this effectively ignores the host_index
753
+ in the spec for a single request.
754
+ :type _host_index: int, optional
755
+ :return: Returns the result object.
756
+ """ # noqa: E501
757
+
758
+ _param = self._capture_color_image_serialize(
759
+ camera_prim_path=camera_prim_path,
760
+ width=width,
761
+ height=height,
762
+ _request_auth=_request_auth,
763
+ _content_type=_content_type,
764
+ _headers=_headers,
765
+ _host_index=_host_index
766
+ )
767
+
768
+ _response_types_map: Dict[str, Optional[str]] = {
769
+ '200': "bytearray",
770
+ '404': None,
771
+ '500': None,
772
+ '422': "HTTPValidationError",
773
+ }
774
+ response_data = await self.api_client.call_api(
775
+ *_param,
776
+ _request_timeout=_request_timeout
777
+ )
778
+ await response_data.read()
779
+ return self.api_client.response_deserialize(
780
+ response_data=response_data,
781
+ response_types_map=_response_types_map,
782
+ ).data
783
+
784
+
785
+ @validate_call
786
+ async def capture_color_image_with_http_info(
787
+ self,
788
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
789
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
790
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
791
+ _request_timeout: Union[
792
+ None,
793
+ Annotated[StrictFloat, Field(gt=0)],
794
+ Tuple[
795
+ Annotated[StrictFloat, Field(gt=0)],
796
+ Annotated[StrictFloat, Field(gt=0)]
797
+ ]
798
+ ] = None,
799
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
800
+ _content_type: Optional[StrictStr] = None,
801
+ _headers: Optional[Dict[StrictStr, Any]] = None,
802
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
803
+ ) -> ApiResponse[bytearray]:
804
+ """Capture Color Image
805
+
806
+ Retrieves the raw RGB color image from the camera's point of view. - Returns a PNG image captured from the current camera.
807
+
808
+ :param camera_prim_path: Path of camera prim (required)
809
+ :type camera_prim_path: str
810
+ :param width: Image width in px
811
+ :type width: int
812
+ :param height: Image height in px
813
+ :type height: int
814
+ :param _request_timeout: timeout setting for this request. If one
815
+ number provided, it will be total request
816
+ timeout. It can also be a pair (tuple) of
817
+ (connection, read) timeouts.
818
+ :type _request_timeout: int, tuple(int, int), optional
819
+ :param _request_auth: set to override the auth_settings for an a single
820
+ request; this effectively ignores the
821
+ authentication in the spec for a single request.
822
+ :type _request_auth: dict, optional
823
+ :param _content_type: force content-type for the request.
824
+ :type _content_type: str, Optional
825
+ :param _headers: set to override the headers for a single
826
+ request; this effectively ignores the headers
827
+ in the spec for a single request.
828
+ :type _headers: dict, optional
829
+ :param _host_index: set to override the host_index for a single
830
+ request; this effectively ignores the host_index
831
+ in the spec for a single request.
832
+ :type _host_index: int, optional
833
+ :return: Returns the result object.
834
+ """ # noqa: E501
835
+
836
+ _param = self._capture_color_image_serialize(
837
+ camera_prim_path=camera_prim_path,
838
+ width=width,
839
+ height=height,
840
+ _request_auth=_request_auth,
841
+ _content_type=_content_type,
842
+ _headers=_headers,
843
+ _host_index=_host_index
844
+ )
845
+
846
+ _response_types_map: Dict[str, Optional[str]] = {
847
+ '200': "bytearray",
848
+ '404': None,
849
+ '500': None,
850
+ '422': "HTTPValidationError",
851
+ }
852
+ response_data = await self.api_client.call_api(
853
+ *_param,
854
+ _request_timeout=_request_timeout
855
+ )
856
+ await response_data.read()
857
+ return self.api_client.response_deserialize(
858
+ response_data=response_data,
859
+ response_types_map=_response_types_map,
860
+ )
861
+
862
+
863
+ @validate_call
864
+ async def capture_color_image_without_preload_content(
865
+ self,
866
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
867
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
868
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
869
+ _request_timeout: Union[
870
+ None,
871
+ Annotated[StrictFloat, Field(gt=0)],
872
+ Tuple[
873
+ Annotated[StrictFloat, Field(gt=0)],
874
+ Annotated[StrictFloat, Field(gt=0)]
875
+ ]
876
+ ] = None,
877
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
878
+ _content_type: Optional[StrictStr] = None,
879
+ _headers: Optional[Dict[StrictStr, Any]] = None,
880
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
881
+ ) -> RESTResponseType:
882
+ """Capture Color Image
883
+
884
+ Retrieves the raw RGB color image from the camera's point of view. - Returns a PNG image captured from the current camera.
885
+
886
+ :param camera_prim_path: Path of camera prim (required)
887
+ :type camera_prim_path: str
888
+ :param width: Image width in px
889
+ :type width: int
890
+ :param height: Image height in px
891
+ :type height: int
892
+ :param _request_timeout: timeout setting for this request. If one
893
+ number provided, it will be total request
894
+ timeout. It can also be a pair (tuple) of
895
+ (connection, read) timeouts.
896
+ :type _request_timeout: int, tuple(int, int), optional
897
+ :param _request_auth: set to override the auth_settings for an a single
898
+ request; this effectively ignores the
899
+ authentication in the spec for a single request.
900
+ :type _request_auth: dict, optional
901
+ :param _content_type: force content-type for the request.
902
+ :type _content_type: str, Optional
903
+ :param _headers: set to override the headers for a single
904
+ request; this effectively ignores the headers
905
+ in the spec for a single request.
906
+ :type _headers: dict, optional
907
+ :param _host_index: set to override the host_index for a single
908
+ request; this effectively ignores the host_index
909
+ in the spec for a single request.
910
+ :type _host_index: int, optional
911
+ :return: Returns the result object.
912
+ """ # noqa: E501
913
+
914
+ _param = self._capture_color_image_serialize(
915
+ camera_prim_path=camera_prim_path,
916
+ width=width,
917
+ height=height,
918
+ _request_auth=_request_auth,
919
+ _content_type=_content_type,
920
+ _headers=_headers,
921
+ _host_index=_host_index
922
+ )
923
+
924
+ _response_types_map: Dict[str, Optional[str]] = {
925
+ '200': "bytearray",
926
+ '404': None,
927
+ '500': None,
928
+ '422': "HTTPValidationError",
929
+ }
930
+ response_data = await self.api_client.call_api(
931
+ *_param,
932
+ _request_timeout=_request_timeout
933
+ )
934
+ return response_data.response
935
+
936
+
937
+ def _capture_color_image_serialize(
938
+ self,
939
+ camera_prim_path,
940
+ width,
941
+ height,
942
+ _request_auth,
943
+ _content_type,
944
+ _headers,
945
+ _host_index,
946
+ ) -> RequestSerialized:
947
+
948
+ _host = None
949
+
950
+ _collection_formats: Dict[str, str] = {
951
+ }
952
+
953
+ _path_params: Dict[str, str] = {}
954
+ _query_params: List[Tuple[str, str]] = []
955
+ _header_params: Dict[str, Optional[str]] = _headers or {}
956
+ _form_params: List[Tuple[str, str]] = []
957
+ _files: Dict[str, Union[str, bytes]] = {}
958
+ _body_params: Optional[bytes] = None
959
+
960
+ # process the path parameters
961
+ # process the query parameters
962
+ if camera_prim_path is not None:
963
+
964
+ _query_params.append(('camera_prim_path', camera_prim_path))
965
+
966
+ if width is not None:
967
+
968
+ _query_params.append(('width', width))
969
+
970
+ if height is not None:
971
+
972
+ _query_params.append(('height', height))
973
+
974
+ # process the header parameters
975
+ # process the form parameters
976
+ # process the body parameter
977
+
978
+
979
+ # set the HTTP header `Accept`
980
+ _header_params['Accept'] = self.api_client.select_header_accept(
981
+ [
982
+ 'image/png',
983
+ 'application/json'
984
+ ]
985
+ )
986
+
987
+
988
+ # authentication setting
989
+ _auth_settings: List[str] = [
990
+ ]
991
+
992
+ return self.api_client.param_serialize(
993
+ method='GET',
994
+ resource_path='/periphery/cameras/capture/color',
995
+ path_params=_path_params,
996
+ query_params=_query_params,
997
+ header_params=_header_params,
998
+ body=_body_params,
999
+ post_params=_form_params,
1000
+ files=_files,
1001
+ auth_settings=_auth_settings,
1002
+ collection_formats=_collection_formats,
1003
+ _host=_host,
1004
+ _request_auth=_request_auth
1005
+ )
1006
+
1007
+
1008
+
1009
+ @validate_call
1010
+ async def capture_depth_image(
1011
+ self,
1012
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1013
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1014
+ near: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Near clipping plane value.")] = None,
1015
+ far: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Far clipping plane value.")] = None,
1016
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1017
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1018
+ _request_timeout: Union[
1019
+ None,
1020
+ Annotated[StrictFloat, Field(gt=0)],
1021
+ Tuple[
1022
+ Annotated[StrictFloat, Field(gt=0)],
1023
+ Annotated[StrictFloat, Field(gt=0)]
1024
+ ]
1025
+ ] = None,
1026
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1027
+ _content_type: Optional[StrictStr] = None,
1028
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1029
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1030
+ ) -> List[List[float]]:
1031
+ """Capture Depth Image
1032
+
1033
+ Retrieves depth (distance) data from the captured image.
1034
+
1035
+ :param result_type: Format which will be used to represent the captured data (required)
1036
+ :type result_type: str
1037
+ :param camera_prim_path: Path of camera prim (required)
1038
+ :type camera_prim_path: str
1039
+ :param near: Near clipping plane value.
1040
+ :type near: float
1041
+ :param far: Far clipping plane value.
1042
+ :type far: float
1043
+ :param width: Image width in px
1044
+ :type width: int
1045
+ :param height: Image height in px
1046
+ :type height: int
1047
+ :param _request_timeout: timeout setting for this request. If one
1048
+ number provided, it will be total request
1049
+ timeout. It can also be a pair (tuple) of
1050
+ (connection, read) timeouts.
1051
+ :type _request_timeout: int, tuple(int, int), optional
1052
+ :param _request_auth: set to override the auth_settings for an a single
1053
+ request; this effectively ignores the
1054
+ authentication in the spec for a single request.
1055
+ :type _request_auth: dict, optional
1056
+ :param _content_type: force content-type for the request.
1057
+ :type _content_type: str, Optional
1058
+ :param _headers: set to override the headers for a single
1059
+ request; this effectively ignores the headers
1060
+ in the spec for a single request.
1061
+ :type _headers: dict, optional
1062
+ :param _host_index: set to override the host_index for a single
1063
+ request; this effectively ignores the host_index
1064
+ in the spec for a single request.
1065
+ :type _host_index: int, optional
1066
+ :return: Returns the result object.
1067
+ """ # noqa: E501
1068
+
1069
+ _param = self._capture_depth_image_serialize(
1070
+ result_type=result_type,
1071
+ camera_prim_path=camera_prim_path,
1072
+ near=near,
1073
+ far=far,
1074
+ width=width,
1075
+ height=height,
1076
+ _request_auth=_request_auth,
1077
+ _content_type=_content_type,
1078
+ _headers=_headers,
1079
+ _host_index=_host_index
1080
+ )
1081
+
1082
+ _response_types_map: Dict[str, Optional[str]] = {
1083
+ '200': "List[List[float]]",
1084
+ '404': None,
1085
+ '500': None,
1086
+ '422': "HTTPValidationError",
1087
+ }
1088
+ response_data = await self.api_client.call_api(
1089
+ *_param,
1090
+ _request_timeout=_request_timeout
1091
+ )
1092
+ await response_data.read()
1093
+ return self.api_client.response_deserialize(
1094
+ response_data=response_data,
1095
+ response_types_map=_response_types_map,
1096
+ ).data
1097
+
1098
+
1099
+ @validate_call
1100
+ async def capture_depth_image_with_http_info(
1101
+ self,
1102
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1103
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1104
+ near: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Near clipping plane value.")] = None,
1105
+ far: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Far clipping plane value.")] = None,
1106
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1107
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1108
+ _request_timeout: Union[
1109
+ None,
1110
+ Annotated[StrictFloat, Field(gt=0)],
1111
+ Tuple[
1112
+ Annotated[StrictFloat, Field(gt=0)],
1113
+ Annotated[StrictFloat, Field(gt=0)]
1114
+ ]
1115
+ ] = None,
1116
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1117
+ _content_type: Optional[StrictStr] = None,
1118
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1119
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1120
+ ) -> ApiResponse[List[List[float]]]:
1121
+ """Capture Depth Image
1122
+
1123
+ Retrieves depth (distance) data from the captured image.
1124
+
1125
+ :param result_type: Format which will be used to represent the captured data (required)
1126
+ :type result_type: str
1127
+ :param camera_prim_path: Path of camera prim (required)
1128
+ :type camera_prim_path: str
1129
+ :param near: Near clipping plane value.
1130
+ :type near: float
1131
+ :param far: Far clipping plane value.
1132
+ :type far: float
1133
+ :param width: Image width in px
1134
+ :type width: int
1135
+ :param height: Image height in px
1136
+ :type height: int
1137
+ :param _request_timeout: timeout setting for this request. If one
1138
+ number provided, it will be total request
1139
+ timeout. It can also be a pair (tuple) of
1140
+ (connection, read) timeouts.
1141
+ :type _request_timeout: int, tuple(int, int), optional
1142
+ :param _request_auth: set to override the auth_settings for an a single
1143
+ request; this effectively ignores the
1144
+ authentication in the spec for a single request.
1145
+ :type _request_auth: dict, optional
1146
+ :param _content_type: force content-type for the request.
1147
+ :type _content_type: str, Optional
1148
+ :param _headers: set to override the headers for a single
1149
+ request; this effectively ignores the headers
1150
+ in the spec for a single request.
1151
+ :type _headers: dict, optional
1152
+ :param _host_index: set to override the host_index for a single
1153
+ request; this effectively ignores the host_index
1154
+ in the spec for a single request.
1155
+ :type _host_index: int, optional
1156
+ :return: Returns the result object.
1157
+ """ # noqa: E501
1158
+
1159
+ _param = self._capture_depth_image_serialize(
1160
+ result_type=result_type,
1161
+ camera_prim_path=camera_prim_path,
1162
+ near=near,
1163
+ far=far,
1164
+ width=width,
1165
+ height=height,
1166
+ _request_auth=_request_auth,
1167
+ _content_type=_content_type,
1168
+ _headers=_headers,
1169
+ _host_index=_host_index
1170
+ )
1171
+
1172
+ _response_types_map: Dict[str, Optional[str]] = {
1173
+ '200': "List[List[float]]",
1174
+ '404': None,
1175
+ '500': None,
1176
+ '422': "HTTPValidationError",
1177
+ }
1178
+ response_data = await self.api_client.call_api(
1179
+ *_param,
1180
+ _request_timeout=_request_timeout
1181
+ )
1182
+ await response_data.read()
1183
+ return self.api_client.response_deserialize(
1184
+ response_data=response_data,
1185
+ response_types_map=_response_types_map,
1186
+ )
1187
+
1188
+
1189
+ @validate_call
1190
+ async def capture_depth_image_without_preload_content(
1191
+ self,
1192
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1193
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1194
+ near: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Near clipping plane value.")] = None,
1195
+ far: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Far clipping plane value.")] = None,
1196
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1197
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1198
+ _request_timeout: Union[
1199
+ None,
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Tuple[
1202
+ Annotated[StrictFloat, Field(gt=0)],
1203
+ Annotated[StrictFloat, Field(gt=0)]
1204
+ ]
1205
+ ] = None,
1206
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1207
+ _content_type: Optional[StrictStr] = None,
1208
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1209
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1210
+ ) -> RESTResponseType:
1211
+ """Capture Depth Image
1212
+
1213
+ Retrieves depth (distance) data from the captured image.
1214
+
1215
+ :param result_type: Format which will be used to represent the captured data (required)
1216
+ :type result_type: str
1217
+ :param camera_prim_path: Path of camera prim (required)
1218
+ :type camera_prim_path: str
1219
+ :param near: Near clipping plane value.
1220
+ :type near: float
1221
+ :param far: Far clipping plane value.
1222
+ :type far: float
1223
+ :param width: Image width in px
1224
+ :type width: int
1225
+ :param height: Image height in px
1226
+ :type height: int
1227
+ :param _request_timeout: timeout setting for this request. If one
1228
+ number provided, it will be total request
1229
+ timeout. It can also be a pair (tuple) of
1230
+ (connection, read) timeouts.
1231
+ :type _request_timeout: int, tuple(int, int), optional
1232
+ :param _request_auth: set to override the auth_settings for an a single
1233
+ request; this effectively ignores the
1234
+ authentication in the spec for a single request.
1235
+ :type _request_auth: dict, optional
1236
+ :param _content_type: force content-type for the request.
1237
+ :type _content_type: str, Optional
1238
+ :param _headers: set to override the headers for a single
1239
+ request; this effectively ignores the headers
1240
+ in the spec for a single request.
1241
+ :type _headers: dict, optional
1242
+ :param _host_index: set to override the host_index for a single
1243
+ request; this effectively ignores the host_index
1244
+ in the spec for a single request.
1245
+ :type _host_index: int, optional
1246
+ :return: Returns the result object.
1247
+ """ # noqa: E501
1248
+
1249
+ _param = self._capture_depth_image_serialize(
1250
+ result_type=result_type,
1251
+ camera_prim_path=camera_prim_path,
1252
+ near=near,
1253
+ far=far,
1254
+ width=width,
1255
+ height=height,
1256
+ _request_auth=_request_auth,
1257
+ _content_type=_content_type,
1258
+ _headers=_headers,
1259
+ _host_index=_host_index
1260
+ )
1261
+
1262
+ _response_types_map: Dict[str, Optional[str]] = {
1263
+ '200': "List[List[float]]",
1264
+ '404': None,
1265
+ '500': None,
1266
+ '422': "HTTPValidationError",
1267
+ }
1268
+ response_data = await self.api_client.call_api(
1269
+ *_param,
1270
+ _request_timeout=_request_timeout
1271
+ )
1272
+ return response_data.response
1273
+
1274
+
1275
+ def _capture_depth_image_serialize(
1276
+ self,
1277
+ result_type,
1278
+ camera_prim_path,
1279
+ near,
1280
+ far,
1281
+ width,
1282
+ height,
1283
+ _request_auth,
1284
+ _content_type,
1285
+ _headers,
1286
+ _host_index,
1287
+ ) -> RequestSerialized:
1288
+
1289
+ _host = None
1290
+
1291
+ _collection_formats: Dict[str, str] = {
1292
+ }
1293
+
1294
+ _path_params: Dict[str, str] = {}
1295
+ _query_params: List[Tuple[str, str]] = []
1296
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1297
+ _form_params: List[Tuple[str, str]] = []
1298
+ _files: Dict[str, Union[str, bytes]] = {}
1299
+ _body_params: Optional[bytes] = None
1300
+
1301
+ # process the path parameters
1302
+ # process the query parameters
1303
+ if result_type is not None:
1304
+
1305
+ _query_params.append(('result_type', result_type))
1306
+
1307
+ if near is not None:
1308
+
1309
+ _query_params.append(('near', near))
1310
+
1311
+ if far is not None:
1312
+
1313
+ _query_params.append(('far', far))
1314
+
1315
+ if camera_prim_path is not None:
1316
+
1317
+ _query_params.append(('camera_prim_path', camera_prim_path))
1318
+
1319
+ if width is not None:
1320
+
1321
+ _query_params.append(('width', width))
1322
+
1323
+ if height is not None:
1324
+
1325
+ _query_params.append(('height', height))
1326
+
1327
+ # process the header parameters
1328
+ # process the form parameters
1329
+ # process the body parameter
1330
+
1331
+
1332
+ # set the HTTP header `Accept`
1333
+ _header_params['Accept'] = self.api_client.select_header_accept(
1334
+ [
1335
+ 'application/json',
1336
+ 'image/png'
1337
+ ]
1338
+ )
1339
+
1340
+
1341
+ # authentication setting
1342
+ _auth_settings: List[str] = [
1343
+ ]
1344
+
1345
+ return self.api_client.param_serialize(
1346
+ method='GET',
1347
+ resource_path='/periphery/cameras/capture/depth',
1348
+ path_params=_path_params,
1349
+ query_params=_query_params,
1350
+ header_params=_header_params,
1351
+ body=_body_params,
1352
+ post_params=_form_params,
1353
+ files=_files,
1354
+ auth_settings=_auth_settings,
1355
+ collection_formats=_collection_formats,
1356
+ _host=_host,
1357
+ _request_auth=_request_auth
1358
+ )
1359
+
1360
+
1361
+
1362
+ @validate_call
1363
+ async def capture_instance_segmentation(
1364
+ self,
1365
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1366
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1367
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in segmentation. If not specified, returns all labeled instances.")] = None,
1368
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1369
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1370
+ _request_timeout: Union[
1371
+ None,
1372
+ Annotated[StrictFloat, Field(gt=0)],
1373
+ Tuple[
1374
+ Annotated[StrictFloat, Field(gt=0)],
1375
+ Annotated[StrictFloat, Field(gt=0)]
1376
+ ]
1377
+ ] = None,
1378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1379
+ _content_type: Optional[StrictStr] = None,
1380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1382
+ ) -> InstanceSegmentationData:
1383
+ """Capture Instance Segmentation
1384
+
1385
+ Retrieves instance segmentation data for specified object classes, with each detected object uniquely identified. Use the `set_semantic_label` endpoint to assign labels to scene entities.
1386
+
1387
+ :param result_type: Format which will be used to represent the captured data (required)
1388
+ :type result_type: str
1389
+ :param camera_prim_path: Path of camera prim (required)
1390
+ :type camera_prim_path: str
1391
+ :param object_class: Classes of objects to include in segmentation. If not specified, returns all labeled instances.
1392
+ :type object_class: List[Optional[str]]
1393
+ :param width: Image width in px
1394
+ :type width: int
1395
+ :param height: Image height in px
1396
+ :type height: int
1397
+ :param _request_timeout: timeout setting for this request. If one
1398
+ number provided, it will be total request
1399
+ timeout. It can also be a pair (tuple) of
1400
+ (connection, read) timeouts.
1401
+ :type _request_timeout: int, tuple(int, int), optional
1402
+ :param _request_auth: set to override the auth_settings for an a single
1403
+ request; this effectively ignores the
1404
+ authentication in the spec for a single request.
1405
+ :type _request_auth: dict, optional
1406
+ :param _content_type: force content-type for the request.
1407
+ :type _content_type: str, Optional
1408
+ :param _headers: set to override the headers for a single
1409
+ request; this effectively ignores the headers
1410
+ in the spec for a single request.
1411
+ :type _headers: dict, optional
1412
+ :param _host_index: set to override the host_index for a single
1413
+ request; this effectively ignores the host_index
1414
+ in the spec for a single request.
1415
+ :type _host_index: int, optional
1416
+ :return: Returns the result object.
1417
+ """ # noqa: E501
1418
+
1419
+ _param = self._capture_instance_segmentation_serialize(
1420
+ result_type=result_type,
1421
+ camera_prim_path=camera_prim_path,
1422
+ object_class=object_class,
1423
+ width=width,
1424
+ height=height,
1425
+ _request_auth=_request_auth,
1426
+ _content_type=_content_type,
1427
+ _headers=_headers,
1428
+ _host_index=_host_index
1429
+ )
1430
+
1431
+ _response_types_map: Dict[str, Optional[str]] = {
1432
+ '200': "InstanceSegmentationData",
1433
+ '404': None,
1434
+ '500': None,
1435
+ '422': "HTTPValidationError",
1436
+ }
1437
+ response_data = await self.api_client.call_api(
1438
+ *_param,
1439
+ _request_timeout=_request_timeout
1440
+ )
1441
+ await response_data.read()
1442
+ return self.api_client.response_deserialize(
1443
+ response_data=response_data,
1444
+ response_types_map=_response_types_map,
1445
+ ).data
1446
+
1447
+
1448
+ @validate_call
1449
+ async def capture_instance_segmentation_with_http_info(
1450
+ self,
1451
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1452
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1453
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in segmentation. If not specified, returns all labeled instances.")] = None,
1454
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1455
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1456
+ _request_timeout: Union[
1457
+ None,
1458
+ Annotated[StrictFloat, Field(gt=0)],
1459
+ Tuple[
1460
+ Annotated[StrictFloat, Field(gt=0)],
1461
+ Annotated[StrictFloat, Field(gt=0)]
1462
+ ]
1463
+ ] = None,
1464
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1465
+ _content_type: Optional[StrictStr] = None,
1466
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1467
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1468
+ ) -> ApiResponse[InstanceSegmentationData]:
1469
+ """Capture Instance Segmentation
1470
+
1471
+ Retrieves instance segmentation data for specified object classes, with each detected object uniquely identified. Use the `set_semantic_label` endpoint to assign labels to scene entities.
1472
+
1473
+ :param result_type: Format which will be used to represent the captured data (required)
1474
+ :type result_type: str
1475
+ :param camera_prim_path: Path of camera prim (required)
1476
+ :type camera_prim_path: str
1477
+ :param object_class: Classes of objects to include in segmentation. If not specified, returns all labeled instances.
1478
+ :type object_class: List[Optional[str]]
1479
+ :param width: Image width in px
1480
+ :type width: int
1481
+ :param height: Image height in px
1482
+ :type height: int
1483
+ :param _request_timeout: timeout setting for this request. If one
1484
+ number provided, it will be total request
1485
+ timeout. It can also be a pair (tuple) of
1486
+ (connection, read) timeouts.
1487
+ :type _request_timeout: int, tuple(int, int), optional
1488
+ :param _request_auth: set to override the auth_settings for an a single
1489
+ request; this effectively ignores the
1490
+ authentication in the spec for a single request.
1491
+ :type _request_auth: dict, optional
1492
+ :param _content_type: force content-type for the request.
1493
+ :type _content_type: str, Optional
1494
+ :param _headers: set to override the headers for a single
1495
+ request; this effectively ignores the headers
1496
+ in the spec for a single request.
1497
+ :type _headers: dict, optional
1498
+ :param _host_index: set to override the host_index for a single
1499
+ request; this effectively ignores the host_index
1500
+ in the spec for a single request.
1501
+ :type _host_index: int, optional
1502
+ :return: Returns the result object.
1503
+ """ # noqa: E501
1504
+
1505
+ _param = self._capture_instance_segmentation_serialize(
1506
+ result_type=result_type,
1507
+ camera_prim_path=camera_prim_path,
1508
+ object_class=object_class,
1509
+ width=width,
1510
+ height=height,
1511
+ _request_auth=_request_auth,
1512
+ _content_type=_content_type,
1513
+ _headers=_headers,
1514
+ _host_index=_host_index
1515
+ )
1516
+
1517
+ _response_types_map: Dict[str, Optional[str]] = {
1518
+ '200': "InstanceSegmentationData",
1519
+ '404': None,
1520
+ '500': None,
1521
+ '422': "HTTPValidationError",
1522
+ }
1523
+ response_data = await self.api_client.call_api(
1524
+ *_param,
1525
+ _request_timeout=_request_timeout
1526
+ )
1527
+ await response_data.read()
1528
+ return self.api_client.response_deserialize(
1529
+ response_data=response_data,
1530
+ response_types_map=_response_types_map,
1531
+ )
1532
+
1533
+
1534
+ @validate_call
1535
+ async def capture_instance_segmentation_without_preload_content(
1536
+ self,
1537
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1538
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1539
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="Classes of objects to include in segmentation. If not specified, returns all labeled instances.")] = None,
1540
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1541
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1542
+ _request_timeout: Union[
1543
+ None,
1544
+ Annotated[StrictFloat, Field(gt=0)],
1545
+ Tuple[
1546
+ Annotated[StrictFloat, Field(gt=0)],
1547
+ Annotated[StrictFloat, Field(gt=0)]
1548
+ ]
1549
+ ] = None,
1550
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1551
+ _content_type: Optional[StrictStr] = None,
1552
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1553
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1554
+ ) -> RESTResponseType:
1555
+ """Capture Instance Segmentation
1556
+
1557
+ Retrieves instance segmentation data for specified object classes, with each detected object uniquely identified. Use the `set_semantic_label` endpoint to assign labels to scene entities.
1558
+
1559
+ :param result_type: Format which will be used to represent the captured data (required)
1560
+ :type result_type: str
1561
+ :param camera_prim_path: Path of camera prim (required)
1562
+ :type camera_prim_path: str
1563
+ :param object_class: Classes of objects to include in segmentation. If not specified, returns all labeled instances.
1564
+ :type object_class: List[Optional[str]]
1565
+ :param width: Image width in px
1566
+ :type width: int
1567
+ :param height: Image height in px
1568
+ :type height: int
1569
+ :param _request_timeout: timeout setting for this request. If one
1570
+ number provided, it will be total request
1571
+ timeout. It can also be a pair (tuple) of
1572
+ (connection, read) timeouts.
1573
+ :type _request_timeout: int, tuple(int, int), optional
1574
+ :param _request_auth: set to override the auth_settings for an a single
1575
+ request; this effectively ignores the
1576
+ authentication in the spec for a single request.
1577
+ :type _request_auth: dict, optional
1578
+ :param _content_type: force content-type for the request.
1579
+ :type _content_type: str, Optional
1580
+ :param _headers: set to override the headers for a single
1581
+ request; this effectively ignores the headers
1582
+ in the spec for a single request.
1583
+ :type _headers: dict, optional
1584
+ :param _host_index: set to override the host_index for a single
1585
+ request; this effectively ignores the host_index
1586
+ in the spec for a single request.
1587
+ :type _host_index: int, optional
1588
+ :return: Returns the result object.
1589
+ """ # noqa: E501
1590
+
1591
+ _param = self._capture_instance_segmentation_serialize(
1592
+ result_type=result_type,
1593
+ camera_prim_path=camera_prim_path,
1594
+ object_class=object_class,
1595
+ width=width,
1596
+ height=height,
1597
+ _request_auth=_request_auth,
1598
+ _content_type=_content_type,
1599
+ _headers=_headers,
1600
+ _host_index=_host_index
1601
+ )
1602
+
1603
+ _response_types_map: Dict[str, Optional[str]] = {
1604
+ '200': "InstanceSegmentationData",
1605
+ '404': None,
1606
+ '500': None,
1607
+ '422': "HTTPValidationError",
1608
+ }
1609
+ response_data = await self.api_client.call_api(
1610
+ *_param,
1611
+ _request_timeout=_request_timeout
1612
+ )
1613
+ return response_data.response
1614
+
1615
+
1616
+ def _capture_instance_segmentation_serialize(
1617
+ self,
1618
+ result_type,
1619
+ camera_prim_path,
1620
+ object_class,
1621
+ width,
1622
+ height,
1623
+ _request_auth,
1624
+ _content_type,
1625
+ _headers,
1626
+ _host_index,
1627
+ ) -> RequestSerialized:
1628
+
1629
+ _host = None
1630
+
1631
+ _collection_formats: Dict[str, str] = {
1632
+ 'object_class': 'multi',
1633
+ }
1634
+
1635
+ _path_params: Dict[str, str] = {}
1636
+ _query_params: List[Tuple[str, str]] = []
1637
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1638
+ _form_params: List[Tuple[str, str]] = []
1639
+ _files: Dict[str, Union[str, bytes]] = {}
1640
+ _body_params: Optional[bytes] = None
1641
+
1642
+ # process the path parameters
1643
+ # process the query parameters
1644
+ if result_type is not None:
1645
+
1646
+ _query_params.append(('result_type', result_type))
1647
+
1648
+ if object_class is not None:
1649
+
1650
+ _query_params.append(('object_class', object_class))
1651
+
1652
+ if camera_prim_path is not None:
1653
+
1654
+ _query_params.append(('camera_prim_path', camera_prim_path))
1655
+
1656
+ if width is not None:
1657
+
1658
+ _query_params.append(('width', width))
1659
+
1660
+ if height is not None:
1661
+
1662
+ _query_params.append(('height', height))
1663
+
1664
+ # process the header parameters
1665
+ # process the form parameters
1666
+ # process the body parameter
1667
+
1668
+
1669
+ # set the HTTP header `Accept`
1670
+ _header_params['Accept'] = self.api_client.select_header_accept(
1671
+ [
1672
+ 'application/json',
1673
+ 'image/png'
1674
+ ]
1675
+ )
1676
+
1677
+
1678
+ # authentication setting
1679
+ _auth_settings: List[str] = [
1680
+ ]
1681
+
1682
+ return self.api_client.param_serialize(
1683
+ method='GET',
1684
+ resource_path='/periphery/cameras/capture/instance-segmentation',
1685
+ path_params=_path_params,
1686
+ query_params=_query_params,
1687
+ header_params=_header_params,
1688
+ body=_body_params,
1689
+ post_params=_form_params,
1690
+ files=_files,
1691
+ auth_settings=_auth_settings,
1692
+ collection_formats=_collection_formats,
1693
+ _host=_host,
1694
+ _request_auth=_request_auth
1695
+ )
1696
+
1697
+
1698
+
1699
+ @validate_call
1700
+ async def capture_normals_image(
1701
+ self,
1702
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1703
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1704
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1705
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1706
+ _request_timeout: Union[
1707
+ None,
1708
+ Annotated[StrictFloat, Field(gt=0)],
1709
+ Tuple[
1710
+ Annotated[StrictFloat, Field(gt=0)],
1711
+ Annotated[StrictFloat, Field(gt=0)]
1712
+ ]
1713
+ ] = None,
1714
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1715
+ _content_type: Optional[StrictStr] = None,
1716
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1717
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1718
+ ) -> List[List[List[float]]]:
1719
+ """Capture Normals Image
1720
+
1721
+ Retrieves surface normal data from the camera's captured image.
1722
+
1723
+ :param result_type: Format which will be used to represent the captured data (required)
1724
+ :type result_type: str
1725
+ :param camera_prim_path: Path of camera prim (required)
1726
+ :type camera_prim_path: str
1727
+ :param width: Image width in px
1728
+ :type width: int
1729
+ :param height: Image height in px
1730
+ :type height: int
1731
+ :param _request_timeout: timeout setting for this request. If one
1732
+ number provided, it will be total request
1733
+ timeout. It can also be a pair (tuple) of
1734
+ (connection, read) timeouts.
1735
+ :type _request_timeout: int, tuple(int, int), optional
1736
+ :param _request_auth: set to override the auth_settings for an a single
1737
+ request; this effectively ignores the
1738
+ authentication in the spec for a single request.
1739
+ :type _request_auth: dict, optional
1740
+ :param _content_type: force content-type for the request.
1741
+ :type _content_type: str, Optional
1742
+ :param _headers: set to override the headers for a single
1743
+ request; this effectively ignores the headers
1744
+ in the spec for a single request.
1745
+ :type _headers: dict, optional
1746
+ :param _host_index: set to override the host_index for a single
1747
+ request; this effectively ignores the host_index
1748
+ in the spec for a single request.
1749
+ :type _host_index: int, optional
1750
+ :return: Returns the result object.
1751
+ """ # noqa: E501
1752
+
1753
+ _param = self._capture_normals_image_serialize(
1754
+ result_type=result_type,
1755
+ camera_prim_path=camera_prim_path,
1756
+ width=width,
1757
+ height=height,
1758
+ _request_auth=_request_auth,
1759
+ _content_type=_content_type,
1760
+ _headers=_headers,
1761
+ _host_index=_host_index
1762
+ )
1763
+
1764
+ _response_types_map: Dict[str, Optional[str]] = {
1765
+ '200': "List[List[List[float]]]",
1766
+ '404': None,
1767
+ '500': None,
1768
+ '422': "HTTPValidationError",
1769
+ }
1770
+ response_data = await self.api_client.call_api(
1771
+ *_param,
1772
+ _request_timeout=_request_timeout
1773
+ )
1774
+ await response_data.read()
1775
+ return self.api_client.response_deserialize(
1776
+ response_data=response_data,
1777
+ response_types_map=_response_types_map,
1778
+ ).data
1779
+
1780
+
1781
+ @validate_call
1782
+ async def capture_normals_image_with_http_info(
1783
+ self,
1784
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1785
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1786
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1787
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1788
+ _request_timeout: Union[
1789
+ None,
1790
+ Annotated[StrictFloat, Field(gt=0)],
1791
+ Tuple[
1792
+ Annotated[StrictFloat, Field(gt=0)],
1793
+ Annotated[StrictFloat, Field(gt=0)]
1794
+ ]
1795
+ ] = None,
1796
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1797
+ _content_type: Optional[StrictStr] = None,
1798
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1799
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1800
+ ) -> ApiResponse[List[List[List[float]]]]:
1801
+ """Capture Normals Image
1802
+
1803
+ Retrieves surface normal data from the camera's captured image.
1804
+
1805
+ :param result_type: Format which will be used to represent the captured data (required)
1806
+ :type result_type: str
1807
+ :param camera_prim_path: Path of camera prim (required)
1808
+ :type camera_prim_path: str
1809
+ :param width: Image width in px
1810
+ :type width: int
1811
+ :param height: Image height in px
1812
+ :type height: int
1813
+ :param _request_timeout: timeout setting for this request. If one
1814
+ number provided, it will be total request
1815
+ timeout. It can also be a pair (tuple) of
1816
+ (connection, read) timeouts.
1817
+ :type _request_timeout: int, tuple(int, int), optional
1818
+ :param _request_auth: set to override the auth_settings for an a single
1819
+ request; this effectively ignores the
1820
+ authentication in the spec for a single request.
1821
+ :type _request_auth: dict, optional
1822
+ :param _content_type: force content-type for the request.
1823
+ :type _content_type: str, Optional
1824
+ :param _headers: set to override the headers for a single
1825
+ request; this effectively ignores the headers
1826
+ in the spec for a single request.
1827
+ :type _headers: dict, optional
1828
+ :param _host_index: set to override the host_index for a single
1829
+ request; this effectively ignores the host_index
1830
+ in the spec for a single request.
1831
+ :type _host_index: int, optional
1832
+ :return: Returns the result object.
1833
+ """ # noqa: E501
1834
+
1835
+ _param = self._capture_normals_image_serialize(
1836
+ result_type=result_type,
1837
+ camera_prim_path=camera_prim_path,
1838
+ width=width,
1839
+ height=height,
1840
+ _request_auth=_request_auth,
1841
+ _content_type=_content_type,
1842
+ _headers=_headers,
1843
+ _host_index=_host_index
1844
+ )
1845
+
1846
+ _response_types_map: Dict[str, Optional[str]] = {
1847
+ '200': "List[List[List[float]]]",
1848
+ '404': None,
1849
+ '500': None,
1850
+ '422': "HTTPValidationError",
1851
+ }
1852
+ response_data = await self.api_client.call_api(
1853
+ *_param,
1854
+ _request_timeout=_request_timeout
1855
+ )
1856
+ await response_data.read()
1857
+ return self.api_client.response_deserialize(
1858
+ response_data=response_data,
1859
+ response_types_map=_response_types_map,
1860
+ )
1861
+
1862
+
1863
+ @validate_call
1864
+ async def capture_normals_image_without_preload_content(
1865
+ self,
1866
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
1867
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
1868
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
1869
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
1870
+ _request_timeout: Union[
1871
+ None,
1872
+ Annotated[StrictFloat, Field(gt=0)],
1873
+ Tuple[
1874
+ Annotated[StrictFloat, Field(gt=0)],
1875
+ Annotated[StrictFloat, Field(gt=0)]
1876
+ ]
1877
+ ] = None,
1878
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1879
+ _content_type: Optional[StrictStr] = None,
1880
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1881
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1882
+ ) -> RESTResponseType:
1883
+ """Capture Normals Image
1884
+
1885
+ Retrieves surface normal data from the camera's captured image.
1886
+
1887
+ :param result_type: Format which will be used to represent the captured data (required)
1888
+ :type result_type: str
1889
+ :param camera_prim_path: Path of camera prim (required)
1890
+ :type camera_prim_path: str
1891
+ :param width: Image width in px
1892
+ :type width: int
1893
+ :param height: Image height in px
1894
+ :type height: int
1895
+ :param _request_timeout: timeout setting for this request. If one
1896
+ number provided, it will be total request
1897
+ timeout. It can also be a pair (tuple) of
1898
+ (connection, read) timeouts.
1899
+ :type _request_timeout: int, tuple(int, int), optional
1900
+ :param _request_auth: set to override the auth_settings for an a single
1901
+ request; this effectively ignores the
1902
+ authentication in the spec for a single request.
1903
+ :type _request_auth: dict, optional
1904
+ :param _content_type: force content-type for the request.
1905
+ :type _content_type: str, Optional
1906
+ :param _headers: set to override the headers for a single
1907
+ request; this effectively ignores the headers
1908
+ in the spec for a single request.
1909
+ :type _headers: dict, optional
1910
+ :param _host_index: set to override the host_index for a single
1911
+ request; this effectively ignores the host_index
1912
+ in the spec for a single request.
1913
+ :type _host_index: int, optional
1914
+ :return: Returns the result object.
1915
+ """ # noqa: E501
1916
+
1917
+ _param = self._capture_normals_image_serialize(
1918
+ result_type=result_type,
1919
+ camera_prim_path=camera_prim_path,
1920
+ width=width,
1921
+ height=height,
1922
+ _request_auth=_request_auth,
1923
+ _content_type=_content_type,
1924
+ _headers=_headers,
1925
+ _host_index=_host_index
1926
+ )
1927
+
1928
+ _response_types_map: Dict[str, Optional[str]] = {
1929
+ '200': "List[List[List[float]]]",
1930
+ '404': None,
1931
+ '500': None,
1932
+ '422': "HTTPValidationError",
1933
+ }
1934
+ response_data = await self.api_client.call_api(
1935
+ *_param,
1936
+ _request_timeout=_request_timeout
1937
+ )
1938
+ return response_data.response
1939
+
1940
+
1941
+ def _capture_normals_image_serialize(
1942
+ self,
1943
+ result_type,
1944
+ camera_prim_path,
1945
+ width,
1946
+ height,
1947
+ _request_auth,
1948
+ _content_type,
1949
+ _headers,
1950
+ _host_index,
1951
+ ) -> RequestSerialized:
1952
+
1953
+ _host = None
1954
+
1955
+ _collection_formats: Dict[str, str] = {
1956
+ }
1957
+
1958
+ _path_params: Dict[str, str] = {}
1959
+ _query_params: List[Tuple[str, str]] = []
1960
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1961
+ _form_params: List[Tuple[str, str]] = []
1962
+ _files: Dict[str, Union[str, bytes]] = {}
1963
+ _body_params: Optional[bytes] = None
1964
+
1965
+ # process the path parameters
1966
+ # process the query parameters
1967
+ if result_type is not None:
1968
+
1969
+ _query_params.append(('result_type', result_type))
1970
+
1971
+ if camera_prim_path is not None:
1972
+
1973
+ _query_params.append(('camera_prim_path', camera_prim_path))
1974
+
1975
+ if width is not None:
1976
+
1977
+ _query_params.append(('width', width))
1978
+
1979
+ if height is not None:
1980
+
1981
+ _query_params.append(('height', height))
1982
+
1983
+ # process the header parameters
1984
+ # process the form parameters
1985
+ # process the body parameter
1986
+
1987
+
1988
+ # set the HTTP header `Accept`
1989
+ _header_params['Accept'] = self.api_client.select_header_accept(
1990
+ [
1991
+ 'application/json',
1992
+ 'image/png'
1993
+ ]
1994
+ )
1995
+
1996
+
1997
+ # authentication setting
1998
+ _auth_settings: List[str] = [
1999
+ ]
2000
+
2001
+ return self.api_client.param_serialize(
2002
+ method='GET',
2003
+ resource_path='/periphery/cameras/capture/normals',
2004
+ path_params=_path_params,
2005
+ query_params=_query_params,
2006
+ header_params=_header_params,
2007
+ body=_body_params,
2008
+ post_params=_form_params,
2009
+ files=_files,
2010
+ auth_settings=_auth_settings,
2011
+ collection_formats=_collection_formats,
2012
+ _host=_host,
2013
+ _request_auth=_request_auth
2014
+ )
2015
+
2016
+
2017
+
2018
+ @validate_call
2019
+ async def capture_pointcloud(
2020
+ self,
2021
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
2022
+ downscale_factor: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Downscale factor for the point cloud. 1.0 = no compression, 0.1 = heavy compression")] = None,
2023
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
2024
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
2025
+ _request_timeout: Union[
2026
+ None,
2027
+ Annotated[StrictFloat, Field(gt=0)],
2028
+ Tuple[
2029
+ Annotated[StrictFloat, Field(gt=0)],
2030
+ Annotated[StrictFloat, Field(gt=0)]
2031
+ ]
2032
+ ] = None,
2033
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2034
+ _content_type: Optional[StrictStr] = None,
2035
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2036
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2037
+ ) -> PointCloud:
2038
+ """Capture Pointcloud
2039
+
2040
+ Retrieves a point cloud from the camera's captured image. - Resulting data format depends on stage units (e.g., mm, cm, m). - `downscale_factor` determines compression level: 1.0 = full data, <1.0 = compressed.
2041
+
2042
+ :param camera_prim_path: Path of camera prim (required)
2043
+ :type camera_prim_path: str
2044
+ :param downscale_factor: Downscale factor for the point cloud. 1.0 = no compression, 0.1 = heavy compression
2045
+ :type downscale_factor: float
2046
+ :param width: Image width in px
2047
+ :type width: int
2048
+ :param height: Image height in px
2049
+ :type height: int
2050
+ :param _request_timeout: timeout setting for this request. If one
2051
+ number provided, it will be total request
2052
+ timeout. It can also be a pair (tuple) of
2053
+ (connection, read) timeouts.
2054
+ :type _request_timeout: int, tuple(int, int), optional
2055
+ :param _request_auth: set to override the auth_settings for an a single
2056
+ request; this effectively ignores the
2057
+ authentication in the spec for a single request.
2058
+ :type _request_auth: dict, optional
2059
+ :param _content_type: force content-type for the request.
2060
+ :type _content_type: str, Optional
2061
+ :param _headers: set to override the headers for a single
2062
+ request; this effectively ignores the headers
2063
+ in the spec for a single request.
2064
+ :type _headers: dict, optional
2065
+ :param _host_index: set to override the host_index for a single
2066
+ request; this effectively ignores the host_index
2067
+ in the spec for a single request.
2068
+ :type _host_index: int, optional
2069
+ :return: Returns the result object.
2070
+ """ # noqa: E501
2071
+
2072
+ _param = self._capture_pointcloud_serialize(
2073
+ camera_prim_path=camera_prim_path,
2074
+ downscale_factor=downscale_factor,
2075
+ width=width,
2076
+ height=height,
2077
+ _request_auth=_request_auth,
2078
+ _content_type=_content_type,
2079
+ _headers=_headers,
2080
+ _host_index=_host_index
2081
+ )
2082
+
2083
+ _response_types_map: Dict[str, Optional[str]] = {
2084
+ '200': "PointCloud",
2085
+ '404': None,
2086
+ '500': None,
2087
+ '422': "HTTPValidationError",
2088
+ }
2089
+ response_data = await self.api_client.call_api(
2090
+ *_param,
2091
+ _request_timeout=_request_timeout
2092
+ )
2093
+ await response_data.read()
2094
+ return self.api_client.response_deserialize(
2095
+ response_data=response_data,
2096
+ response_types_map=_response_types_map,
2097
+ ).data
2098
+
2099
+
2100
+ @validate_call
2101
+ async def capture_pointcloud_with_http_info(
2102
+ self,
2103
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
2104
+ downscale_factor: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Downscale factor for the point cloud. 1.0 = no compression, 0.1 = heavy compression")] = None,
2105
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
2106
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
2107
+ _request_timeout: Union[
2108
+ None,
2109
+ Annotated[StrictFloat, Field(gt=0)],
2110
+ Tuple[
2111
+ Annotated[StrictFloat, Field(gt=0)],
2112
+ Annotated[StrictFloat, Field(gt=0)]
2113
+ ]
2114
+ ] = None,
2115
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2116
+ _content_type: Optional[StrictStr] = None,
2117
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2118
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2119
+ ) -> ApiResponse[PointCloud]:
2120
+ """Capture Pointcloud
2121
+
2122
+ Retrieves a point cloud from the camera's captured image. - Resulting data format depends on stage units (e.g., mm, cm, m). - `downscale_factor` determines compression level: 1.0 = full data, <1.0 = compressed.
2123
+
2124
+ :param camera_prim_path: Path of camera prim (required)
2125
+ :type camera_prim_path: str
2126
+ :param downscale_factor: Downscale factor for the point cloud. 1.0 = no compression, 0.1 = heavy compression
2127
+ :type downscale_factor: float
2128
+ :param width: Image width in px
2129
+ :type width: int
2130
+ :param height: Image height in px
2131
+ :type height: int
2132
+ :param _request_timeout: timeout setting for this request. If one
2133
+ number provided, it will be total request
2134
+ timeout. It can also be a pair (tuple) of
2135
+ (connection, read) timeouts.
2136
+ :type _request_timeout: int, tuple(int, int), optional
2137
+ :param _request_auth: set to override the auth_settings for an a single
2138
+ request; this effectively ignores the
2139
+ authentication in the spec for a single request.
2140
+ :type _request_auth: dict, optional
2141
+ :param _content_type: force content-type for the request.
2142
+ :type _content_type: str, Optional
2143
+ :param _headers: set to override the headers for a single
2144
+ request; this effectively ignores the headers
2145
+ in the spec for a single request.
2146
+ :type _headers: dict, optional
2147
+ :param _host_index: set to override the host_index for a single
2148
+ request; this effectively ignores the host_index
2149
+ in the spec for a single request.
2150
+ :type _host_index: int, optional
2151
+ :return: Returns the result object.
2152
+ """ # noqa: E501
2153
+
2154
+ _param = self._capture_pointcloud_serialize(
2155
+ camera_prim_path=camera_prim_path,
2156
+ downscale_factor=downscale_factor,
2157
+ width=width,
2158
+ height=height,
2159
+ _request_auth=_request_auth,
2160
+ _content_type=_content_type,
2161
+ _headers=_headers,
2162
+ _host_index=_host_index
2163
+ )
2164
+
2165
+ _response_types_map: Dict[str, Optional[str]] = {
2166
+ '200': "PointCloud",
2167
+ '404': None,
2168
+ '500': None,
2169
+ '422': "HTTPValidationError",
2170
+ }
2171
+ response_data = await self.api_client.call_api(
2172
+ *_param,
2173
+ _request_timeout=_request_timeout
2174
+ )
2175
+ await response_data.read()
2176
+ return self.api_client.response_deserialize(
2177
+ response_data=response_data,
2178
+ response_types_map=_response_types_map,
2179
+ )
2180
+
2181
+
2182
+ @validate_call
2183
+ async def capture_pointcloud_without_preload_content(
2184
+ self,
2185
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
2186
+ downscale_factor: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Downscale factor for the point cloud. 1.0 = no compression, 0.1 = heavy compression")] = None,
2187
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
2188
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
2189
+ _request_timeout: Union[
2190
+ None,
2191
+ Annotated[StrictFloat, Field(gt=0)],
2192
+ Tuple[
2193
+ Annotated[StrictFloat, Field(gt=0)],
2194
+ Annotated[StrictFloat, Field(gt=0)]
2195
+ ]
2196
+ ] = None,
2197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2198
+ _content_type: Optional[StrictStr] = None,
2199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2201
+ ) -> RESTResponseType:
2202
+ """Capture Pointcloud
2203
+
2204
+ Retrieves a point cloud from the camera's captured image. - Resulting data format depends on stage units (e.g., mm, cm, m). - `downscale_factor` determines compression level: 1.0 = full data, <1.0 = compressed.
2205
+
2206
+ :param camera_prim_path: Path of camera prim (required)
2207
+ :type camera_prim_path: str
2208
+ :param downscale_factor: Downscale factor for the point cloud. 1.0 = no compression, 0.1 = heavy compression
2209
+ :type downscale_factor: float
2210
+ :param width: Image width in px
2211
+ :type width: int
2212
+ :param height: Image height in px
2213
+ :type height: int
2214
+ :param _request_timeout: timeout setting for this request. If one
2215
+ number provided, it will be total request
2216
+ timeout. It can also be a pair (tuple) of
2217
+ (connection, read) timeouts.
2218
+ :type _request_timeout: int, tuple(int, int), optional
2219
+ :param _request_auth: set to override the auth_settings for an a single
2220
+ request; this effectively ignores the
2221
+ authentication in the spec for a single request.
2222
+ :type _request_auth: dict, optional
2223
+ :param _content_type: force content-type for the request.
2224
+ :type _content_type: str, Optional
2225
+ :param _headers: set to override the headers for a single
2226
+ request; this effectively ignores the headers
2227
+ in the spec for a single request.
2228
+ :type _headers: dict, optional
2229
+ :param _host_index: set to override the host_index for a single
2230
+ request; this effectively ignores the host_index
2231
+ in the spec for a single request.
2232
+ :type _host_index: int, optional
2233
+ :return: Returns the result object.
2234
+ """ # noqa: E501
2235
+
2236
+ _param = self._capture_pointcloud_serialize(
2237
+ camera_prim_path=camera_prim_path,
2238
+ downscale_factor=downscale_factor,
2239
+ width=width,
2240
+ height=height,
2241
+ _request_auth=_request_auth,
2242
+ _content_type=_content_type,
2243
+ _headers=_headers,
2244
+ _host_index=_host_index
2245
+ )
2246
+
2247
+ _response_types_map: Dict[str, Optional[str]] = {
2248
+ '200': "PointCloud",
2249
+ '404': None,
2250
+ '500': None,
2251
+ '422': "HTTPValidationError",
2252
+ }
2253
+ response_data = await self.api_client.call_api(
2254
+ *_param,
2255
+ _request_timeout=_request_timeout
2256
+ )
2257
+ return response_data.response
2258
+
2259
+
2260
+ def _capture_pointcloud_serialize(
2261
+ self,
2262
+ camera_prim_path,
2263
+ downscale_factor,
2264
+ width,
2265
+ height,
2266
+ _request_auth,
2267
+ _content_type,
2268
+ _headers,
2269
+ _host_index,
2270
+ ) -> RequestSerialized:
2271
+
2272
+ _host = None
2273
+
2274
+ _collection_formats: Dict[str, str] = {
2275
+ }
2276
+
2277
+ _path_params: Dict[str, str] = {}
2278
+ _query_params: List[Tuple[str, str]] = []
2279
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2280
+ _form_params: List[Tuple[str, str]] = []
2281
+ _files: Dict[str, Union[str, bytes]] = {}
2282
+ _body_params: Optional[bytes] = None
2283
+
2284
+ # process the path parameters
2285
+ # process the query parameters
2286
+ if downscale_factor is not None:
2287
+
2288
+ _query_params.append(('downscale_factor', downscale_factor))
2289
+
2290
+ if camera_prim_path is not None:
2291
+
2292
+ _query_params.append(('camera_prim_path', camera_prim_path))
2293
+
2294
+ if width is not None:
2295
+
2296
+ _query_params.append(('width', width))
2297
+
2298
+ if height is not None:
2299
+
2300
+ _query_params.append(('height', height))
2301
+
2302
+ # process the header parameters
2303
+ # process the form parameters
2304
+ # process the body parameter
2305
+
2306
+
2307
+ # set the HTTP header `Accept`
2308
+ _header_params['Accept'] = self.api_client.select_header_accept(
2309
+ [
2310
+ 'application/json'
2311
+ ]
2312
+ )
2313
+
2314
+
2315
+ # authentication setting
2316
+ _auth_settings: List[str] = [
2317
+ ]
2318
+
2319
+ return self.api_client.param_serialize(
2320
+ method='GET',
2321
+ resource_path='/periphery/cameras/capture/pointcloud',
2322
+ path_params=_path_params,
2323
+ query_params=_query_params,
2324
+ header_params=_header_params,
2325
+ body=_body_params,
2326
+ post_params=_form_params,
2327
+ files=_files,
2328
+ auth_settings=_auth_settings,
2329
+ collection_formats=_collection_formats,
2330
+ _host=_host,
2331
+ _request_auth=_request_auth
2332
+ )
2333
+
2334
+
2335
+
2336
+ @validate_call
2337
+ async def capture_semantic_segmentation(
2338
+ self,
2339
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
2340
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
2341
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="The class of the object for which the data is to be fetched. If no labels are set in the scene, all bounding boxes could be returned.")] = None,
2342
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
2343
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
2344
+ _request_timeout: Union[
2345
+ None,
2346
+ Annotated[StrictFloat, Field(gt=0)],
2347
+ Tuple[
2348
+ Annotated[StrictFloat, Field(gt=0)],
2349
+ Annotated[StrictFloat, Field(gt=0)]
2350
+ ]
2351
+ ] = None,
2352
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2353
+ _content_type: Optional[StrictStr] = None,
2354
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2355
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2356
+ ) -> SemanticSegmentationData:
2357
+ """Capture Semantic Segmentation
2358
+
2359
+ Retrieves semantic segmentation data for specified object classes, with each detected entity uniquely labeled. If no class is specified, data for all labeled objects in the scene is returned. Use the `set_semantic_label` endpoint to assign labels to scene entities.
2360
+
2361
+ :param result_type: Format which will be used to represent the captured data (required)
2362
+ :type result_type: str
2363
+ :param camera_prim_path: Path of camera prim (required)
2364
+ :type camera_prim_path: str
2365
+ :param object_class: The class of the object for which the data is to be fetched. If no labels are set in the scene, all bounding boxes could be returned.
2366
+ :type object_class: List[Optional[str]]
2367
+ :param width: Image width in px
2368
+ :type width: int
2369
+ :param height: Image height in px
2370
+ :type height: int
2371
+ :param _request_timeout: timeout setting for this request. If one
2372
+ number provided, it will be total request
2373
+ timeout. It can also be a pair (tuple) of
2374
+ (connection, read) timeouts.
2375
+ :type _request_timeout: int, tuple(int, int), optional
2376
+ :param _request_auth: set to override the auth_settings for an a single
2377
+ request; this effectively ignores the
2378
+ authentication in the spec for a single request.
2379
+ :type _request_auth: dict, optional
2380
+ :param _content_type: force content-type for the request.
2381
+ :type _content_type: str, Optional
2382
+ :param _headers: set to override the headers for a single
2383
+ request; this effectively ignores the headers
2384
+ in the spec for a single request.
2385
+ :type _headers: dict, optional
2386
+ :param _host_index: set to override the host_index for a single
2387
+ request; this effectively ignores the host_index
2388
+ in the spec for a single request.
2389
+ :type _host_index: int, optional
2390
+ :return: Returns the result object.
2391
+ """ # noqa: E501
2392
+
2393
+ _param = self._capture_semantic_segmentation_serialize(
2394
+ result_type=result_type,
2395
+ camera_prim_path=camera_prim_path,
2396
+ object_class=object_class,
2397
+ width=width,
2398
+ height=height,
2399
+ _request_auth=_request_auth,
2400
+ _content_type=_content_type,
2401
+ _headers=_headers,
2402
+ _host_index=_host_index
2403
+ )
2404
+
2405
+ _response_types_map: Dict[str, Optional[str]] = {
2406
+ '200': "SemanticSegmentationData",
2407
+ '404': None,
2408
+ '500': None,
2409
+ '422': "HTTPValidationError",
2410
+ }
2411
+ response_data = await self.api_client.call_api(
2412
+ *_param,
2413
+ _request_timeout=_request_timeout
2414
+ )
2415
+ await response_data.read()
2416
+ return self.api_client.response_deserialize(
2417
+ response_data=response_data,
2418
+ response_types_map=_response_types_map,
2419
+ ).data
2420
+
2421
+
2422
+ @validate_call
2423
+ async def capture_semantic_segmentation_with_http_info(
2424
+ self,
2425
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
2426
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
2427
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="The class of the object for which the data is to be fetched. If no labels are set in the scene, all bounding boxes could be returned.")] = None,
2428
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
2429
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
2430
+ _request_timeout: Union[
2431
+ None,
2432
+ Annotated[StrictFloat, Field(gt=0)],
2433
+ Tuple[
2434
+ Annotated[StrictFloat, Field(gt=0)],
2435
+ Annotated[StrictFloat, Field(gt=0)]
2436
+ ]
2437
+ ] = None,
2438
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2439
+ _content_type: Optional[StrictStr] = None,
2440
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2441
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2442
+ ) -> ApiResponse[SemanticSegmentationData]:
2443
+ """Capture Semantic Segmentation
2444
+
2445
+ Retrieves semantic segmentation data for specified object classes, with each detected entity uniquely labeled. If no class is specified, data for all labeled objects in the scene is returned. Use the `set_semantic_label` endpoint to assign labels to scene entities.
2446
+
2447
+ :param result_type: Format which will be used to represent the captured data (required)
2448
+ :type result_type: str
2449
+ :param camera_prim_path: Path of camera prim (required)
2450
+ :type camera_prim_path: str
2451
+ :param object_class: The class of the object for which the data is to be fetched. If no labels are set in the scene, all bounding boxes could be returned.
2452
+ :type object_class: List[Optional[str]]
2453
+ :param width: Image width in px
2454
+ :type width: int
2455
+ :param height: Image height in px
2456
+ :type height: int
2457
+ :param _request_timeout: timeout setting for this request. If one
2458
+ number provided, it will be total request
2459
+ timeout. It can also be a pair (tuple) of
2460
+ (connection, read) timeouts.
2461
+ :type _request_timeout: int, tuple(int, int), optional
2462
+ :param _request_auth: set to override the auth_settings for an a single
2463
+ request; this effectively ignores the
2464
+ authentication in the spec for a single request.
2465
+ :type _request_auth: dict, optional
2466
+ :param _content_type: force content-type for the request.
2467
+ :type _content_type: str, Optional
2468
+ :param _headers: set to override the headers for a single
2469
+ request; this effectively ignores the headers
2470
+ in the spec for a single request.
2471
+ :type _headers: dict, optional
2472
+ :param _host_index: set to override the host_index for a single
2473
+ request; this effectively ignores the host_index
2474
+ in the spec for a single request.
2475
+ :type _host_index: int, optional
2476
+ :return: Returns the result object.
2477
+ """ # noqa: E501
2478
+
2479
+ _param = self._capture_semantic_segmentation_serialize(
2480
+ result_type=result_type,
2481
+ camera_prim_path=camera_prim_path,
2482
+ object_class=object_class,
2483
+ width=width,
2484
+ height=height,
2485
+ _request_auth=_request_auth,
2486
+ _content_type=_content_type,
2487
+ _headers=_headers,
2488
+ _host_index=_host_index
2489
+ )
2490
+
2491
+ _response_types_map: Dict[str, Optional[str]] = {
2492
+ '200': "SemanticSegmentationData",
2493
+ '404': None,
2494
+ '500': None,
2495
+ '422': "HTTPValidationError",
2496
+ }
2497
+ response_data = await self.api_client.call_api(
2498
+ *_param,
2499
+ _request_timeout=_request_timeout
2500
+ )
2501
+ await response_data.read()
2502
+ return self.api_client.response_deserialize(
2503
+ response_data=response_data,
2504
+ response_types_map=_response_types_map,
2505
+ )
2506
+
2507
+
2508
+ @validate_call
2509
+ async def capture_semantic_segmentation_without_preload_content(
2510
+ self,
2511
+ result_type: Annotated[StrictStr, Field(description="Format which will be used to represent the captured data")],
2512
+ camera_prim_path: Annotated[StrictStr, Field(description="Path of camera prim")],
2513
+ object_class: Annotated[Optional[List[Optional[StrictStr]]], Field(description="The class of the object for which the data is to be fetched. If no labels are set in the scene, all bounding boxes could be returned.")] = None,
2514
+ width: Annotated[Optional[StrictInt], Field(description="Image width in px")] = None,
2515
+ height: Annotated[Optional[StrictInt], Field(description="Image height in px")] = None,
2516
+ _request_timeout: Union[
2517
+ None,
2518
+ Annotated[StrictFloat, Field(gt=0)],
2519
+ Tuple[
2520
+ Annotated[StrictFloat, Field(gt=0)],
2521
+ Annotated[StrictFloat, Field(gt=0)]
2522
+ ]
2523
+ ] = None,
2524
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2525
+ _content_type: Optional[StrictStr] = None,
2526
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2527
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2528
+ ) -> RESTResponseType:
2529
+ """Capture Semantic Segmentation
2530
+
2531
+ Retrieves semantic segmentation data for specified object classes, with each detected entity uniquely labeled. If no class is specified, data for all labeled objects in the scene is returned. Use the `set_semantic_label` endpoint to assign labels to scene entities.
2532
+
2533
+ :param result_type: Format which will be used to represent the captured data (required)
2534
+ :type result_type: str
2535
+ :param camera_prim_path: Path of camera prim (required)
2536
+ :type camera_prim_path: str
2537
+ :param object_class: The class of the object for which the data is to be fetched. If no labels are set in the scene, all bounding boxes could be returned.
2538
+ :type object_class: List[Optional[str]]
2539
+ :param width: Image width in px
2540
+ :type width: int
2541
+ :param height: Image height in px
2542
+ :type height: int
2543
+ :param _request_timeout: timeout setting for this request. If one
2544
+ number provided, it will be total request
2545
+ timeout. It can also be a pair (tuple) of
2546
+ (connection, read) timeouts.
2547
+ :type _request_timeout: int, tuple(int, int), optional
2548
+ :param _request_auth: set to override the auth_settings for an a single
2549
+ request; this effectively ignores the
2550
+ authentication in the spec for a single request.
2551
+ :type _request_auth: dict, optional
2552
+ :param _content_type: force content-type for the request.
2553
+ :type _content_type: str, Optional
2554
+ :param _headers: set to override the headers for a single
2555
+ request; this effectively ignores the headers
2556
+ in the spec for a single request.
2557
+ :type _headers: dict, optional
2558
+ :param _host_index: set to override the host_index for a single
2559
+ request; this effectively ignores the host_index
2560
+ in the spec for a single request.
2561
+ :type _host_index: int, optional
2562
+ :return: Returns the result object.
2563
+ """ # noqa: E501
2564
+
2565
+ _param = self._capture_semantic_segmentation_serialize(
2566
+ result_type=result_type,
2567
+ camera_prim_path=camera_prim_path,
2568
+ object_class=object_class,
2569
+ width=width,
2570
+ height=height,
2571
+ _request_auth=_request_auth,
2572
+ _content_type=_content_type,
2573
+ _headers=_headers,
2574
+ _host_index=_host_index
2575
+ )
2576
+
2577
+ _response_types_map: Dict[str, Optional[str]] = {
2578
+ '200': "SemanticSegmentationData",
2579
+ '404': None,
2580
+ '500': None,
2581
+ '422': "HTTPValidationError",
2582
+ }
2583
+ response_data = await self.api_client.call_api(
2584
+ *_param,
2585
+ _request_timeout=_request_timeout
2586
+ )
2587
+ return response_data.response
2588
+
2589
+
2590
+ def _capture_semantic_segmentation_serialize(
2591
+ self,
2592
+ result_type,
2593
+ camera_prim_path,
2594
+ object_class,
2595
+ width,
2596
+ height,
2597
+ _request_auth,
2598
+ _content_type,
2599
+ _headers,
2600
+ _host_index,
2601
+ ) -> RequestSerialized:
2602
+
2603
+ _host = None
2604
+
2605
+ _collection_formats: Dict[str, str] = {
2606
+ 'object_class': 'multi',
2607
+ }
2608
+
2609
+ _path_params: Dict[str, str] = {}
2610
+ _query_params: List[Tuple[str, str]] = []
2611
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2612
+ _form_params: List[Tuple[str, str]] = []
2613
+ _files: Dict[str, Union[str, bytes]] = {}
2614
+ _body_params: Optional[bytes] = None
2615
+
2616
+ # process the path parameters
2617
+ # process the query parameters
2618
+ if result_type is not None:
2619
+
2620
+ _query_params.append(('result_type', result_type))
2621
+
2622
+ if object_class is not None:
2623
+
2624
+ _query_params.append(('object_class', object_class))
2625
+
2626
+ if camera_prim_path is not None:
2627
+
2628
+ _query_params.append(('camera_prim_path', camera_prim_path))
2629
+
2630
+ if width is not None:
2631
+
2632
+ _query_params.append(('width', width))
2633
+
2634
+ if height is not None:
2635
+
2636
+ _query_params.append(('height', height))
2637
+
2638
+ # process the header parameters
2639
+ # process the form parameters
2640
+ # process the body parameter
2641
+
2642
+
2643
+ # set the HTTP header `Accept`
2644
+ _header_params['Accept'] = self.api_client.select_header_accept(
2645
+ [
2646
+ 'application/json',
2647
+ 'image/png'
2648
+ ]
2649
+ )
2650
+
2651
+
2652
+ # authentication setting
2653
+ _auth_settings: List[str] = [
2654
+ ]
2655
+
2656
+ return self.api_client.param_serialize(
2657
+ method='GET',
2658
+ resource_path='/periphery/cameras/capture/semantic-segmentation',
2659
+ path_params=_path_params,
2660
+ query_params=_query_params,
2661
+ header_params=_header_params,
2662
+ body=_body_params,
2663
+ post_params=_form_params,
2664
+ files=_files,
2665
+ auth_settings=_auth_settings,
2666
+ collection_formats=_collection_formats,
2667
+ _host=_host,
2668
+ _request_auth=_request_auth
2669
+ )
2670
+
2671
+
2672
+
2673
+ @validate_call
2674
+ async def get_active_camera(
2675
+ self,
2676
+ _request_timeout: Union[
2677
+ None,
2678
+ Annotated[StrictFloat, Field(gt=0)],
2679
+ Tuple[
2680
+ Annotated[StrictFloat, Field(gt=0)],
2681
+ Annotated[StrictFloat, Field(gt=0)]
2682
+ ]
2683
+ ] = None,
2684
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2685
+ _content_type: Optional[StrictStr] = None,
2686
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2687
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2688
+ ) -> str:
2689
+ """Get Active Camera
2690
+
2691
+ Returns the active camera prim path from the active viewport.
2692
+
2693
+ :param _request_timeout: timeout setting for this request. If one
2694
+ number provided, it will be total request
2695
+ timeout. It can also be a pair (tuple) of
2696
+ (connection, read) timeouts.
2697
+ :type _request_timeout: int, tuple(int, int), optional
2698
+ :param _request_auth: set to override the auth_settings for an a single
2699
+ request; this effectively ignores the
2700
+ authentication in the spec for a single request.
2701
+ :type _request_auth: dict, optional
2702
+ :param _content_type: force content-type for the request.
2703
+ :type _content_type: str, Optional
2704
+ :param _headers: set to override the headers for a single
2705
+ request; this effectively ignores the headers
2706
+ in the spec for a single request.
2707
+ :type _headers: dict, optional
2708
+ :param _host_index: set to override the host_index for a single
2709
+ request; this effectively ignores the host_index
2710
+ in the spec for a single request.
2711
+ :type _host_index: int, optional
2712
+ :return: Returns the result object.
2713
+ """ # noqa: E501
2714
+
2715
+ _param = self._get_active_camera_serialize(
2716
+ _request_auth=_request_auth,
2717
+ _content_type=_content_type,
2718
+ _headers=_headers,
2719
+ _host_index=_host_index
2720
+ )
2721
+
2722
+ _response_types_map: Dict[str, Optional[str]] = {
2723
+ '200': "str",
2724
+ '500': None,
2725
+ }
2726
+ response_data = await self.api_client.call_api(
2727
+ *_param,
2728
+ _request_timeout=_request_timeout
2729
+ )
2730
+ await response_data.read()
2731
+ return self.api_client.response_deserialize(
2732
+ response_data=response_data,
2733
+ response_types_map=_response_types_map,
2734
+ ).data
2735
+
2736
+
2737
+ @validate_call
2738
+ async def get_active_camera_with_http_info(
2739
+ self,
2740
+ _request_timeout: Union[
2741
+ None,
2742
+ Annotated[StrictFloat, Field(gt=0)],
2743
+ Tuple[
2744
+ Annotated[StrictFloat, Field(gt=0)],
2745
+ Annotated[StrictFloat, Field(gt=0)]
2746
+ ]
2747
+ ] = None,
2748
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2749
+ _content_type: Optional[StrictStr] = None,
2750
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2751
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2752
+ ) -> ApiResponse[str]:
2753
+ """Get Active Camera
2754
+
2755
+ Returns the active camera prim path from the active viewport.
2756
+
2757
+ :param _request_timeout: timeout setting for this request. If one
2758
+ number provided, it will be total request
2759
+ timeout. It can also be a pair (tuple) of
2760
+ (connection, read) timeouts.
2761
+ :type _request_timeout: int, tuple(int, int), optional
2762
+ :param _request_auth: set to override the auth_settings for an a single
2763
+ request; this effectively ignores the
2764
+ authentication in the spec for a single request.
2765
+ :type _request_auth: dict, optional
2766
+ :param _content_type: force content-type for the request.
2767
+ :type _content_type: str, Optional
2768
+ :param _headers: set to override the headers for a single
2769
+ request; this effectively ignores the headers
2770
+ in the spec for a single request.
2771
+ :type _headers: dict, optional
2772
+ :param _host_index: set to override the host_index for a single
2773
+ request; this effectively ignores the host_index
2774
+ in the spec for a single request.
2775
+ :type _host_index: int, optional
2776
+ :return: Returns the result object.
2777
+ """ # noqa: E501
2778
+
2779
+ _param = self._get_active_camera_serialize(
2780
+ _request_auth=_request_auth,
2781
+ _content_type=_content_type,
2782
+ _headers=_headers,
2783
+ _host_index=_host_index
2784
+ )
2785
+
2786
+ _response_types_map: Dict[str, Optional[str]] = {
2787
+ '200': "str",
2788
+ '500': None,
2789
+ }
2790
+ response_data = await self.api_client.call_api(
2791
+ *_param,
2792
+ _request_timeout=_request_timeout
2793
+ )
2794
+ await response_data.read()
2795
+ return self.api_client.response_deserialize(
2796
+ response_data=response_data,
2797
+ response_types_map=_response_types_map,
2798
+ )
2799
+
2800
+
2801
+ @validate_call
2802
+ async def get_active_camera_without_preload_content(
2803
+ self,
2804
+ _request_timeout: Union[
2805
+ None,
2806
+ Annotated[StrictFloat, Field(gt=0)],
2807
+ Tuple[
2808
+ Annotated[StrictFloat, Field(gt=0)],
2809
+ Annotated[StrictFloat, Field(gt=0)]
2810
+ ]
2811
+ ] = None,
2812
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2813
+ _content_type: Optional[StrictStr] = None,
2814
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2815
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2816
+ ) -> RESTResponseType:
2817
+ """Get Active Camera
2818
+
2819
+ Returns the active camera prim path from the active viewport.
2820
+
2821
+ :param _request_timeout: timeout setting for this request. If one
2822
+ number provided, it will be total request
2823
+ timeout. It can also be a pair (tuple) of
2824
+ (connection, read) timeouts.
2825
+ :type _request_timeout: int, tuple(int, int), optional
2826
+ :param _request_auth: set to override the auth_settings for an a single
2827
+ request; this effectively ignores the
2828
+ authentication in the spec for a single request.
2829
+ :type _request_auth: dict, optional
2830
+ :param _content_type: force content-type for the request.
2831
+ :type _content_type: str, Optional
2832
+ :param _headers: set to override the headers for a single
2833
+ request; this effectively ignores the headers
2834
+ in the spec for a single request.
2835
+ :type _headers: dict, optional
2836
+ :param _host_index: set to override the host_index for a single
2837
+ request; this effectively ignores the host_index
2838
+ in the spec for a single request.
2839
+ :type _host_index: int, optional
2840
+ :return: Returns the result object.
2841
+ """ # noqa: E501
2842
+
2843
+ _param = self._get_active_camera_serialize(
2844
+ _request_auth=_request_auth,
2845
+ _content_type=_content_type,
2846
+ _headers=_headers,
2847
+ _host_index=_host_index
2848
+ )
2849
+
2850
+ _response_types_map: Dict[str, Optional[str]] = {
2851
+ '200': "str",
2852
+ '500': None,
2853
+ }
2854
+ response_data = await self.api_client.call_api(
2855
+ *_param,
2856
+ _request_timeout=_request_timeout
2857
+ )
2858
+ return response_data.response
2859
+
2860
+
2861
+ def _get_active_camera_serialize(
2862
+ self,
2863
+ _request_auth,
2864
+ _content_type,
2865
+ _headers,
2866
+ _host_index,
2867
+ ) -> RequestSerialized:
2868
+
2869
+ _host = None
2870
+
2871
+ _collection_formats: Dict[str, str] = {
2872
+ }
2873
+
2874
+ _path_params: Dict[str, str] = {}
2875
+ _query_params: List[Tuple[str, str]] = []
2876
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2877
+ _form_params: List[Tuple[str, str]] = []
2878
+ _files: Dict[str, Union[str, bytes]] = {}
2879
+ _body_params: Optional[bytes] = None
2880
+
2881
+ # process the path parameters
2882
+ # process the query parameters
2883
+ # process the header parameters
2884
+ # process the form parameters
2885
+ # process the body parameter
2886
+
2887
+
2888
+ # set the HTTP header `Accept`
2889
+ _header_params['Accept'] = self.api_client.select_header_accept(
2890
+ [
2891
+ 'application/json'
2892
+ ]
2893
+ )
2894
+
2895
+
2896
+ # authentication setting
2897
+ _auth_settings: List[str] = [
2898
+ ]
2899
+
2900
+ return self.api_client.param_serialize(
2901
+ method='GET',
2902
+ resource_path='/periphery/cameras/active',
2903
+ path_params=_path_params,
2904
+ query_params=_query_params,
2905
+ header_params=_header_params,
2906
+ body=_body_params,
2907
+ post_params=_form_params,
2908
+ files=_files,
2909
+ auth_settings=_auth_settings,
2910
+ collection_formats=_collection_formats,
2911
+ _host=_host,
2912
+ _request_auth=_request_auth
2913
+ )
2914
+
2915
+
2916
+
2917
+ @validate_call
2918
+ async def list_camera_prims(
2919
+ self,
2920
+ _request_timeout: Union[
2921
+ None,
2922
+ Annotated[StrictFloat, Field(gt=0)],
2923
+ Tuple[
2924
+ Annotated[StrictFloat, Field(gt=0)],
2925
+ Annotated[StrictFloat, Field(gt=0)]
2926
+ ]
2927
+ ] = None,
2928
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2929
+ _content_type: Optional[StrictStr] = None,
2930
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2931
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2932
+ ) -> List[str]:
2933
+ """List Camera Prims
2934
+
2935
+ Returns all camera prim paths defined in the current scene stage.
2936
+
2937
+ :param _request_timeout: timeout setting for this request. If one
2938
+ number provided, it will be total request
2939
+ timeout. It can also be a pair (tuple) of
2940
+ (connection, read) timeouts.
2941
+ :type _request_timeout: int, tuple(int, int), optional
2942
+ :param _request_auth: set to override the auth_settings for an a single
2943
+ request; this effectively ignores the
2944
+ authentication in the spec for a single request.
2945
+ :type _request_auth: dict, optional
2946
+ :param _content_type: force content-type for the request.
2947
+ :type _content_type: str, Optional
2948
+ :param _headers: set to override the headers for a single
2949
+ request; this effectively ignores the headers
2950
+ in the spec for a single request.
2951
+ :type _headers: dict, optional
2952
+ :param _host_index: set to override the host_index for a single
2953
+ request; this effectively ignores the host_index
2954
+ in the spec for a single request.
2955
+ :type _host_index: int, optional
2956
+ :return: Returns the result object.
2957
+ """ # noqa: E501
2958
+
2959
+ _param = self._list_camera_prims_serialize(
2960
+ _request_auth=_request_auth,
2961
+ _content_type=_content_type,
2962
+ _headers=_headers,
2963
+ _host_index=_host_index
2964
+ )
2965
+
2966
+ _response_types_map: Dict[str, Optional[str]] = {
2967
+ '200': "List[str]",
2968
+ '500': None,
2969
+ }
2970
+ response_data = await self.api_client.call_api(
2971
+ *_param,
2972
+ _request_timeout=_request_timeout
2973
+ )
2974
+ await response_data.read()
2975
+ return self.api_client.response_deserialize(
2976
+ response_data=response_data,
2977
+ response_types_map=_response_types_map,
2978
+ ).data
2979
+
2980
+
2981
+ @validate_call
2982
+ async def list_camera_prims_with_http_info(
2983
+ self,
2984
+ _request_timeout: Union[
2985
+ None,
2986
+ Annotated[StrictFloat, Field(gt=0)],
2987
+ Tuple[
2988
+ Annotated[StrictFloat, Field(gt=0)],
2989
+ Annotated[StrictFloat, Field(gt=0)]
2990
+ ]
2991
+ ] = None,
2992
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2993
+ _content_type: Optional[StrictStr] = None,
2994
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2995
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2996
+ ) -> ApiResponse[List[str]]:
2997
+ """List Camera Prims
2998
+
2999
+ Returns all camera prim paths defined in the current scene stage.
3000
+
3001
+ :param _request_timeout: timeout setting for this request. If one
3002
+ number provided, it will be total request
3003
+ timeout. It can also be a pair (tuple) of
3004
+ (connection, read) timeouts.
3005
+ :type _request_timeout: int, tuple(int, int), optional
3006
+ :param _request_auth: set to override the auth_settings for an a single
3007
+ request; this effectively ignores the
3008
+ authentication in the spec for a single request.
3009
+ :type _request_auth: dict, optional
3010
+ :param _content_type: force content-type for the request.
3011
+ :type _content_type: str, Optional
3012
+ :param _headers: set to override the headers for a single
3013
+ request; this effectively ignores the headers
3014
+ in the spec for a single request.
3015
+ :type _headers: dict, optional
3016
+ :param _host_index: set to override the host_index for a single
3017
+ request; this effectively ignores the host_index
3018
+ in the spec for a single request.
3019
+ :type _host_index: int, optional
3020
+ :return: Returns the result object.
3021
+ """ # noqa: E501
3022
+
3023
+ _param = self._list_camera_prims_serialize(
3024
+ _request_auth=_request_auth,
3025
+ _content_type=_content_type,
3026
+ _headers=_headers,
3027
+ _host_index=_host_index
3028
+ )
3029
+
3030
+ _response_types_map: Dict[str, Optional[str]] = {
3031
+ '200': "List[str]",
3032
+ '500': None,
3033
+ }
3034
+ response_data = await self.api_client.call_api(
3035
+ *_param,
3036
+ _request_timeout=_request_timeout
3037
+ )
3038
+ await response_data.read()
3039
+ return self.api_client.response_deserialize(
3040
+ response_data=response_data,
3041
+ response_types_map=_response_types_map,
3042
+ )
3043
+
3044
+
3045
+ @validate_call
3046
+ async def list_camera_prims_without_preload_content(
3047
+ self,
3048
+ _request_timeout: Union[
3049
+ None,
3050
+ Annotated[StrictFloat, Field(gt=0)],
3051
+ Tuple[
3052
+ Annotated[StrictFloat, Field(gt=0)],
3053
+ Annotated[StrictFloat, Field(gt=0)]
3054
+ ]
3055
+ ] = None,
3056
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3057
+ _content_type: Optional[StrictStr] = None,
3058
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3059
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3060
+ ) -> RESTResponseType:
3061
+ """List Camera Prims
3062
+
3063
+ Returns all camera prim paths defined in the current scene stage.
3064
+
3065
+ :param _request_timeout: timeout setting for this request. If one
3066
+ number provided, it will be total request
3067
+ timeout. It can also be a pair (tuple) of
3068
+ (connection, read) timeouts.
3069
+ :type _request_timeout: int, tuple(int, int), optional
3070
+ :param _request_auth: set to override the auth_settings for an a single
3071
+ request; this effectively ignores the
3072
+ authentication in the spec for a single request.
3073
+ :type _request_auth: dict, optional
3074
+ :param _content_type: force content-type for the request.
3075
+ :type _content_type: str, Optional
3076
+ :param _headers: set to override the headers for a single
3077
+ request; this effectively ignores the headers
3078
+ in the spec for a single request.
3079
+ :type _headers: dict, optional
3080
+ :param _host_index: set to override the host_index for a single
3081
+ request; this effectively ignores the host_index
3082
+ in the spec for a single request.
3083
+ :type _host_index: int, optional
3084
+ :return: Returns the result object.
3085
+ """ # noqa: E501
3086
+
3087
+ _param = self._list_camera_prims_serialize(
3088
+ _request_auth=_request_auth,
3089
+ _content_type=_content_type,
3090
+ _headers=_headers,
3091
+ _host_index=_host_index
3092
+ )
3093
+
3094
+ _response_types_map: Dict[str, Optional[str]] = {
3095
+ '200': "List[str]",
3096
+ '500': None,
3097
+ }
3098
+ response_data = await self.api_client.call_api(
3099
+ *_param,
3100
+ _request_timeout=_request_timeout
3101
+ )
3102
+ return response_data.response
3103
+
3104
+
3105
+ def _list_camera_prims_serialize(
3106
+ self,
3107
+ _request_auth,
3108
+ _content_type,
3109
+ _headers,
3110
+ _host_index,
3111
+ ) -> RequestSerialized:
3112
+
3113
+ _host = None
3114
+
3115
+ _collection_formats: Dict[str, str] = {
3116
+ }
3117
+
3118
+ _path_params: Dict[str, str] = {}
3119
+ _query_params: List[Tuple[str, str]] = []
3120
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3121
+ _form_params: List[Tuple[str, str]] = []
3122
+ _files: Dict[str, Union[str, bytes]] = {}
3123
+ _body_params: Optional[bytes] = None
3124
+
3125
+ # process the path parameters
3126
+ # process the query parameters
3127
+ # process the header parameters
3128
+ # process the form parameters
3129
+ # process the body parameter
3130
+
3131
+
3132
+ # set the HTTP header `Accept`
3133
+ _header_params['Accept'] = self.api_client.select_header_accept(
3134
+ [
3135
+ 'application/json'
3136
+ ]
3137
+ )
3138
+
3139
+
3140
+ # authentication setting
3141
+ _auth_settings: List[str] = [
3142
+ ]
3143
+
3144
+ return self.api_client.param_serialize(
3145
+ method='GET',
3146
+ resource_path='/periphery/cameras/prims',
3147
+ path_params=_path_params,
3148
+ query_params=_query_params,
3149
+ header_params=_header_params,
3150
+ body=_body_params,
3151
+ post_params=_form_params,
3152
+ files=_files,
3153
+ auth_settings=_auth_settings,
3154
+ collection_formats=_collection_formats,
3155
+ _host=_host,
3156
+ _request_auth=_request_auth
3157
+ )
3158
+
3159
+
3160
+
3161
+ @validate_call
3162
+ async def set_active_camera(
3163
+ self,
3164
+ body: StrictStr,
3165
+ _request_timeout: Union[
3166
+ None,
3167
+ Annotated[StrictFloat, Field(gt=0)],
3168
+ Tuple[
3169
+ Annotated[StrictFloat, Field(gt=0)],
3170
+ Annotated[StrictFloat, Field(gt=0)]
3171
+ ]
3172
+ ] = None,
3173
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3174
+ _content_type: Optional[StrictStr] = None,
3175
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3176
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3177
+ ) -> None:
3178
+ """Set Active Camera
3179
+
3180
+ Sets the given camera prim path as the active viewport camera.
3181
+
3182
+ :param body: (required)
3183
+ :type body: str
3184
+ :param _request_timeout: timeout setting for this request. If one
3185
+ number provided, it will be total request
3186
+ timeout. It can also be a pair (tuple) of
3187
+ (connection, read) timeouts.
3188
+ :type _request_timeout: int, tuple(int, int), optional
3189
+ :param _request_auth: set to override the auth_settings for an a single
3190
+ request; this effectively ignores the
3191
+ authentication in the spec for a single request.
3192
+ :type _request_auth: dict, optional
3193
+ :param _content_type: force content-type for the request.
3194
+ :type _content_type: str, Optional
3195
+ :param _headers: set to override the headers for a single
3196
+ request; this effectively ignores the headers
3197
+ in the spec for a single request.
3198
+ :type _headers: dict, optional
3199
+ :param _host_index: set to override the host_index for a single
3200
+ request; this effectively ignores the host_index
3201
+ in the spec for a single request.
3202
+ :type _host_index: int, optional
3203
+ :return: Returns the result object.
3204
+ """ # noqa: E501
3205
+
3206
+ _param = self._set_active_camera_serialize(
3207
+ body=body,
3208
+ _request_auth=_request_auth,
3209
+ _content_type=_content_type,
3210
+ _headers=_headers,
3211
+ _host_index=_host_index
3212
+ )
3213
+
3214
+ _response_types_map: Dict[str, Optional[str]] = {
3215
+ '204': None,
3216
+ '404': None,
3217
+ '422': "HTTPValidationError",
3218
+ }
3219
+ response_data = await self.api_client.call_api(
3220
+ *_param,
3221
+ _request_timeout=_request_timeout
3222
+ )
3223
+ await response_data.read()
3224
+ return self.api_client.response_deserialize(
3225
+ response_data=response_data,
3226
+ response_types_map=_response_types_map,
3227
+ ).data
3228
+
3229
+
3230
+ @validate_call
3231
+ async def set_active_camera_with_http_info(
3232
+ self,
3233
+ body: StrictStr,
3234
+ _request_timeout: Union[
3235
+ None,
3236
+ Annotated[StrictFloat, Field(gt=0)],
3237
+ Tuple[
3238
+ Annotated[StrictFloat, Field(gt=0)],
3239
+ Annotated[StrictFloat, Field(gt=0)]
3240
+ ]
3241
+ ] = None,
3242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3243
+ _content_type: Optional[StrictStr] = None,
3244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3246
+ ) -> ApiResponse[None]:
3247
+ """Set Active Camera
3248
+
3249
+ Sets the given camera prim path as the active viewport camera.
3250
+
3251
+ :param body: (required)
3252
+ :type body: str
3253
+ :param _request_timeout: timeout setting for this request. If one
3254
+ number provided, it will be total request
3255
+ timeout. It can also be a pair (tuple) of
3256
+ (connection, read) timeouts.
3257
+ :type _request_timeout: int, tuple(int, int), optional
3258
+ :param _request_auth: set to override the auth_settings for an a single
3259
+ request; this effectively ignores the
3260
+ authentication in the spec for a single request.
3261
+ :type _request_auth: dict, optional
3262
+ :param _content_type: force content-type for the request.
3263
+ :type _content_type: str, Optional
3264
+ :param _headers: set to override the headers for a single
3265
+ request; this effectively ignores the headers
3266
+ in the spec for a single request.
3267
+ :type _headers: dict, optional
3268
+ :param _host_index: set to override the host_index for a single
3269
+ request; this effectively ignores the host_index
3270
+ in the spec for a single request.
3271
+ :type _host_index: int, optional
3272
+ :return: Returns the result object.
3273
+ """ # noqa: E501
3274
+
3275
+ _param = self._set_active_camera_serialize(
3276
+ body=body,
3277
+ _request_auth=_request_auth,
3278
+ _content_type=_content_type,
3279
+ _headers=_headers,
3280
+ _host_index=_host_index
3281
+ )
3282
+
3283
+ _response_types_map: Dict[str, Optional[str]] = {
3284
+ '204': None,
3285
+ '404': None,
3286
+ '422': "HTTPValidationError",
3287
+ }
3288
+ response_data = await self.api_client.call_api(
3289
+ *_param,
3290
+ _request_timeout=_request_timeout
3291
+ )
3292
+ await response_data.read()
3293
+ return self.api_client.response_deserialize(
3294
+ response_data=response_data,
3295
+ response_types_map=_response_types_map,
3296
+ )
3297
+
3298
+
3299
+ @validate_call
3300
+ async def set_active_camera_without_preload_content(
3301
+ self,
3302
+ body: StrictStr,
3303
+ _request_timeout: Union[
3304
+ None,
3305
+ Annotated[StrictFloat, Field(gt=0)],
3306
+ Tuple[
3307
+ Annotated[StrictFloat, Field(gt=0)],
3308
+ Annotated[StrictFloat, Field(gt=0)]
3309
+ ]
3310
+ ] = None,
3311
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3312
+ _content_type: Optional[StrictStr] = None,
3313
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3314
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3315
+ ) -> RESTResponseType:
3316
+ """Set Active Camera
3317
+
3318
+ Sets the given camera prim path as the active viewport camera.
3319
+
3320
+ :param body: (required)
3321
+ :type body: str
3322
+ :param _request_timeout: timeout setting for this request. If one
3323
+ number provided, it will be total request
3324
+ timeout. It can also be a pair (tuple) of
3325
+ (connection, read) timeouts.
3326
+ :type _request_timeout: int, tuple(int, int), optional
3327
+ :param _request_auth: set to override the auth_settings for an a single
3328
+ request; this effectively ignores the
3329
+ authentication in the spec for a single request.
3330
+ :type _request_auth: dict, optional
3331
+ :param _content_type: force content-type for the request.
3332
+ :type _content_type: str, Optional
3333
+ :param _headers: set to override the headers for a single
3334
+ request; this effectively ignores the headers
3335
+ in the spec for a single request.
3336
+ :type _headers: dict, optional
3337
+ :param _host_index: set to override the host_index for a single
3338
+ request; this effectively ignores the host_index
3339
+ in the spec for a single request.
3340
+ :type _host_index: int, optional
3341
+ :return: Returns the result object.
3342
+ """ # noqa: E501
3343
+
3344
+ _param = self._set_active_camera_serialize(
3345
+ body=body,
3346
+ _request_auth=_request_auth,
3347
+ _content_type=_content_type,
3348
+ _headers=_headers,
3349
+ _host_index=_host_index
3350
+ )
3351
+
3352
+ _response_types_map: Dict[str, Optional[str]] = {
3353
+ '204': None,
3354
+ '404': None,
3355
+ '422': "HTTPValidationError",
3356
+ }
3357
+ response_data = await self.api_client.call_api(
3358
+ *_param,
3359
+ _request_timeout=_request_timeout
3360
+ )
3361
+ return response_data.response
3362
+
3363
+
3364
+ def _set_active_camera_serialize(
3365
+ self,
3366
+ body,
3367
+ _request_auth,
3368
+ _content_type,
3369
+ _headers,
3370
+ _host_index,
3371
+ ) -> RequestSerialized:
3372
+
3373
+ _host = None
3374
+
3375
+ _collection_formats: Dict[str, str] = {
3376
+ }
3377
+
3378
+ _path_params: Dict[str, str] = {}
3379
+ _query_params: List[Tuple[str, str]] = []
3380
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3381
+ _form_params: List[Tuple[str, str]] = []
3382
+ _files: Dict[str, Union[str, bytes]] = {}
3383
+ _body_params: Optional[bytes] = None
3384
+
3385
+ # process the path parameters
3386
+ # process the query parameters
3387
+ # process the header parameters
3388
+ # process the form parameters
3389
+ # process the body parameter
3390
+ if body is not None:
3391
+ _body_params = body
3392
+
3393
+
3394
+ # set the HTTP header `Accept`
3395
+ _header_params['Accept'] = self.api_client.select_header_accept(
3396
+ [
3397
+ 'application/json'
3398
+ ]
3399
+ )
3400
+
3401
+ # set the HTTP header `Content-Type`
3402
+ if _content_type:
3403
+ _header_params['Content-Type'] = _content_type
3404
+ else:
3405
+ _default_content_type = (
3406
+ self.api_client.select_header_content_type(
3407
+ [
3408
+ 'application/json'
3409
+ ]
3410
+ )
3411
+ )
3412
+ if _default_content_type is not None:
3413
+ _header_params['Content-Type'] = _default_content_type
3414
+
3415
+ # authentication setting
3416
+ _auth_settings: List[str] = [
3417
+ ]
3418
+
3419
+ return self.api_client.param_serialize(
3420
+ method='PUT',
3421
+ resource_path='/periphery/cameras/active',
3422
+ path_params=_path_params,
3423
+ query_params=_query_params,
3424
+ header_params=_header_params,
3425
+ body=_body_params,
3426
+ post_params=_form_params,
3427
+ files=_files,
3428
+ auth_settings=_auth_settings,
3429
+ collection_formats=_collection_formats,
3430
+ _host=_host,
3431
+ _request_auth=_request_auth
3432
+ )
3433
+
3434
+