
    Ed_                         d dl mZmZ d dlmZ d dlmZ d dlmZm	Z	m
Z
 d dlmZ d dlZg dZ G d d	e          Z G d
 de          Z G d de          ZdS )    )ABCabstractmethod)pi)Body)Vectordynamicsymbolscross)ReferenceFrameN)JointPinJointPrismaticJointc                      e Zd ZdZ	 	 	 ddZd Zd Zed             Zed             Z	ed             Z
ed	             Zed
             Zed             Zed             Zed             Zed             Zed             Zed             Zed             Zed             Zed             Zed             Zd Zd Zd Zd Zd Zd ZdS )r   u  Abstract base class for all specific joints.

    Explanation
    ===========

    A joint subtracts degrees of freedom from a body. This is the base class
    for all specific joints and holds all common methods acting as an interface
    for all joints. Custom joint can be created by inheriting Joint class and
    defining all abstract functions.

    The abstract methods are:

    - ``_generate_coordinates``
    - ``_generate_speeds``
    - ``_orient_frames``
    - ``_set_angular_velocity``
    - ``_set_linar_velocity``

    Parameters
    ==========

    name : string
        A unique name for the joint.
    parent : Body
        The parent body of joint.
    child : Body
        The child body of joint.
    coordinates: List of dynamicsymbols, optional
        Generalized coordinates of the joint.
    speeds : List of dynamicsymbols, optional
        Generalized speeds of joint.
    parent_joint_pos : Vector, optional
        Vector from the parent body's mass center to the point where the parent
        and child are connected. The default value is the zero vector.
    child_joint_pos : Vector, optional
        Vector from the child body's mass center to the point where the parent
        and child are connected. The default value is the zero vector.
    parent_axis : Vector, optional
        Axis fixed in the parent body which aligns with an axis fixed in the
        child body. The default is x axis in parent's reference frame.
    child_axis : Vector, optional
        Axis fixed in the child body which aligns with an axis fixed in the
        parent body. The default is x axis in child's reference frame.

    Attributes
    ==========

    name : string
        The joint's name.
    parent : Body
        The joint's parent body.
    child : Body
        The joint's child body.
    coordinates : list
        List of the joint's generalized coordinates.
    speeds : list
        List of the joint's generalized speeds.
    parent_point : Point
        The point fixed in the parent body that represents the joint.
    child_point : Point
        The point fixed in the child body that represents the joint.
    parent_axis : Vector
        The axis fixed in the parent frame that represents the joint.
    child_axis : Vector
        The axis fixed in the child frame that represents the joint.
    kdes : list
        Kinematical differential equations of the joint.

    Notes
    =====

    The direction cosine matrix between the child and parent is formed using a
    simple rotation about an axis that is normal to both ``child_axis`` and
    ``parent_axis``. In general, the normal axis is formed by crossing the
    ``child_axis`` into the ``parent_axis`` except if the child and parent axes
    are in exactly opposite directions. In that case the rotation vector is chosen
    using the rules in the following table where ``C`` is the child reference
    frame and ``P`` is the parent reference frame:

    .. list-table::
       :header-rows: 1

       * - ``child_axis``
         - ``parent_axis``
         - ``rotation_axis``
       * - ``-C.x``
         - ``P.x``
         - ``P.z``
       * - ``-C.y``
         - ``P.y``
         - ``P.x``
       * - ``-C.z``
         - ``P.z``
         - ``P.y``
       * - ``-C.x-C.y``
         - ``P.x+P.y``
         - ``P.z``
       * - ``-C.y-C.z``
         - ``P.y+P.z``
         - ``P.x``
       * - ``-C.x-C.z``
         - ``P.x+P.z``
         - ``P.y``
       * - ``-C.x-C.y-C.z``
         - ``P.x+P.y+P.z``
         - ``(P.x+P.y+P.z) × P.x``

    Nc
                    t          |t                    st          d          || _        t          |t                    st          d          || _        t          |t                    st          d          || _        |                     |          | _        | 	                    |          | _
        |                                 | _        |                     ||          | _        |                     ||	          | _        |                     ||          | _        |                     ||          | _        |                                  |                                  |                                  d S )NzSupply a valid name.z#Parent must be an instance of Body.)
