+
    nDj2                        ^ RI Ht ^ RIt^ RIHt ^ RIHtHtHtH	t	 ]'       d)   ^ RI
Ht ^ RIHt ^ RIt^RIHt ^RIHt ^R	IHt ^R
IHt . ROt ! R R4      t ! R R4      t ! R R4      t ! R R4      tR# )    )annotationsN)TYPE_CHECKING)_UrdfJointInternal_UrdfLinkInternal_UrdfMimicInternal_UrdfTreeInternal)Sequence)PathTransform3D)ComponentColumnListLazyChunkStream)RecordingStream	UrdfJointUrdfLink	UrdfMimicUrdfTreec                  t    ] tR t^tRtR R lt]R R l4       t]R R l4       t]R R	 l4       t	R
 R lt
RtR# )r   z
A URDF `<mimic>` tag specification.

A mimic joint's value is derived from a driver joint as
`value = multiplier * driver_value + offset`.
c                    V ^8  d   QhRRRR/# )   innerr   returnNone )formats   "N/data/cameron/venvs/s3viz/lib/python3.14/site-packages/rerun_sdk/rerun/urdf.py__annotate__UrdfMimic.__annotate__         0 T     c                	    Wn         R # N_innerselfr   s   &&r   __init__UrdfMimic.__init__       r!   c                   V ^8  d   QhRR/# r   r   strr   )r   s   "r   r   r   "   s     ! !s !r!   c                .    V P                   P                  # )zName of the driver joint.)r%   jointr'   s   &r   r/   UrdfMimic.joint!   s     {{   r!   c                   V ^8  d   QhRR/# r   r   floatr   )r   s   "r   r   r   '   s     & &E &r!   c                .    V P                   P                  # )zCMultiplier applied to the driver joint's value (defaults to `1.0`).)r%   
multiplierr0   s   &r   r6   UrdfMimic.multiplier&        {{%%%r!   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   r   ,   s     " " "r!   c                .    V P                   P                  # )zLOffset added after multiplying the driver joint's value (defaults to `0.0`).)r%   offsetr0   s   &r   r;   UrdfMimic.offset+   s     {{!!!r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r   0        & &# &r!   c                	6    V P                   P                  4       # r#   r%   __repr__r0   s   &r   rA   UrdfMimic.__repr__0       {{##%%r!   r$   N)__name__
__module____qualname____firstlineno____doc__r(   propertyr/   r6   r;   rA   __static_attributes__r   r!   r   r   r      sR     ! ! & & " "& &r!   c                  ^   ] tR t^4tRtR R lt]R R l4       t]R R l4       t]R R	 l4       t	]R
 R l4       t
]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       tR&R R lltRR/R  R! lltR" R# ltR$tR%# )'r   z7A URDF joint with properties and transform computation.c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   UrdfJoint.__annotate__7   r    r!   c                	    Wn         R # r#   r$   r&   s   &&r   r(   UrdfJoint.__init__7   r*   r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   rM   ;           c  r!   c                .    V P                   P                  # )zName of the joint.r%   namer0   s   &r   rT   UrdfJoint.name:        {{r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   rM   @        & &C &r!   c                .    V P                   P                  # )zAType of the joint (revolute, continuous, prismatic, fixed, etc.).)r%   
joint_typer0   s   &r   rZ   UrdfJoint.joint_type?   r8   r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   rM   E   s     ' 'S 'r!   c                .    V P                   P                  # )zName of the parent link.)r%   parent_linkr0   s   &r   r^   UrdfJoint.parent_linkD        {{&&&r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   rM   J   rX   r!   c                .    V P                   P                  # )zName of the child link.)r%   
child_linkr0   s   &r   rc   UrdfJoint.child_linkI   r8   r!   c                   V ^8  d   QhRR/# r   r   ztuple[float, float, float]r   )r   s   "r   r   rM   O   s        0  r!   c                .    V P                   P                  # )zAxis of the joint.)r%   axisr0   s   &r   rh   UrdfJoint.axisN   rV   r!   c                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   rM   T        & &6 &r!   c                .    V P                   P                  # )z"Origin of the joint (translation).)r%   
origin_xyzr0   s   &r   rm   UrdfJoint.origin_xyzS   r8   r!   c                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   rM   Y   rk   r!   c                .    V P                   P                  # )z3Origin of the joint (rotation in roll, pitch, yaw).)r%   
origin_rpyr0   s   &r   rq   UrdfJoint.origin_rpyX   r8   r!   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   rM   ^        ' 'U 'r!   c                .    V P                   P                  # )zLower limit of the joint.)r%   limit_lowerr0   s   &r   rv   UrdfJoint.limit_lower]   r`   r!   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   rM   c   rt   r!   c                .    V P                   P                  # )zUpper limit of the joint.)r%   limit_upperr0   s   &r   rz   UrdfJoint.limit_upperb   r`   r!   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   rM   h   s     ( (e (r!   c                .    V P                   P                  # )zEffort limit of the joint.)r%   limit_effortr0   s   &r   r~   UrdfJoint.limit_effortg        {{'''r!   c                   V ^8  d   QhRR/# r3   r   )r   s   "r   r   rM   m   s     * * *r!   c                .    V P                   P                  # )zVelocity limit of the joint.)r%   limit_velocityr0   s   &r   r   UrdfJoint.limit_velocityl   s     {{)))r!   c                   V ^8  d   QhRR/# )r   r   zUrdfMimic | Noner   )r   s   "r   r   rM   r   s     ? ?' ?r!   c                P    V P                   P                  pVe   \        V4      # R# )zFMimic-tag specification, or `None` if this joint is not a mimic joint.N)r%   mimicr   r&   s   & r   r   UrdfJoint.mimicq   s(     !!#(#4y>$>r!   Tc               $    V ^8  d   QhRRRRRR/# )r   valuer4   clampboolr   r   r   )r   s   "r   r   rM   w   s!     
 
