-
Notifications
You must be signed in to change notification settings - Fork 4
/
optik.pyi
42 lines (38 loc) · 1.2 KB
/
optik.pyi
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
from typing import Literal
import numpy as np
import numpy.typing as npt
VectorXd = list[float] | npt.NDArray[np.float64]
MatrixXd = list[list[float]] | npt.NDArray[np.float64]
class SolverConfig:
def __init__(
self,
solution_mode: Literal["speed", "quality"] = ...,
max_time: float = ...,
max_restarts: int = ...,
tol_f: float = ...,
tol_df: float = ...,
tol_dx: float = ...,
linear_weight: VectorXd = ...,
angular_weight: VectorXd = ...,
): ...
class Robot:
@staticmethod
def from_urdf_file(path: str, base_link: str, ee_link: str) -> Robot: ...
def set_parallelism(self, n: int) -> None: ...
def num_positions(self) -> int: ...
def joint_limits(self) -> tuple[list[float], list[float]]: ...
def joint_jacobian(
self,
x: VectorXd,
ee_offset: MatrixXd | None = ...,
) -> list[list[float]]: ...
def fk(
self, x: VectorXd, ee_offset: MatrixXd | None = ...
) -> list[list[float]]: ...
def ik(
self,
config: SolverConfig,
target: MatrixXd,
x0: VectorXd,
ee_offset: MatrixXd | None = ...,
) -> tuple[list[float], float] | None: ...