isinstancestr	TypeError_namer   _parent_child_generate_coordinates_coordinates_generate_speeds_speeds_generate_kdes_kdes_axis_parent_axis_child_axis_locate_joint_pos_parent_point_child_point_orient_frames_set_angular_velocity_set_linear_velocity)
selfnameparentchildcoordinatesspeedsparent_joint_poschild_joint_posparent_axis
child_axiss
             =lib/python3.11/site-packages/sympy/physics/mechanics/joint.py__init__zJoint.__init__}   sU    $$$ 	42333
&$'' 	CABBB%&& 	CABBB 66{CC,,V44((**
 JJv{;;::eZ88!33F<LMM 225/JJ""$$$!!#####    c                     | j         S N)r&   r%   s    r/   __str__zJoint.__str__   s
    yr1   c                 *    |                                  S r3   )r5   r4   s    r/   __repr__zJoint.__repr__   s    ||~~r1   c                     | j         S r3   )r   r4   s    r/   r&   z
Joint.name   s
    zr1   c                     | j         S )zParent body of Joint.)r   r4   s    r/   r'   zJoint.parent        |r1   c                     | j         S )zChild body of Joint.)r   r4   s    r/   r(   zJoint.child   s     {r1   c                     | j         S )z*List generalized coordinates of the joint.)r   r4   s    r/   r)   zJoint.coordinates          r1   c                     | j         S )z+List generalized coordinates of the joint..)r   r4   s    r/   r*   zJoint.speeds   r:   r1   c                     | j         S )z0Kinematical differential equations of the joint.)r   r4   s    r/   kdesz