u 
T 
[ 
r!   c                   ^RI Hp ^RIHp V P                  P                  WR7      pVR,          e%   \        P                  ! VR,          \        ^R7       V! V! VR,          R7      VR,          VR	,          VR
,          R7      # )a  
Compute a Transform3D for this joint at the given value.

Parameters
----------
value:
    Joint angle in radians (revolute/continuous) or distance in meters (prismatic).
    Ignored for fixed joints. Values outside limits are clamped with a warning if `clamp` is True.
clamp:
    Whether to clamp & warn about values outside joint limits.

Returns
-------
Transform3D
    Transform with rotation, translation, parent_frame, and child_frame ready to log.

r   )
Quaternionr   warning
stacklevelquaternion_xyzw)xyzwtranslationparent_framechild_frame)
quaternionr   r   r   )	 r   	datatypesr   r%   compute_transformwarningswarnUserWarning)r'   r   r   r   r   results   &&&   r   r   UrdfJoint.compute_transformw   st    $ 	")..u.B)(MM&+[QG!v.?'@A}-/}-	
 	
r!   r   c               $    V ^8  d   QhRRRRRR/# )r   valueszSequence[float]r   r   r   r   r   )r   s   "r   r   rM      s"     
 
 
4 
[n 
r!   c          	     \   ^RI Hp V P                  P                  \	        V4      VR7      pVR,           F   p\
        P                  ! V\        ^R7       K"  	  VP                  ! VR,          VR,          VR,          .\        V4      ,          VR,          .\        V4      ,          R	7      # )
a  
Compute transforms for this joint at multiple values, returning columnar data for use with `send_columns`.

Parameters
----------
values:
    Joint values: angles in radians (revolute/continuous) or distances in meters (prismatic).
    Values outside limits are clamped with a warning if `clamp` is True.
clamp:
    Whether to clamp & warn about values outside joint limits.

Returns
-------
ComponentColumnList
    Columnar transform data ready for use with [`rerun.send_columns`][].

r   r   r   r   translationsquaternions_xyzwr   r   )r   r   r   r   )
r   r   r%   compute_transform_columnslistr   r   r   columnslen)r'   r   r   r   r   r   s   &&$   r   r   #UrdfJoint.compute_transform_columns   s    $ 	"66tF|56Qj))GMM';1= * ""~.01 01CK?./#f+=	
 	
r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   rM      r>   r!   c                	6    V P                   P                  4       # r#   r@   r0   s   &r   rA   UrdfJoint.__repr__   rC   r!   r$   N)T)rD   rE   rF   rG   rH   r(   rI   rT   rZ   r^   rc   rh   rm   rq   rv   rz   r~   r   r   r   r   rA   rJ   r   r!   r   r   r   4   s   A     & & ' ' & &     & & & & ' ' ' ' ( ( * * ? ?

