@@ -21,7 +21,9 @@ __all__ = [
2121 "IdentityRotMatrix" ,
2222 "IdentityRotQuatVec" ,
2323 "IdentityTranslation" ,
24+ "Pin" ,
2425 "Pose" ,
26+ "RL" ,
2527 "RPY" ,
2628 "Robot" ,
2729 "RobotConfig" ,
@@ -62,11 +64,13 @@ class GripperState:
6264 pass
6365
6466class IK :
65- def __init__ (self , urdf_path : str , max_duration_ms : int = 300 ) -> None : ...
66- def forward (self , q0 : numpy .ndarray [M , numpy .dtype [numpy .float64 ]], tcp_offset : Pose = ...) -> Pose : ...
67+ def forward (self , q0 : numpy .ndarray [tuple [M ], numpy .dtype [numpy .float64 ]], tcp_offset : Pose = ...) -> Pose : ...
6768 def ik (
68- self , pose : Pose , q0 : numpy .ndarray [M , numpy .dtype [numpy .float64 ]], tcp_offset : Pose = ...
69- ) -> numpy .ndarray [M , numpy .dtype [numpy .float64 ]] | None : ...
69+ self , pose : Pose , q0 : numpy .ndarray [tuple [M ], numpy .dtype [numpy .float64 ]], tcp_offset : Pose = ...
70+ ) -> numpy .ndarray [tuple [M ], numpy .dtype [numpy .float64 ]] | None : ...
71+
72+ class Pin (IK ):
73+ def __init__ (self , path : str , frame_id : str = "fr3_link8" , urdf : bool = True ) -> None : ...
7074
7175class Pose :
7276 def __getstate__ (self ) -> typing .Annotated [list [float ], pybind11_stubgen .typing_ext .FixedSize (16 )]: ...
@@ -80,26 +84,28 @@ class Pose:
8084 def __init__ (
8185 self ,
8286 rotation : numpy .ndarray [tuple [typing .Literal [3 ], typing .Literal [3 ]], numpy .dtype [numpy .float64 ]],
83- translation : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]],
87+ translation : numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]],
8488 ) -> None : ...
8589 @typing .overload
8690 def __init__ (
8791 self ,
88- quaternion : numpy .ndarray [typing .Literal [4 ], numpy .dtype [numpy .float64 ]],
89- translation : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]],
92+ quaternion : numpy .ndarray [tuple [ typing .Literal [4 ] ], numpy .dtype [numpy .float64 ]],
93+ translation : numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]],
9094 ) -> None : ...
9195 @typing .overload
92- def __init__ (self , rpy : RPY , translation : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]]) -> None : ...
96+ def __init__ (
97+ self , rpy : RPY , translation : numpy .ndarray [tuple [typing .Literal [3 ]], numpy .dtype [numpy .float64 ]]
98+ ) -> None : ...
9399 @typing .overload
94100 def __init__ (
95101 self ,
96- rpy_vector : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]],
97- translation : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]],
102+ rpy_vector : numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]],
103+ translation : numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]],
98104 ) -> None : ...
99105 @typing .overload
100- def __init__ (self , translation : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]]) -> None : ...
106+ def __init__ (self , translation : numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]]) -> None : ...
101107 @typing .overload
102- def __init__ (self , quaternion : numpy .ndarray [typing .Literal [4 ], numpy .dtype [numpy .float64 ]]) -> None : ...
108+ def __init__ (self , quaternion : numpy .ndarray [tuple [ typing .Literal [4 ] ], numpy .dtype [numpy .float64 ]]) -> None : ...
103109 @typing .overload
104110 def __init__ (self , rpy : RPY ) -> None : ...
105111 @typing .overload
@@ -118,11 +124,14 @@ class Pose:
118124 def limit_translation_length (self , max_length : float ) -> Pose : ...
119125 def pose_matrix (self ) -> numpy .ndarray [tuple [typing .Literal [4 ], typing .Literal [4 ]], numpy .dtype [numpy .float64 ]]: ...
120126 def rotation_m (self ) -> numpy .ndarray [tuple [typing .Literal [3 ], typing .Literal [3 ]], numpy .dtype [numpy .float64 ]]: ...
121- def rotation_q (self ) -> numpy .ndarray [typing .Literal [4 ], numpy .dtype [numpy .float64 ]]: ...
127+ def rotation_q (self ) -> numpy .ndarray [tuple [ typing .Literal [4 ] ], numpy .dtype [numpy .float64 ]]: ...
122128 def rotation_rpy (self ) -> RPY : ...
123129 def total_angle (self ) -> float : ...
124- def translation (self ) -> numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]]: ...
125- def xyzrpy (self ) -> numpy .ndarray [typing .Literal [6 ], numpy .dtype [numpy .float64 ]]: ...
130+ def translation (self ) -> numpy .ndarray [tuple [typing .Literal [3 ]], numpy .dtype [numpy .float64 ]]: ...
131+ def xyzrpy (self ) -> numpy .ndarray [tuple [typing .Literal [6 ]], numpy .dtype [numpy .float64 ]]: ...
132+
133+ class RL (IK ):
134+ def __init__ (self , urdf_path : str , max_duration_ms : int = 300 ) -> None : ...
126135
127136class RPY :
128137 pitch : float
@@ -133,11 +142,11 @@ class RPY:
133142 @typing .overload
134143 def __init__ (self , roll : float = 0.0 , pitch : float = 0.0 , yaw : float = 0.0 ) -> None : ...
135144 @typing .overload
136- def __init__ (self , rpy : numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]]) -> None : ...
145+ def __init__ (self , rpy : numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]]) -> None : ...
137146 def __setstate__ (self , arg0 : tuple ) -> None : ...
138147 def __str__ (self ) -> str : ...
139- def as_quaternion_vector (self ) -> numpy .ndarray [typing .Literal [4 ], numpy .dtype [numpy .float64 ]]: ...
140- def as_vector (self ) -> numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]]: ...
148+ def as_quaternion_vector (self ) -> numpy .ndarray [tuple [ typing .Literal [4 ] ], numpy .dtype [numpy .float64 ]]: ...
149+ def as_vector (self ) -> numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]]: ...
141150 def is_close (self , other : RPY , eps : float = 1e-08 ) -> bool : ...
142151 def rotation_matrix (
143152 self ,
@@ -147,13 +156,13 @@ class Robot:
147156 def get_base_pose_in_world_coordinates (self ) -> Pose : ...
148157 def get_cartesian_position (self ) -> Pose : ...
149158 def get_ik (self ) -> IK | None : ...
150- def get_joint_position (self ) -> numpy .ndarray [M , numpy .dtype [numpy .float64 ]]: ...
159+ def get_joint_position (self ) -> numpy .ndarray [tuple [ M ] , numpy .dtype [numpy .float64 ]]: ...
151160 def get_parameters (self ) -> RobotConfig : ...
152161 def get_state (self ) -> RobotState : ...
153162 def move_home (self ) -> None : ...
154163 def reset (self ) -> None : ...
155164 def set_cartesian_position (self , pose : Pose ) -> None : ...
156- def set_joint_position (self , q : numpy .ndarray [M , numpy .dtype [numpy .float64 ]]) -> None : ...
165+ def set_joint_position (self , q : numpy .ndarray [tuple [ M ] , numpy .dtype [numpy .float64 ]]) -> None : ...
157166 def to_pose_in_robot_coordinates (self , pose_in_world_coordinates : Pose ) -> Pose : ...
158167 def to_pose_in_world_coordinates (self , pose_in_robot_coordinates : Pose ) -> Pose : ...
159168
@@ -168,7 +177,7 @@ class RobotMetaConfig:
168177 @property
169178 def joint_limits (self ) -> numpy .ndarray [tuple [typing .Literal [2 ], N ], numpy .dtype [numpy .float64 ]]: ...
170179 @property
171- def q_home (self ) -> numpy .ndarray [M , numpy .dtype [numpy .float64 ]]: ...
180+ def q_home (self ) -> numpy .ndarray [tuple [ M ] , numpy .dtype [numpy .float64 ]]: ...
172181
173182class RobotPlatform :
174183 """
@@ -236,8 +245,8 @@ class RobotType:
236245
237246def FrankaHandTCPOffset () -> numpy .ndarray [tuple [typing .Literal [4 ], typing .Literal [4 ]], numpy .dtype [numpy .float64 ]]: ...
238247def IdentityRotMatrix () -> numpy .ndarray [tuple [typing .Literal [3 ], typing .Literal [3 ]], numpy .dtype [numpy .float64 ]]: ...
239- def IdentityRotQuatVec () -> numpy .ndarray [typing .Literal [4 ], numpy .dtype [numpy .float64 ]]: ...
240- def IdentityTranslation () -> numpy .ndarray [typing .Literal [3 ], numpy .dtype [numpy .float64 ]]: ...
248+ def IdentityRotQuatVec () -> numpy .ndarray [tuple [ typing .Literal [4 ] ], numpy .dtype [numpy .float64 ]]: ...
249+ def IdentityTranslation () -> numpy .ndarray [tuple [ typing .Literal [3 ] ], numpy .dtype [numpy .float64 ]]: ...
241250def _bootstrap_egl (fn_addr : int , display : int , context : int ) -> None : ...
242251def robots_meta_config (robot_type : RobotType ) -> RobotMetaConfig : ...
243252
0 commit comments