Joint.kdes   s     zr1   c                     | j         S )zThe axis of parent frame.)r   r4   s    r/   r-   zJoint.parent_axis   r=   r1   c                     | j         S )zThe axis of child frame.)r   r4   s    r/   r.   zJoint.child_axis   s     r1   c                     | j         S )z>The joint's point where parent body is connected to the joint.)r    r4   s    r/   parent_pointzJoint.parent_point   s     !!r1   c                     | j         S )z=The joint's point where child body is connected to the joint.)r!   r4   s    r/   child_pointzJoint.child_point   r=   r1   c                     dS )z3Generate list generalized coordinates of the joint.N )r%   r)   s     r/   r   zJoint._generate_coordinates   	     	r1   c                     dS )z.Generate list generalized speeds of the joint.NrH   )r%   r*   s     r/   r   zJoint._generate_speeds   rI   r1   c                     dS )zOrient frames as per the joint.NrH   r4   s    r/   r"   zJoint._orient_frames   rI   r1   c                     d S r3   rH   r4   s    r/   r#   zJoint._set_angular_velocity       r1   c                     d S r3   rH   r4   s    r/   r$   zJoint._set_linear_velocity   rM   r1   c                     g }t           j        }t          t          | j                            D ]D}|                    | j        |                             |           | j        |         z              E|S r3   )r   _trangelenr)   appenddiffr*   )r%   r@   tis       r/   r   zJoint._generate_kdes   sq    s4+,,-- 	G 	GAKK)!,11!444t{1~EFFFFr1   c                     ||j         j        }|S t          |t                    st	          d          |                    |j                   dk    sd}t          |          |S )NzAxis must be of type Vector.r   zAAxis cannot be time-varying when viewed from the associated body.)framexr   r   r   dt
ValueError)r%   bodyaxmsgs       r/   r   zJoint._axis   sl     	BI"f%% 	<:;;;uuTZ  A% 	"&CS//!	r1   c                 *   |t          d          }t          |t                     st          d          |                    |j                  dk    sd}t          |          | j        dz   |j        z   dz   }|j                            ||          S )Nr   z*Joint Position must be supplied as Vector.zLPosition Vector cannot be time-varying when viewed from the associated body.__joint)	r   r   r[   rZ   rX   r   r&   
masscenter	locatenew)r%   r\   	joint_posr^   
point_names        r/   r   zJoint._locate_joint_pos   s     	"q		I)V,, 	KIJJJ||DJ''1, 	"*CS//!Z#%	1H<
((Y???r1   c                 x    |                     |          }t          ||                                          }||fS r3   )angle_betweenr	   	normalize)r%   r'   r(   angleaxiss        r/   _alignment_rotationzJoint._alignment_rotation  s:    $$U++UF##--//d{r1   c                 P   | j         j        }| j                            |          }|d         |d         |d         }}}|dk    r:|dk    r |dk    rt	          | j        |j                  S |dk    r|j        S |j        S |dk    r!|dk    r|dk    r|j        S |j        S |j        S d S )Nr         )r'   rX   r-   	to_matrixr	   rY   yz)r%   parent_frame
componentsrY   rp   rq   s         r/   _generate_vectorzJoint._generate_vector  s    {(%//==
Q-A
1a16 	"!t 0a4 0 !1 ,0 0 0!t &#~%>!6 	"!t &a4 *'>)#~%>!	" 	"r1   c                    | j         j                            | j        j        | j        d           |                     | j        | j                  \  }}t          j                    5  t          j	        dt                     |t          d          k    s|t          k    r|t          k    r|                                 }t          d          }|                    | j         j        | j        d           |                    | j        j        ||           |cd d d            S 	 d d d            n# 1 swxY w Y   | j        j        S )Nr   ignore)category	int_frame)r(   rX   orient_axisr'   r-   rk   r.   warningscatch_warningsfilterwarningsUserWarningr   r   rt   r
   )r%   ri   rj   rx   s       r/   _set_orientationzJoint._set_orientation#  s   
$$T[%68H!LLL..t/?04A At $&& 	! 	!#H{CCCCvayy  !ERK !B; 30022D*;77	%%dj&6KKK%%dk&7uEEE 	! 	! 	! 	! 	! 	! 	! 	!!	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! {  s   'B0D11D58D5NNNNNN)__name__
__module____qualname____doc__r0   r5   r7   propertyr&   r'   r(   r)   r*   r@   r-   r.   rD   rF   r   r   r   r"   r#   r$   r   r   r   rk   rt   r~   rH   r1   r/   r   r      sR       k kZ FJJN $ $ $ $<       X   X   X ! ! X!   X   X ! ! X!     X  " " X" ! ! X!   ^   ^   ^   ^   ^  
 
 

@ 
@ 
@  " " "*! ! ! ! !r1   r   c                   N     e Zd ZdZ	 	 	 d
 fd	Zd Zd Zd Zd Zd Z	d	 Z
 xZS )r   u  Pin (Revolute) Joint.

    .. image:: PinJoint.png

    Explanation
    ===========

    A pin joint is defined such that the joint rotation axis is fixed in both
    the child and parent and the location of the joint is relative to the mass
    center of each body. The child rotates an angle, θ, from the parent about
    the rotation axis and has a simple angular speed, ω, relative to the
    parent. The direction cosine matrix between the child and parent is formed
    using a simple rotation about an axis that is normal to both ``child_axis``
    and ``parent_axis``, see the Notes section for a detailed explanation of
    this.

    Parameters
    ==========

    name : string
        A unique name for the joint.
    parent : Body
        The parent body of joint.
    child : Body
        The child body of joint.
    coordinates: dynamicsymbol, optional
        Generalized coordinates of the joint.
    speeds : dynamicsymbol, optional
        Generalized speeds of joint.
    parent_joint_pos : Vector, optional
        Vector from the parent body's mass center to the point where the parent
        and child are connected. The default value is the zero vector.
    child_joint_pos : Vector, optional
        Vector from the child body's mass center to the point where the parent
        and child are connected. The default value is the zero vector.
    parent_axis : Vector, optional
        Axis fixed in the parent body which aligns with an axis fixed in the
        child body. The default is x axis in parent's reference frame.
    child_axis : Vector, optional
        Axis fixed in the child body which aligns with an axis fixed in the
        parent body. The default is x axis in child's reference frame.

    Attributes
    ==========

    name : string
        The joint's name.
    parent : Body
        The joint's parent body.
    child : Body
        The joint's child body.
    coordinates : list
        List of the joint's generalized coordinates.
    speeds : list
        List of the joint's generalized speeds.
    parent_point : Point
        The point fixed in the parent body that represents the joint.
    child_point : Point
        The point fixed in the child body that represents the joint.
    parent_axis : Vector
        The axis fixed in the parent frame that represents the joint.
    child_axis : Vector
        The axis fixed in the child frame that represents the joint.
    kdes : list
        Kinematical differential equations of the joint.

    Examples
    =========

    A single pin joint is created from two bodies and has the following basic
    attributes:

    >>> from sympy.physics.mechanics import Body, PinJoint
    >>> parent = Body('P')
    >>> parent
    P
    >>> child = Body('C')
    >>> child
    C
    >>> joint = PinJoint('PC', parent, child)
    >>> joint
    PinJoint: PC  parent: P  child: C
    >>> joint.name
    'PC'
    >>> joint.parent
    P
    >>> joint.child
    C
    >>> joint.parent_point
    PC_P_joint
    >>> joint.child_point
    PC_C_joint
    >>> joint.parent_axis
    P_frame.x
    >>> joint.child_axis
    C_frame.x
    >>> joint.coordinates
    [theta_PC(t)]
    >>> joint.speeds
    [omega_PC(t)]
    >>> joint.child.frame.ang_vel_in(joint.parent.frame)
    omega_PC(t)*P_frame.x
    >>> joint.child.frame.dcm(joint.parent.frame)
    Matrix([
    [1,                 0,                0],
    [0,  cos(theta_PC(t)), sin(theta_PC(t))],
    [0, -sin(theta_PC(t)), cos(theta_PC(t))]])
    >>> joint.child_point.pos_from(joint.parent_point)
    0

    To further demonstrate the use of the pin joint, the kinematics of simple
    double pendulum that rotates about the Z axis of each connected body can be
    created as follows.

    >>> from sympy import symbols, trigsimp
    >>> from sympy.physics.mechanics import Body, PinJoint
    >>> l1, l2 = symbols('l1 l2')

    First create bodies to represent the fixed ceiling and one to represent
    each pendulum bob.

    >>> ceiling = Body('C')
    >>> upper_bob = Body('U')
    >>> lower_bob = Body('L')

    The first joint will connect the upper bob to the ceiling by a distance of
    ``l1`` and the joint axis will be about the Z axis for each body.

    >>> ceiling_joint = PinJoint('P1', ceiling, upper_bob,
    ... child_joint_pos=-l1*upper_bob.frame.x,
    ... parent_axis=ceiling.frame.z,
    ... child_axis=upper_bob.frame.z)

    The second joint will connect the lower bob to the upper bob by a distance
    of ``l2`` and the joint axis will also be about the Z axis for each body.

    >>> pendulum_joint = PinJoint('P2', upper_bob, lower_bob,
    ... child_joint_pos=-l2*lower_bob.frame.x,
    ... parent_axis=upper_bob.frame.z,
    ... child_axis=lower_bob.frame.z)

    Once the joints are established the kinematics of the connected bodies can
    be accessed. First the direction cosine matrices of pendulum link relative
    to the ceiling are found:

    >>> upper_bob.frame.dcm(ceiling.frame)
    Matrix([
    [ cos(theta_P1(t)), sin(theta_P1(t)), 0],
    [-sin(theta_P1(t)), cos(theta_P1(t)), 0],
    [                0,                0, 1]])
    >>> trigsimp(lower_bob.frame.dcm(ceiling.frame))
    Matrix([
    [ cos(theta_P1(t) + theta_P2(t)), sin(theta_P1(t) + theta_P2(t)), 0],
    [-sin(theta_P1(t) + theta_P2(t)), cos(theta_P1(t) + theta_P2(t)), 0],
    [                              0,                              0, 1]])

    The position of the lower bob's masscenter is found with:

    >>> lower_bob.masscenter.pos_from(ceiling.masscenter)
    l1*U_frame.x + l2*L_frame.x

    The angular velocities of the two pendulum links can be computed with
    respect to the ceiling.

    >>> upper_bob.frame.ang_vel_in(ceiling.frame)
    omega_P1(t)*C_frame.z
    >>> lower_bob.frame.ang_vel_in(ceiling.frame)
    omega_P1(t)*C_frame.z + omega_P2(t)*U_frame.z

    And finally, the linear velocities of the two pendulum bobs can be computed
    with respect to the ceiling.

    >>> upper_bob.masscenter.vel(ceiling.frame)
    l1*omega_P1(t)*U_frame.y
    >>> lower_bob.masscenter.vel(ceiling.frame)
    l1*omega_P1(t)*U_frame.y + l2*(omega_P1(t) + omega_P2(t))*L_frame.y

    Nc
                 Z    t                                          |||||||||		  	         d S r3   superr0   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   	__class__s             r/   r0   zPinJoint.__init__  s?     	vuk6)?K#	% 	% 	% 	% 	%r1   c                 6    d| j          d| j         d| j         S )Nz