B
RV 
@& &r!   c                  H    ] tR t^tRtR R lt]R R l4       tR R ltRt	R	# )
r   zA URDF link.c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   UrdfLink.__annotate__         / D r!   c                	    Wn         R # r#   r$   r&   s   &&r   r(   UrdfLink.__init__   r*   r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r      rQ   r!   c                .    V P                   P                  # )zName of the link.rS   r0   s   &r   rT   UrdfLink.name   rV   r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r      r>   r!   c                	6    V P                   P                  4       # r#   r@   r0   s   &r   rA   UrdfLink.__repr__   rC   r!   r$   N)
rD   rE   rF   rG   rH   r(   rI   rT   rA   rJ   r   r!   r   r   r      s(        & &r!   c                     ] tR t^tRtR R lt]R(RRRR/R R lll4       t]R	 R
 l4       t	]R R l4       t
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR(R R lltRR/R R  lltR!R"/R# R$ lltR% R& ltR'tR# ))r   ad  
A URDF robot model with joints and links.

Use [`log_urdf_to_recording`][rerun.urdf.UrdfTree.log_urdf_to_recording] to log the full model (geometry + static transforms), then animate
individual joints by logging [`archetypes.Transform3D`][rerun.archetypes.Transform3D] computed via
[`UrdfJoint.compute_transform`][rerun.urdf.UrdfJoint.compute_transform].
c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   UrdfTree.__annotate__   r   r!   c                	    Wn         R # r#   r$   r&   s   &&r   r(   UrdfTree.__init__   r*   r!   Nframe_prefixstatic_transform_entity_pathc          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   pathz
str | Pathentity_path_prefix
str | Noner   r   r   r   r   )r   s   "r   r   r      s:      
  
 
& 
 !	 

 '1 
 
 
r!   c          	     H    \        \        P                  ! V VVVR7      4      # )a  
Load a URDF file from the given path.

Parameters
----------
path:
    Path to the URDF file.
entity_path_prefix:
    Optional entity path prefix.
frame_prefix:
    Optional prefix for all frame IDs.
    Use to load the same URDF multiple times with unique frames.
static_transform_entity_path:
    Optional entity path to use when logging static transforms.
    If omitted, defaults to `/tf_static`.
    This path is not affected by `entity_path_prefix`.

)r   r   )r   r   from_file_path)r   r   r   r   s   &&$$r   r   UrdfTree.from_file_path   s+    4 ,,")-I	
 	
r!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r      rQ   r!   c                .    V P                   P                  # )z'Name of the robot defined in this URDF.rS   r0   s   &r   rT   UrdfTree.name   rV   r!   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r      s     ( (j (r!   c                .    V P                   P                  # )zThe frame prefix, if set.)r%   r   r0   s   &r   r   UrdfTree.frame_prefix   r   r!   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r     s     1 18 1r!   c                H    \        V P                  P                  4       4      # )zGet the root link of the URDF.)r   r%   	root_linkr0   s   &r   r   UrdfTree.root_link  s    --/00r!   c                   V ^8  d   QhRR/# )r   r   zlist[UrdfJoint]r   )r   s   "r   r   r     s     < < <r!   c                r    V P                   P                  4        Uu. uF  p\        V4      NK  	  up# u upi )zGet all joints in the URDF.)r%   jointsr   )r'   js   & r   r   UrdfTree.joints  s-    &*kk&8&8&:;&:	!&:;;;s   4c                    V ^8  d   QhRRRR/# )r   
joint_namer-   r   zUrdfJoint | Noner   )r   s   "r   r   r     s     3 3C 34D 3r!   c                b    V P                   P                  V4      pV'       d   \        V4      # R# )zQ
Get a joint by name.

Parameters
----------
joint_name:
    Name of the joint.

N)r%   get_joint_by_namer   )r'   r   r   s   && r   r   UrdfTree.get_joint_by_name  s*     --j9#(y2d2r!   c                    V ^8  d   QhRRRR/# )r   r/   r   r   r   r   )r   s   "r   r   r     s     
C 
CY 
C8 
Cr!   c                ^    \        V P                  P                  VP                  4      4      # )zk
Get the child link of a joint.

Parameters
----------
joint:
    The joint whose child link to retrieve.

)r   r%   get_joint_child)r'   r/   s   &&r   r   UrdfTree.get_joint_child  s"     33ELLABBr!   c                    V ^8  d   QhRRRR/# )r   	link_namer-   r   zUrdfLink | Noner   )r   s   "r   r   r   %  s     2 2# 2/ 2r!   c                b    V P                   P                  V4      pV'       d   \        V4      # R# )zN
Get a link by name.

Parameters
----------
link_name:
    Name of the link.

