-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsim.pyi
More file actions
225 lines (200 loc) · 7.36 KB
/
sim.pyi
File metadata and controls
225 lines (200 loc) · 7.36 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
# ATTENTION: auto generated from C++ code, use `make stubgen` to update!
"""
sim module
"""
from __future__ import annotations
import typing
import numpy
import rcs._core.common
__all__: list[str] = [
"CameraType",
"FrameSet",
"GuiClient",
"Sim",
"SimCameraConfig",
"SimCameraSet",
"SimConfig",
"SimGripper",
"SimGripperConfig",
"SimGripperState",
"SimRobot",
"SimRobotConfig",
"SimRobotState",
"SimTilburgHand",
"SimTilburgHandConfig",
"SimTilburgHandState",
"default_free",
"fixed",
"free",
"tracking",
]
M = typing.TypeVar("M", bound=int)
class CameraType:
"""
Members:
free
tracking
fixed
default_free
"""
__members__: typing.ClassVar[
dict[str, CameraType]
] # value = {'free': <CameraType.free: 0>, 'tracking': <CameraType.tracking: 1>, 'fixed': <CameraType.fixed: 2>, 'default_free': <CameraType.default_free: 3>}
default_free: typing.ClassVar[CameraType] # value = <CameraType.default_free: 3>
fixed: typing.ClassVar[CameraType] # value = <CameraType.fixed: 2>
free: typing.ClassVar[CameraType] # value = <CameraType.free: 0>
tracking: typing.ClassVar[CameraType] # value = <CameraType.tracking: 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: ...
class FrameSet:
def __init__(self) -> None: ...
@property
def color_frames(self) -> dict[str, numpy.ndarray[tuple[M], numpy.dtype[numpy.uint8]]]: ...
@property
def depth_frames(self) -> dict[str, numpy.ndarray[tuple[M], numpy.dtype[numpy.float32]]]: ...
@property
def timestamp(self) -> float: ...
class GuiClient:
def __init__(self, id: str) -> None: ...
def get_model_bytes(self) -> bytes: ...
def set_model_and_data(self, arg0: int, arg1: int) -> None: ...
def sync(self) -> None: ...
class Sim:
def __init__(self, mjmdl: int, mjdata: int) -> None: ...
def _start_gui_server(self, id: str) -> None: ...
def _stop_gui_server(self) -> None: ...
def get_config(self) -> SimConfig: ...
def is_converged(self) -> bool: ...
def reset(self) -> None: ...
def set_config(self, cfg: SimConfig) -> bool: ...
def step(self, k: int) -> None: ...
def step_until_convergence(self) -> None: ...
class SimCameraConfig(rcs._core.common.BaseCameraConfig):
type: CameraType
def __init__(
self, identifier: str, frame_rate: int, resolution_width: int, resolution_height: int, type: CameraType = ...
) -> None: ...
class SimCameraSet:
def __init__(self, sim: Sim, cameras: dict[str, SimCameraConfig], render_on_demand: bool = True) -> None: ...
def buffer_size(self) -> int: ...
def clear_buffer(self) -> None: ...
def get_latest_frameset(self) -> FrameSet | None: ...
def get_timestamp_frameset(self, ts: float) -> FrameSet | None: ...
@property
def _sim(self) -> Sim: ...
class SimConfig:
async_control: bool
frequency: int
max_convergence_steps: int
realtime: bool
def __init__(self) -> None: ...
class SimGripper(rcs._core.common.Gripper):
def __init__(self, sim: Sim, cfg: SimGripperConfig) -> None: ...
def clear_collision_flag(self) -> None: ...
def get_config(self) -> SimGripperConfig: ...
def get_state(self) -> SimGripperState: ...
def set_config(self, cfg: SimGripperConfig) -> bool: ...
class SimGripperConfig(rcs._core.common.GripperConfig):
actuator: str
collision_geoms: list[str]
collision_geoms_fingers: list[str]
epsilon_inner: float
epsilon_outer: float
ignored_collision_geoms: list[str]
joints: list[str]
max_actuator_width: float
max_joint_width: float
min_actuator_width: float
min_joint_width: float
seconds_between_callbacks: float
def __init__(self) -> None: ...
def add_id(self, id: str) -> None: ...
class SimGripperState(rcs._core.common.GripperState):
def __init__(self) -> None: ...
@property
def collision(self) -> bool: ...
@property
def is_moving(self) -> bool: ...
@property
def last_commanded_width(self) -> float: ...
@property
def last_width(self) -> float: ...
class SimRobot(rcs._core.common.Robot):
def __init__(
self, sim: Sim, ik: rcs._core.common.Kinematics, cfg: SimRobotConfig, register_convergence_callback: bool = True
) -> None: ...
def clear_collision_flag(self) -> None: ...
def get_config(self) -> SimRobotConfig: ...
def get_state(self) -> SimRobotState: ...
def set_config(self, cfg: SimRobotConfig) -> bool: ...
def set_joints_hard(self, q: numpy.ndarray[tuple[M], numpy.dtype[numpy.float64]]) -> None: ...
class SimRobotConfig(rcs._core.common.RobotConfig):
actuators: list[str]
arm_collision_geoms: list[str]
base: str
joint_rotational_tolerance: float
joints: list[str]
mjcf_scene_path: str
seconds_between_callbacks: float
trajectory_trace: bool
def __init__(self) -> None: ...
def add_id(self, id: str) -> None: ...
class SimRobotState(rcs._core.common.RobotState):
def __init__(self) -> None: ...
@property
def collision(self) -> bool: ...
@property
def ik_success(self) -> bool: ...
@property
def inverse_tcp_offset(self) -> rcs._core.common.Pose: ...
@property
def is_arrived(self) -> bool: ...
@property
def is_moving(self) -> bool: ...
@property
def previous_angles(self) -> numpy.ndarray[tuple[M], numpy.dtype[numpy.float64]]: ...
@property
def target_angles(self) -> numpy.ndarray[tuple[M], numpy.dtype[numpy.float64]]: ...
class SimTilburgHand(rcs._core.common.Hand):
def __init__(self, sim: Sim, cfg: SimTilburgHandConfig) -> None: ...
def get_config(self) -> SimTilburgHandConfig: ...
def get_state(self) -> SimTilburgHandState: ...
def set_config(self, cfg: SimTilburgHandConfig) -> bool: ...
class SimTilburgHandConfig(rcs._core.common.HandConfig):
actuators: list[str]
collision_geoms: list[str]
collision_geoms_fingers: list[str]
grasp_type: rcs._core.common.GraspType
ignored_collision_geoms: list[str]
joints: list[str]
max_joint_position: numpy.ndarray[tuple[typing.Literal[16]], numpy.dtype[numpy.float64]]
min_joint_position: numpy.ndarray[tuple[typing.Literal[16]], numpy.dtype[numpy.float64]]
seconds_between_callbacks: float
def __init__(self) -> None: ...
def add_id(self, id: str) -> None: ...
class SimTilburgHandState(rcs._core.common.HandState):
def __init__(self) -> None: ...
@property
def collision(self) -> bool: ...
@property
def is_moving(self) -> bool: ...
@property
def last_commanded_qpos(self) -> numpy.ndarray[tuple[M], numpy.dtype[numpy.float64]]: ...
@property
def last_qpos(self) -> numpy.ndarray[tuple[M], numpy.dtype[numpy.float64]]: ...
default_free: CameraType # value = <CameraType.default_free: 3>
fixed: CameraType # value = <CameraType.fixed: 2>
free: CameraType # value = <CameraType.free: 0>
tracking: CameraType # value = <CameraType.tracking: 1>