PinJoint: 
  parent: 	  child: r&   r'   r(   r4   s    r/   r5   zPinJoint.__str__  s7    'TY ' '$+ ' '*' ' 	(r1   c                 j    g }|t          d| j        z             }|}|                    |           |S )Ntheta_r   r   rS   )r%   
coordinater)   thetas       r/   r   zPinJoint._generate_coordinates  sB     	"=4:#=>>EJ:&&&r1   c                 j    g }|t          d| j        z             }|}|                    |           |S )Nomega_r   )r%   speedr*   omegas       r/   r   zPinJoint._generate_speeds   s?     	"=4:#=>>EEer1   c                     |                                  }| j        j                            || j        | j        d                    d S Nr   )r~   r(   rX   ry   r-   r)   r%   rX   s     r/   r"   zPinJoint._orient_frames  sL    %%''
$$UD,<$($4Q$7	9 	9 	9 	9 	9r1   c                     | j         j                            | j        j        | j        d         | j                                        z             d S r   )r(   rX   set_ang_velr'   r*   r-   rh   r4   s    r/   r#   zPinJoint._set_angular_velocity  sU    
$$T[%6A%)%5%?%?%A%A9B 	C 	C 	C 	C 	Cr1   c                 N   | j                             | j        j        d           | j                            | j        j        d           | j                            | j         d           | j        j                            | j         | j        j        | j        j                   d S r   )	rD   set_velr'   rX   rF   r(   set_posrb   v2pt_theoryr4   s    r/   r$   zPinJoint._set_linear_velocity  s    !!$+"3Q777  !11555  !2A666
))$*;*.+*;TZ=M	O 	O 	O 	O 	Or1   r   r   r   r   r   r0   r5   r   r   r"   r#   r$   __classcell__r   s   @r/   r   r   8  s        q qf FJJN % % % % % %( ( (    9 9 9
C C CO O O O O O Or1   r   c                   L     e Zd ZdZ	 	 d
 fd	Zd Zd Zd Zd Zd Z	d	 Z
 xZS )r   a  Prismatic (Sliding) Joint.

    .. image:: PrismaticJoint.png

    Explanation
    ===========

    It is defined such that the child body translates with respect to the parent
    body along the body fixed parent axis. The location of the joint is defined
    by two points in each body which coincides when the generalized coordinate is zero. The direction cosine matrix between
    the child and parent is formed using a simple rotation about an axis that is normal to
    both ``child_axis`` and ``parent_axis``, see the Notes section for a detailed explanation of
    this.

    Parameters
    ==========

    name : string
        A unique name for the joint.
    parent : Body
        The parent body of joint.
    child : Body
        The child body of joint.
    coordinates: dynamicsymbol, optional
        Generalized coordinates of the joint.
    speeds : dynamicsymbol, optional
        Generalized speeds of joint.
    parent_joint_pos : Vector, optional
        Vector from the parent body's mass center to the point where the parent
        and child are connected. The default value is the zero vector.
    child_joint_pos : Vector, optional
        Vector from the child body's mass center to the point where the parent
        and child are connected. The default value is the zero vector.
    parent_axis : Vector, optional
        Axis fixed in the parent body which aligns with an axis fixed in the
        child body. The default is x axis in parent's reference frame.
    child_axis : Vector, optional
        Axis fixed in the child body which aligns with an axis fixed in the
        parent body. The default is x axis in child's reference frame.

    Attributes
    ==========

    name : string
        The joint's name.
    parent : Body
        The joint's parent body.
    child : Body
        The joint's child body.
    coordinates : list
        List of the joint's generalized coordinates.
    speeds : list
        List of the joint's generalized speeds.
    parent_point : Point
        The point fixed in the parent body that represents the joint.
    child_point : Point
        The point fixed in the child body that represents the joint.
    parent_axis : Vector
        The axis fixed in the parent frame that represents the joint.
    child_axis : Vector
        The axis fixed in the child frame that represents the joint.
    kdes : list
        Kinematical differential equations of the joint.

    Examples
    =========

    A single prismatic joint is created from two bodies and has the following basic
    attributes:

    >>> from sympy.physics.mechanics import Body, PrismaticJoint
    >>> parent = Body('P')
    >>> parent
    P
    >>> child = Body('C')
    >>> child
    C
    >>> joint = PrismaticJoint('PC', parent, child)
    >>> joint
    PrismaticJoint: PC  parent: P  child: C
    >>> joint.name
    'PC'
    >>> joint.parent
    P
    >>> joint.child
    C
    >>> joint.parent_point
    PC_P_joint
    >>> joint.child_point
    PC_C_joint
    >>> joint.parent_axis
    P_frame.x
    >>> joint.child_axis
    C_frame.x
    >>> joint.coordinates
    [x_PC(t)]
    >>> joint.speeds
    [v_PC(t)]
    >>> joint.child.frame.ang_vel_in(joint.parent.frame)
    0
    >>> joint.child.frame.dcm(joint.parent.frame)
    Matrix([
    [1, 0, 0],
    [0, 1, 0],
    [0, 0, 1]])
    >>> joint.child_point.pos_from(joint.parent_point)
    x_PC(t)*P_frame.x

    To further demonstrate the use of the prismatic joint, the kinematics of
    two masses sliding, one moving relative to a fixed body and the other relative to the
    moving body. about the X axis of each connected body can be created as follows.

    >>> from sympy.physics.mechanics import PrismaticJoint, Body

    First create bodies to represent the fixed ceiling and one to represent
    a particle.

    >>> wall = Body('W')
    >>> Part1 = Body('P1')
    >>> Part2 = Body('P2')

    The first joint will connect the particle to the ceiling and the
    joint axis will be about the X axis for each body.

    >>> J1 = PrismaticJoint('J1', wall, Part1)

    The second joint will connect the second particle to the first particle
    and the joint axis will also be about the X axis for each body.

    >>> J2 = PrismaticJoint('J2', Part1, Part2)

    Once the joint is established the kinematics of the connected bodies can
    be accessed. First the direction cosine matrices of Part relative
    to the ceiling are found:

    >>> Part1.dcm(wall)
    Matrix([
    [1, 0, 0],
    [0, 1, 0],
    [0, 0, 1]])

    >>> Part2.dcm(wall)
    Matrix([
    [1, 0, 0],
    [0, 1, 0],
    [0, 0, 1]])

    The position of the particles' masscenter is found with:

    >>> Part1.masscenter.pos_from(wall.masscenter)
    x_J1(t)*W_frame.x

    >>> Part2.masscenter.pos_from(wall.masscenter)
    x_J1(t)*W_frame.x + x_J2(t)*P1_frame.x

    The angular velocities of the two particle links can be computed with
    respect to the ceiling.

    >>> Part1.ang_vel_in(wall)
    0

    >>> Part2.ang_vel_in(wall)
    0

    And finally, the linear velocities of the two particles can be computed
    with respect to the ceiling.

    >>> Part1.masscenter_vel(wall)
    v_J1(t)*W_frame.x

    >>> Part2.masscenter.vel(wall.frame)
    v_J1(t)*W_frame.x + Derivative(x_J2(t), t)*P1_frame.x

    Nc
                 Z    t                                          |||||||||		  	         d S r3   r   r   s             r/   r0   zPrismaticJoint.__init__  sD     	vuk6CS'j	B 	B 	B 	B 	Br1   c                 6    d| j          d| j         d| j         S )NzPrismaticJoint: r   r   r   r4   s    r/   r5   zPrismaticJoint.__str__  s7    '49 ' ' ' '*' ' 	(r1   c                 j    g }|t          d| j        z             }|}|                    |           |S )Nx_r   )r%   r   r)   rY   s       r/   r   z$PrismaticJoint._generate_coordinates  sB     	y4:566AJ:&&&r1   c                 j    g }|t          d| j        z             }|}|                    |           |S )Nv_r   )r%   r   r*   rp   s       r/   r   zPrismaticJoint._generate_speeds  s?     	y4:566AEer1   c                 z    |                                  }| j        j                            || j        d           d S r   )r~   r(   rX   ry   r-   r   s     r/   r"   zPrismaticJoint._orient_frames  s9    %%''
$$UD,<a@@@@@r1   c                 Z    | j         j                            | j        j        d           d S r   )r(   rX   r   r'   r4   s    r/   r#   z$PrismaticJoint._set_angular_velocity  s(    
$$T[%6:::::r1   c                 V   | j                             | j        j        d           | j                            | j        j        d           | j                            | j         | j        d         | j        	                                z             | j                            | j        j        | j
        d         | j        	                                z             | j        j                            | j        j        | j
        d         | j        	                                z             d S r   )rD   r   r'   rX   rF   r(   r   r)   r-   rh   r*   rb   r4   s    r/   r$   z#PrismaticJoint._set_linear_velocity  s    !!$+"3Q777  !11555  !2D4DQ4G$JZJdJdJfJf4fggg  !2DKNTEUE_E_EaEa4abbb
%%dk&7Q$JZJdJdJfJf9fgggggr1   r   r   r   s   @r/   r   r     s        m m^ ]a;?B B B B B B( ( (    A A A; ; ;h h h h h h hr1   r   )abcr   r   sympy.core.numbersr   sympy.physics.mechanics.bodyr   sympy.physics.vectorr   r   r	   sympy.physics.vector.framer
   rz   __all__r   r   r   rH   r1   r/   <module>r      s=   $ # # # # # # # ! ! ! ! ! ! - - - - - - > > > > > > > > > > 5 5 5 5 5 5 
1
1
1f! f! f! f! f!C f! f! f!R	^O ^O ^O ^O ^Ou ^O ^O ^OBVh Vh Vh Vh VhU Vh Vh Vh Vh Vhr1   