N)r%   get_link_by_namer   )r'   r   r   s   && r   r   UrdfTree.get_link_by_name%  s)     ,,Y7"'x1T1r!   c                    V ^8  d   QhRRRR/# r   linkzstr | UrdfLinkr   z	list[str]r   )r   s   "r   r   r   2  s     < <n < <r!   c                    \        V\        4      '       d#   V P                  P                  V4      pVf   . # MVP                  pV P                  P	                  V4      # )z
Get the entity paths for all visual geometries of the given link, if any.

Parameters
----------
link:
    The link for which to get visual geometry paths,
    either by name or as an UrdfLink instance.

)
isinstancer-   r%   r   get_visual_geometry_pathsr'   r   r   s   && r   r   "UrdfTree.get_visual_geometry_paths2  sT     dC  KK006E}	  KKE{{44U;;r!   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r   E  s     ? ? ?I ?r!   c                    \        V\        4      '       d#   V P                  P                  V4      pVf   . # MVP                  pV P                  P	                  V4      # )z
Get the entity paths for all collision geometries of the given link, if any.

Parameters
----------
link:
    The link for which to retrieve the collision geometry entity paths,
    either by name or as an UrdfLink instance.

)r   r-   r%   r   get_collision_geometry_pathsr   s   && r   r   %UrdfTree.get_collision_geometry_pathsE  sT     dC  KK006E}	  KKE{{77>>r!   c                    V ^8  d   QhRRRR/# )r   	recordingzRecordingStream | Noner   r   r   )r   s   "r   r   r   X  s      R R/E RQU Rr!   c                p    V P                   P                  Ve   VP                  4       4       R# R4       R# )a  
Log the full robot model (geometry + static transforms) to a recording stream.

This can be used as alternative to [`rerun.log_file_from_path`][] for URDF files,
especially in cases where you need the extra configuration options of `UrdfTree`
(e.g. `frame_prefix` for multi-robot setups).

Parameters
----------
recording:
    The recording stream to log to. If `None`, the current active recording is used.

N)r%   log	to_native)r'   r   s   &&r   log_urdf_to_recordingUrdfTree.log_urdf_to_recordingX  s'     	1F	++-QDQr!   include_joint_transformsTc                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r   r   h  s     f f$ f/ fr!   c               R    ^RI Hp V! V P                  P                  VR7      4      # )a+  
Return a lazy stream over chunks emitted from this URDF tree.

!!! warning
    This method is experimental and returns the experimental
    `rerun.experimental.LazyChunkStream` API.

Parameters
----------
include_joint_transforms:
    Whether to include the static joint transforms from the URDF.

r   )r   )experimentalr   r%   stream)r'   r   r   s   &$ r   r   UrdfTree.streamh  s%     	2t{{11Kc1deer!   r   Fc               (    V ^8  d   QhRRRRRRRR/# )r   nameszpa.Arrayr   r   r   r   r   )r   s   "r   r   r   z  s8     "W "W"W "W
 "W 
"Wr!   c               <    V P                   P                  WVR7      # )a.  
Compute batches of 3D transform components from Arrow list arrays containing joint names and values.

`names` must be a `ListArray` with `Utf8` values.
`values` must be a `ListArray` with values castable to `Float64`.

The output is a `ListArray` with `translation`, `quaternion`, `parent_frame`, and
`child_frame` fields and the same outer row count as the inputs.

Note: this is intended as a helper for lens pipelines, where you would usually pipe this output
through an additional lens that scatters each batch into final `Transform3D` component rows.

Parameters
----------
names:
    Joint names for each row.
values:
    Joint values for each row.
clamp:
    Whether to clamp & warn about values outside joint limits.

Returns
-------
pa.Array
    Transform batches with one outer row for each input row.

r   )r%   compute_joint_transform_batches)r'   r   r   r   s   &&&$r   r  (UrdfTree.compute_joint_transform_batchesz  s     D {{::5PU:VVr!   c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r     r>   r!   c                	6    V P                   P                  4       # r#   r@   r0   s   &r   rA   UrdfTree.__repr__  rC   r!   r$   r#   )rD   rE   rF   rG   rH   r(   staticmethodr   rI   rT   r   r   r   r   r   r   r   r   r   r   r  rA   rJ   r   r!   r   r   r      s      
 $(	 

 48 
  
D     ( (1<3
C2<&?&R f f$"W
 "WH& &r!   )r   r   r   r   )
__future__r   r   typingr   rerun_bindingsr   r   r   r   collections.abcr	   pathlibr
   pyarrowpar   r   _baseclassesr   r   r   recording_streamr   __all__r   r   r   r   r   r!   r   <module>r     s^    "    g g(1-1
<& &<E& E&P& &T& T&r!   