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.
- wandelbots_isaacsim_api/__init__.py +50 -0
- wandelbots_isaacsim_api/api/__init__.py +25 -0
- wandelbots_isaacsim_api/api/collision_world_api.py +316 -0
- wandelbots_isaacsim_api/api/default_api.py +800 -0
- wandelbots_isaacsim_api/api/manipulators_motion_group_api.py +1619 -0
- wandelbots_isaacsim_api/api/periphery_camera_api.py +3434 -0
- wandelbots_isaacsim_api/api/prims_api.py +4963 -0
- wandelbots_isaacsim_api/api/stage_api.py +2351 -0
- wandelbots_isaacsim_api/api/teaching_api.py +1312 -0
- wandelbots_isaacsim_api/api/trajectory_api.py +1686 -0
- wandelbots_isaacsim_api/api/ui_api.py +562 -0
- wandelbots_isaacsim_api/api_client.py +800 -0
- wandelbots_isaacsim_api/api_response.py +21 -0
- wandelbots_isaacsim_api/collision/__init__.py +0 -0
- wandelbots_isaacsim_api/collision/utils.py +99 -0
- wandelbots_isaacsim_api/configuration.py +561 -0
- wandelbots_isaacsim_api/exceptions.py +216 -0
- wandelbots_isaacsim_api/models/__init__.py +135 -0
- wandelbots_isaacsim_api/models/auth0_credentials.py +100 -0
- wandelbots_isaacsim_api/models/body_apply_relative_pose.py +99 -0
- wandelbots_isaacsim_api/models/body_assign_default_poses.py +91 -0
- wandelbots_isaacsim_api/models/body_reset_to_default_poses.py +91 -0
- wandelbots_isaacsim_api/models/body_set_joint_state.py +93 -0
- wandelbots_isaacsim_api/models/body_set_prim_metadata.py +97 -0
- wandelbots_isaacsim_api/models/body_set_prim_visibility.py +103 -0
- wandelbots_isaacsim_api/models/body_set_semantic_label.py +93 -0
- wandelbots_isaacsim_api/models/body_update_colliders.py +93 -0
- wandelbots_isaacsim_api/models/body_update_pose.py +97 -0
- wandelbots_isaacsim_api/models/bounding_box2_d.py +98 -0
- wandelbots_isaacsim_api/models/bounding_box3_d.py +100 -0
- wandelbots_isaacsim_api/models/box.py +119 -0
- wandelbots_isaacsim_api/models/box_sweep_parameters.py +111 -0
- wandelbots_isaacsim_api/models/capsule.py +105 -0
- wandelbots_isaacsim_api/models/collider.py +101 -0
- wandelbots_isaacsim_api/models/convex_hull.py +103 -0
- wandelbots_isaacsim_api/models/create_ghost_object.py +102 -0
- wandelbots_isaacsim_api/models/custom_prim.py +100 -0
- wandelbots_isaacsim_api/models/custom_prim_data.py +93 -0
- wandelbots_isaacsim_api/models/cylinder.py +105 -0
- wandelbots_isaacsim_api/models/ghost_object.py +106 -0
- wandelbots_isaacsim_api/models/ghost_object_source.py +93 -0
- wandelbots_isaacsim_api/models/gizmo_prim.py +98 -0
- wandelbots_isaacsim_api/models/http_validation_error.py +108 -0
- wandelbots_isaacsim_api/models/instance_segmentation_data.py +97 -0
- wandelbots_isaacsim_api/models/instance_segmentation_info.py +91 -0
- wandelbots_isaacsim_api/models/motion_group_configuration.py +99 -0
- wandelbots_isaacsim_api/models/motion_stream_configuration.py +101 -0
- wandelbots_isaacsim_api/models/patch_trajectory_data.py +107 -0
- wandelbots_isaacsim_api/models/plane.py +101 -0
- wandelbots_isaacsim_api/models/point_cloud.py +95 -0
- wandelbots_isaacsim_api/models/pose.py +137 -0
- wandelbots_isaacsim_api/models/pose_position_inner.py +138 -0
- wandelbots_isaacsim_api/models/prim.py +165 -0
- wandelbots_isaacsim_api/models/prim_selection.py +91 -0
- wandelbots_isaacsim_api/models/quat_pose.py +92 -0
- wandelbots_isaacsim_api/models/relative_pose_mode.py +39 -0
- wandelbots_isaacsim_api/models/response_get_pose.py +134 -0
- wandelbots_isaacsim_api/models/response_get_relative_pose.py +134 -0
- wandelbots_isaacsim_api/models/response_list_default_poses_value.py +140 -0
- wandelbots_isaacsim_api/models/semantic_segmentation_data.py +97 -0
- wandelbots_isaacsim_api/models/semantic_segmentation_info.py +91 -0
- wandelbots_isaacsim_api/models/shape.py +194 -0
- wandelbots_isaacsim_api/models/simulation_state.py +101 -0
- wandelbots_isaacsim_api/models/sphere.py +103 -0
- wandelbots_isaacsim_api/models/sphere_sweep_parameters.py +107 -0
- wandelbots_isaacsim_api/models/stage_units.py +91 -0
- wandelbots_isaacsim_api/models/sweep_arguments.py +134 -0
- wandelbots_isaacsim_api/models/tcp_source.py +99 -0
- wandelbots_isaacsim_api/models/trajectory_data.py +101 -0
- wandelbots_isaacsim_api/models/trajectory_marker.py +97 -0
- wandelbots_isaacsim_api/models/trajectory_object.py +101 -0
- wandelbots_isaacsim_api/models/trajectory_options.py +94 -0
- wandelbots_isaacsim_api/models/usd_stage_model.py +91 -0
- wandelbots_isaacsim_api/models/validation_error.py +112 -0
- wandelbots_isaacsim_api/models/validation_error_loc_inner.py +138 -0
- wandelbots_isaacsim_api/models/ws_pose.py +92 -0
- wandelbots_isaacsim_api/py.typed +0 -0
- wandelbots_isaacsim_api/rest.py +212 -0
- wandelbots_isaacsim_api/trajectory/__init__.py +17 -0
- wandelbots_isaacsim_api/trajectory/trajectory_viewer.py +111 -0
- wandelbots_isaacsim_api/trajectory/utils.py +154 -0
- wandelbots_isaacsim_api-2.2.2.dist-info/LICENSE +201 -0
- wandelbots_isaacsim_api-2.2.2.dist-info/METADATA +60 -0
- wandelbots_isaacsim_api-2.2.2.dist-info/RECORD +85 -0
- wandelbots_isaacsim_api-2.2.2.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,98 @@
|
|
|
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 __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class BoundingBox2D(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
BoundingBox2D
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
label: StrictStr = Field(description="Class label for the detected object")
|
|
31
|
+
bbox: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=4, max_length=4)] = Field(description="Bounding box coordinates [x_min, y_min, x_max, y_max]")
|
|
32
|
+
prim_path: StrictStr = Field(description="Path to the USD prim of the detected object")
|
|
33
|
+
semantic_id: StrictInt = Field(description="Semantic ID of the detected object")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["label", "bbox", "prim_path", "semantic_id"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""
|
|
49
|
+
Returns the JSON representation of the model using alias
|
|
50
|
+
|
|
51
|
+
Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
|
|
52
|
+
It is unable to resolve nested types generated by openapi-generator.
|
|
53
|
+
"""
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of BoundingBox2D from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of BoundingBox2D from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"label": obj.get("label"),
|
|
92
|
+
"bbox": obj.get("bbox"),
|
|
93
|
+
"prim_path": obj.get("prim_path"),
|
|
94
|
+
"semantic_id": obj.get("semantic_id")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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 __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class BoundingBox3D(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
BoundingBox3D
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
label: StrictStr = Field(description="Class label for the detected object")
|
|
31
|
+
bbox: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=6, max_length=6)] = Field(description="Bounding box coordinates [x_min, y_min, z_min, x_max, y_max, z_max]")
|
|
32
|
+
prim_path: StrictStr = Field(description="Path to the USD prim of the detected object")
|
|
33
|
+
semantic_id: StrictInt = Field(description="Semantic ID of the detected object")
|
|
34
|
+
transform: Annotated[List[List[Union[StrictFloat, StrictInt]]], Field(min_length=4, max_length=4)] = Field(description="4x4 transformation matrix. Translation always uses mm")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["label", "bbox", "prim_path", "semantic_id", "transform"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""
|
|
50
|
+
Returns the JSON representation of the model using alias
|
|
51
|
+
|
|
52
|
+
Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
|
|
53
|
+
It is unable to resolve nested types generated by openapi-generator.
|
|
54
|
+
"""
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of BoundingBox3D from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of BoundingBox3D from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"label": obj.get("label"),
|
|
93
|
+
"bbox": obj.get("bbox"),
|
|
94
|
+
"prim_path": obj.get("prim_path"),
|
|
95
|
+
"semantic_id": obj.get("semantic_id"),
|
|
96
|
+
"transform": obj.get("transform")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,119 @@
|
|
|
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 __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class Box(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Box
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
shape_type: Optional[StrictStr] = 'box'
|
|
30
|
+
size_x: Union[StrictFloat, StrictInt] = Field(description="Size in x direction [mm]")
|
|
31
|
+
size_y: Union[StrictFloat, StrictInt] = Field(description="Size in y direction [mm]")
|
|
32
|
+
size_z: Union[StrictFloat, StrictInt] = Field(description="Size in z direction [mm]")
|
|
33
|
+
box_type: Optional[StrictStr] = 'FULL'
|
|
34
|
+
__properties: ClassVar[List[str]] = ["shape_type", "size_x", "size_y", "size_z", "box_type"]
|
|
35
|
+
|
|
36
|
+
@field_validator('shape_type')
|
|
37
|
+
def shape_type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value is None:
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
if value not in set(['box']):
|
|
43
|
+
raise ValueError("must be one of enum values ('box')")
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
@field_validator('box_type')
|
|
47
|
+
def box_type_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if value not in set(['FULL']):
|
|
53
|
+
raise ValueError("must be one of enum values ('FULL')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
model_config = ConfigDict(
|
|
57
|
+
populate_by_name=True,
|
|
58
|
+
validate_assignment=True,
|
|
59
|
+
protected_namespaces=(),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def to_str(self) -> str:
|
|
64
|
+
"""Returns the string representation of the model using alias"""
|
|
65
|
+
return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
|
|
66
|
+
|
|
67
|
+
def to_json(self) -> str:
|
|
68
|
+
"""
|
|
69
|
+
Returns the JSON representation of the model using alias
|
|
70
|
+
|
|
71
|
+
Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
|
|
72
|
+
It is unable to resolve nested types generated by openapi-generator.
|
|
73
|
+
"""
|
|
74
|
+
return json.dumps(self.to_dict())
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
78
|
+
"""Create an instance of Box from a JSON string"""
|
|
79
|
+
return cls.from_dict(json.loads(json_str))
|
|
80
|
+
|
|
81
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
82
|
+
"""Return the dictionary representation of the model using alias.
|
|
83
|
+
|
|
84
|
+
This has the following differences from calling pydantic's
|
|
85
|
+
`self.model_dump(by_alias=True)`:
|
|
86
|
+
|
|
87
|
+
* `None` is only added to the output dict for nullable fields that
|
|
88
|
+
were set at model initialization. Other fields with value `None`
|
|
89
|
+
are ignored.
|
|
90
|
+
"""
|
|
91
|
+
excluded_fields: Set[str] = set([
|
|
92
|
+
])
|
|
93
|
+
|
|
94
|
+
_dict = self.model_dump(
|
|
95
|
+
by_alias=True,
|
|
96
|
+
exclude=excluded_fields,
|
|
97
|
+
exclude_none=True,
|
|
98
|
+
)
|
|
99
|
+
return _dict
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
103
|
+
"""Create an instance of Box from a dict"""
|
|
104
|
+
if obj is None:
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
if not isinstance(obj, dict):
|
|
108
|
+
return cls.model_validate(obj)
|
|
109
|
+
|
|
110
|
+
_obj = cls.model_validate({
|
|
111
|
+
"shape_type": obj.get("shape_type") if obj.get("shape_type") is not None else 'box',
|
|
112
|
+
"size_x": obj.get("size_x"),
|
|
113
|
+
"size_y": obj.get("size_y"),
|
|
114
|
+
"size_z": obj.get("size_z"),
|
|
115
|
+
"box_type": obj.get("box_type") if obj.get("box_type") is not None else 'FULL'
|
|
116
|
+
})
|
|
117
|
+
return _obj
|
|
118
|
+
|
|
119
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
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 __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from typing_extensions import Annotated
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class BoxSweepParameters(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
BoxSweepParameters
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
sweep_type: StrictStr
|
|
31
|
+
half_extent: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=3, max_length=3)]] = Field(default=None, description="Half extent of the box [stage_units]")
|
|
32
|
+
sphere_radius: Optional[Union[StrictFloat, StrictInt]] = 0.5
|
|
33
|
+
position: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=3, max_length=3)]] = Field(default=None, description="Position of the box sweep [stage_units]")
|
|
34
|
+
rotation: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=4, max_length=4)]] = Field(default=None, description="Rotation of the box sweep in quaternion format")
|
|
35
|
+
direction: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=3, max_length=3)]] = Field(default=None, description="Direction of the box sweep")
|
|
36
|
+
max_distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.0, description="Sweep distance [stage_units]")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["sweep_type", "half_extent", "sphere_radius", "position", "rotation", "direction", "max_distance"]
|
|
38
|
+
|
|
39
|
+
@field_validator('sweep_type')
|
|
40
|
+
def sweep_type_validate_enum(cls, value):
|
|
41
|
+
"""Validates the enum"""
|
|
42
|
+
if value not in set(['box']):
|
|
43
|
+
raise ValueError("must be one of enum values ('box')")
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
model_config = ConfigDict(
|
|
47
|
+
populate_by_name=True,
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def to_str(self) -> str:
|
|
54
|
+
"""Returns the string representation of the model using alias"""
|
|
55
|
+
return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
|
|
56
|
+
|
|
57
|
+
def to_json(self) -> str:
|
|
58
|
+
"""
|
|
59
|
+
Returns the JSON representation of the model using alias
|
|
60
|
+
|
|
61
|
+
Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
|
|
62
|
+
It is unable to resolve nested types generated by openapi-generator.
|
|
63
|
+
"""
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
+
"""Create an instance of BoxSweepParameters from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
|
73
|
+
|
|
74
|
+
This has the following differences from calling pydantic's
|
|
75
|
+
`self.model_dump(by_alias=True)`:
|
|
76
|
+
|
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
|
78
|
+
were set at model initialization. Other fields with value `None`
|
|
79
|
+
are ignored.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
])
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of BoxSweepParameters from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"sweep_type": obj.get("sweep_type"),
|
|
102
|
+
"half_extent": obj.get("half_extent"),
|
|
103
|
+
"sphere_radius": obj.get("sphere_radius") if obj.get("sphere_radius") is not None else 0.5,
|
|
104
|
+
"position": obj.get("position"),
|
|
105
|
+
"rotation": obj.get("rotation"),
|
|
106
|
+
"direction": obj.get("direction"),
|
|
107
|
+
"max_distance": obj.get("max_distance") if obj.get("max_distance") is not None else 0.0
|
|
108
|
+
})
|
|
109
|
+
return _obj
|
|
110
|
+
|
|
111
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
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 __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class Capsule(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Capsule
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
shape_type: Optional[StrictStr] = 'capsule'
|
|
30
|
+
radius: Union[StrictFloat, StrictInt] = Field(description="Radius of the capsule [mm]")
|
|
31
|
+
height: Union[StrictFloat, StrictInt] = Field(description="Height of the capsule [mm]")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["shape_type", "radius", "height"]
|
|
33
|
+
|
|
34
|
+
@field_validator('shape_type')
|
|
35
|
+
def shape_type_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if value not in set(['capsule']):
|
|
41
|
+
raise ValueError("must be one of enum values ('capsule')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""
|
|
57
|
+
Returns the JSON representation of the model using alias
|
|
58
|
+
|
|
59
|
+
Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
|
|
60
|
+
It is unable to resolve nested types generated by openapi-generator.
|
|
61
|
+
"""
|
|
62
|
+
return json.dumps(self.to_dict())
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
+
"""Create an instance of Capsule from a JSON string"""
|
|
67
|
+
return cls.from_dict(json.loads(json_str))
|
|
68
|
+
|
|
69
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
70
|
+
"""Return the dictionary representation of the model using alias.
|
|
71
|
+
|
|
72
|
+
This has the following differences from calling pydantic's
|
|
73
|
+
`self.model_dump(by_alias=True)`:
|
|
74
|
+
|
|
75
|
+
* `None` is only added to the output dict for nullable fields that
|
|
76
|
+
were set at model initialization. Other fields with value `None`
|
|
77
|
+
are ignored.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set([
|
|
80
|
+
])
|
|
81
|
+
|
|
82
|
+
_dict = self.model_dump(
|
|
83
|
+
by_alias=True,
|
|
84
|
+
exclude=excluded_fields,
|
|
85
|
+
exclude_none=True,
|
|
86
|
+
)
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of Capsule from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate({
|
|
99
|
+
"shape_type": obj.get("shape_type") if obj.get("shape_type") is not None else 'capsule',
|
|
100
|
+
"radius": obj.get("radius"),
|
|
101
|
+
"height": obj.get("height")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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 __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from wandelbots_isaacsim_api.models.pose import Pose
|
|
23
|
+
from wandelbots_isaacsim_api.models.shape import Shape
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class Collider(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Collider
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
shape: Shape
|
|
32
|
+
pose: Pose
|
|
33
|
+
__properties: ClassVar[List[str]] = ["shape", "pose"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True, exclude_none=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""
|
|
48
|
+
Returns the JSON representation of the model using alias
|
|
49
|
+
|
|
50
|
+
Do not use pydantic v2 .model_dump_json(by_alias=True, exclude_unset=True) here!
|
|
51
|
+
It is unable to resolve nested types generated by openapi-generator.
|
|
52
|
+
"""
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of Collider from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of shape
|
|
79
|
+
if self.shape:
|
|
80
|
+
_dict['shape'] = self.shape.to_dict()
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of pose
|
|
82
|
+
if self.pose:
|
|
83
|
+
_dict['pose'] = self.pose.to_dict()
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of Collider from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"shape": Shape.from_dict(obj["shape"]) if obj.get("shape") is not None else None,
|
|
97
|
+
"pose": Pose.from_dict(obj["pose"]) if obj.get("pose") is not None else None
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|