-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcommon.pyi
More file actions
241 lines (217 loc) · 8.98 KB
/
common.pyi
File metadata and controls
241 lines (217 loc) · 8.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# ATTENTION: auto generated from C++ code, use `make stubgen` to update!
"""
common module
"""
from __future__ import annotations
import typing
import numpy
import pybind11_stubgen.typing_ext
__all__ = [
"BaseCameraConfig",
"FR3",
"FrankaHandTCPOffset",
"Gripper",
"GripperConfig",
"GripperState",
"HARDWARE",
"IK",
"IdentityRotMatrix",
"IdentityRotQuatVec",
"IdentityTranslation",
"Pose",
"RPY",
"Robot",
"RobotConfig",
"RobotMetaConfig",
"RobotPlatform",
"RobotState",
"RobotType",
"SIMULATION",
"UR5e",
"robots_meta_config",
]
M = typing.TypeVar("M", bound=int)
N = typing.TypeVar("N", bound=int)
class BaseCameraConfig:
frame_rate: int
identifier: str
resolution_height: int
resolution_width: int
def __init__(self, identifier: str, frame_rate: int, resolution_width: int, resolution_height: int) -> None: ...
class Gripper:
def get_normalized_width(self) -> float: ...
def get_parameters(self) -> GripperConfig: ...
def get_state(self) -> GripperState: ...
def grasp(self) -> None: ...
def is_grasped(self) -> bool: ...
def open(self) -> None: ...
def reset(self) -> None: ...
def set_normalized_width(self, width: float, force: float = 0) -> None: ...
def shut(self) -> None: ...
class GripperConfig:
pass
class GripperState:
pass
class IK:
def __init__(self, urdf_path: str, max_duration_ms: int = 300) -> None: ...
def ik(
self, pose: Pose, q0: numpy.ndarray[M, numpy.dtype[numpy.float64]], tcp_offset: Pose = ...
) -> numpy.ndarray[M, numpy.dtype[numpy.float64]] | None: ...
class Pose:
def __getstate__(self) -> typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(16)]: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(
self, pose_matrix: numpy.ndarray[tuple[typing.Literal[4], typing.Literal[4]], numpy.dtype[numpy.float64]]
) -> None: ...
@typing.overload
def __init__(
self,
rotation: numpy.ndarray[tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.float64]],
translation: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]],
) -> None: ...
@typing.overload
def __init__(
self,
quaternion: numpy.ndarray[typing.Literal[4], numpy.dtype[numpy.float64]],
translation: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]],
) -> None: ...
@typing.overload
def __init__(self, rpy: RPY, translation: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]]) -> None: ...
@typing.overload
def __init__(
self,
rpy_vector: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]],
translation: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]],
) -> None: ...
@typing.overload
def __init__(self, translation: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]]) -> None: ...
@typing.overload
def __init__(self, quaternion: numpy.ndarray[typing.Literal[4], numpy.dtype[numpy.float64]]) -> None: ...
@typing.overload
def __init__(self, rpy: RPY) -> None: ...
@typing.overload
def __init__(
self, rotation: numpy.ndarray[tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.float64]]
) -> None: ...
@typing.overload
def __init__(self, pose: Pose) -> None: ...
def __mul__(self, arg0: Pose) -> Pose: ...
def __setstate__(self, arg0: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(16)]) -> None: ...
def __str__(self) -> str: ...
def interpolate(self, dest_pose: Pose, progress: float) -> Pose: ...
def inverse(self) -> Pose: ...
def is_close(self, other: Pose, eps_r: float = 1e-08, eps_t: float = 1e-08) -> bool: ...
def limit_rotation_angle(self, max_angle: float) -> Pose: ...
def limit_translation_length(self, max_length: float) -> Pose: ...
def pose_matrix(self) -> numpy.ndarray[tuple[typing.Literal[4], typing.Literal[4]], numpy.dtype[numpy.float64]]: ...
def rotation_m(self) -> numpy.ndarray[tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.float64]]: ...
def rotation_q(self) -> numpy.ndarray[typing.Literal[4], numpy.dtype[numpy.float64]]: ...
def rotation_rpy(self) -> RPY: ...
def total_angle(self) -> float: ...
def translation(self) -> numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]]: ...
def xyzrpy(self) -> numpy.ndarray[typing.Literal[6], numpy.dtype[numpy.float64]]: ...
class RPY:
pitch: float
roll: float
yaw: float
def __add__(self, arg0: RPY) -> RPY: ...
def __getstate__(self) -> tuple: ...
@typing.overload
def __init__(self, roll: float = 0.0, pitch: float = 0.0, yaw: float = 0.0) -> None: ...
@typing.overload
def __init__(self, rpy: numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]]) -> None: ...
def __setstate__(self, arg0: tuple) -> None: ...
def __str__(self) -> str: ...
def as_quaternion_vector(self) -> numpy.ndarray[typing.Literal[4], numpy.dtype[numpy.float64]]: ...
def as_vector(self) -> numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]]: ...
def is_close(self, other: RPY, eps: float = 1e-08) -> bool: ...
def rotation_matrix(
self,
) -> numpy.ndarray[tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.float64]]: ...
class Robot:
def get_base_pose_in_world_coordinates(self) -> Pose: ...
def get_cartesian_position(self) -> Pose: ...
def get_ik(self) -> IK | None: ...
def get_joint_position(self) -> numpy.ndarray[M, numpy.dtype[numpy.float64]]: ...
def get_parameters(self) -> RobotConfig: ...
def get_state(self) -> RobotState: ...
def move_home(self) -> None: ...
def reset(self) -> None: ...
def set_cartesian_position(self, pose: Pose) -> None: ...
def set_joint_position(self, q: numpy.ndarray[M, numpy.dtype[numpy.float64]]) -> None: ...
def to_pose_in_robot_coordinates(self, pose_in_world_coordinates: Pose) -> Pose: ...
def to_pose_in_world_coordinates(self, pose_in_robot_coordinates: Pose) -> Pose: ...
class RobotConfig:
robot_platform: RobotPlatform
robot_type: RobotType
class RobotMetaConfig:
@property
def dof(self) -> int: ...
@property
def joint_limits(self) -> numpy.ndarray[tuple[typing.Literal[2], N], numpy.dtype[numpy.float64]]: ...
@property
def q_home(self) -> numpy.ndarray[M, numpy.dtype[numpy.float64]]: ...
class RobotPlatform:
"""
Members:
HARDWARE
SIMULATION
"""
HARDWARE: typing.ClassVar[RobotPlatform] # value = <RobotPlatform.HARDWARE: 1>
SIMULATION: typing.ClassVar[RobotPlatform] # value = <RobotPlatform.SIMULATION: 0>
__members__: typing.ClassVar[
dict[str, RobotPlatform]
] # value = {'HARDWARE': <RobotPlatform.HARDWARE: 1>, 'SIMULATION': <RobotPlatform.SIMULATION: 0>}
def __eq__(self, other: typing.Any) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __init__(self, value: int) -> None: ...
def __int__(self) -> int: ...
def __ne__(self, other: typing.Any) -> bool: ...
def __repr__(self) -> str: ...
def __setstate__(self, state: int) -> None: ...
def __str__(self) -> str: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
class RobotState:
pass
class RobotType:
"""
Members:
FR3
UR5e
"""
FR3: typing.ClassVar[RobotType] # value = <RobotType.FR3: 0>
UR5e: typing.ClassVar[RobotType] # value = <RobotType.UR5e: 1>
__members__: typing.ClassVar[
dict[str, RobotType]
] # value = {'FR3': <RobotType.FR3: 0>, 'UR5e': <RobotType.UR5e: 1>}
def __eq__(self, other: typing.Any) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __init__(self, value: int) -> None: ...
def __int__(self) -> int: ...
def __ne__(self, other: typing.Any) -> bool: ...
def __repr__(self) -> str: ...
def __setstate__(self, state: int) -> None: ...
def __str__(self) -> str: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...
def FrankaHandTCPOffset() -> numpy.ndarray[tuple[typing.Literal[4], typing.Literal[4]], numpy.dtype[numpy.float64]]: ...
def IdentityRotMatrix() -> numpy.ndarray[tuple[typing.Literal[3], typing.Literal[3]], numpy.dtype[numpy.float64]]: ...
def IdentityRotQuatVec() -> numpy.ndarray[typing.Literal[4], numpy.dtype[numpy.float64]]: ...
def IdentityTranslation() -> numpy.ndarray[typing.Literal[3], numpy.dtype[numpy.float64]]: ...
def _bootstrap_egl(fn_addr: int, display: int, context: int) -> None: ...
def robots_meta_config(robot_type: RobotType) -> RobotMetaConfig: ...
FR3: RobotType # value = <RobotType.FR3: 0>
HARDWARE: RobotPlatform # value = <RobotPlatform.HARDWARE: 1>
SIMULATION: RobotPlatform # value = <RobotPlatform.SIMULATION: 0>
UR5e: RobotType # value = <RobotType.UR5e: 1>