K iddlmZmZmZmZmZddlmZddlm Z m Z m Z ddl m Z ddlmZddlmZddlmZmZmZmZmZddlmZdd lmZd gZGd d e Zy ) )zerosMatrixdiffeyelinear_eq_to_matrix)default_sort_key)ReferenceFramedynamicsymbolspartial_velocity)_Methods)Particle) RigidBody)msubsfind_dynamicsymbols_f_list_parser_validate_coordinates_parse_linear_solver) Linearizer)iterable KanesMethodcHeZdZdZ ddZdZddZddZdZd Z dd Z ddd d Z d d Z dZ d!dZdZedZedZedZedZedZedZedZedZedZedZedZedZedZy)"ra"Kane's method object. Explanation =========== This object is used to do the "book-keeping" as you go through and form equations of motion in the way Kane presents in: Kane, T., Levinson, D. Dynamics Theory and Applications. 1985 McGraw-Hill The attributes are for equations in the form [M] udot = forcing. Attributes ========== q, u : Matrix Matrices of the generalized coordinates and speeds bodies : iterable Iterable of Particle and RigidBody objects in the system. loads : iterable Iterable of (Point, vector) or (ReferenceFrame, vector) tuples describing the forces on the system. auxiliary_eqs : Matrix If applicable, the set of auxiliary Kane's equations used to solve for non-contributing forces. mass_matrix : Matrix The system's dynamics mass matrix: [k_d; k_dnh] forcing : Matrix The system's dynamics forcing vector: -[f_d; f_dnh] mass_matrix_kin : Matrix The "mass matrix" for kinematic differential equations: k_kqdot forcing_kin : Matrix The forcing vector for kinematic differential equations: -(k_ku*u + f_k) mass_matrix_full : Matrix The "mass matrix" for the u's and q's with dynamics and kinematics forcing_full : Matrix The "forcing vector" for the u's and q's with dynamics and kinematics Parameters ========== frame : ReferenceFrame The inertial reference frame for the system. q_ind : iterable of dynamicsymbols Independent generalized coordinates. u_ind : iterable of dynamicsymbols Independent generalized speeds. kd_eqs : iterable of Expr, optional Kinematic differential equations, which linearly relate the generalized speeds to the time-derivatives of the generalized coordinates. q_dependent : iterable of dynamicsymbols, optional Dependent generalized coordinates. configuration_constraints : iterable of Expr, optional Constraints on the system's configuration, i.e. holonomic constraints. u_dependent : iterable of dynamicsymbols, optional Dependent generalized speeds. velocity_constraints : iterable of Expr, optional Constraints on the system's velocity, i.e. the combination of the nonholonomic constraints and the time-derivative of the holonomic constraints. acceleration_constraints : iterable of Expr, optional Constraints on the system's acceleration, by default these are the time-derivative of the velocity constraints. u_auxiliary : iterable of dynamicsymbols, optional Auxiliary generalized speeds. bodies : iterable of Particle and/or RigidBody, optional The particles and rigid bodies in the system. forcelist : iterable of tuple[Point | ReferenceFrame, Vector], optional Forces and torques applied on the system. explicit_kinematics : bool Boolean whether the mass matrices and forcing vectors should use the explicit form (default) or implicit form for kinematics. See the notes for more details. kd_eqs_solver : str, callable Method used to solve the kinematic differential equations. If a string is supplied, it should be a valid method that can be used with the :meth:`sympy.matrices.matrixbase.MatrixBase.solve`. If a callable is supplied, it should have the format ``f(A, rhs)``, where it solves the equations and returns the solution. The default utilizes LU solve. See the notes for more information. constraint_solver : str, callable Method used to solve the velocity constraints. If a string is supplied, it should be a valid method that can be used with the :meth:`sympy.matrices.matrixbase.MatrixBase.solve`. If a callable is supplied, it should have the format ``f(A, rhs)``, where it solves the equations and returns the solution. The default utilizes LU solve. See the notes for more information. Notes ===== The mass matrices and forcing vectors related to kinematic equations are given in the explicit form by default. In other words, the kinematic mass matrix is $\mathbf{k_{k\dot{q}}} = \mathbf{I}$. In order to get the implicit form of those matrices/vectors, you can set the ``explicit_kinematics`` attribute to ``False``. So $\mathbf{k_{k\dot{q}}}$ is not necessarily an identity matrix. This can provide more compact equations for non-simple kinematics. Two linear solvers can be supplied to ``KanesMethod``: one for solving the kinematic differential equations and one to solve the velocity constraints. Both of these sets of equations can be expressed as a linear system ``Ax = rhs``, which have to be solved in order to obtain the equations of motion. The default solver ``'LU'``, which stands for LU solve, results relatively low number of operations. The weakness of this method is that it can result in zero division errors. If zero divisions are encountered, a possible solver which may solve the problem is ``"CRAMER"``. This method uses Cramer's rule to solve the system. This method is slower and results in more operations than the default solver. However it only uses a single division by default per entry of the solution. While a valid list of solvers can be found at :meth:`sympy.matrices.matrixbase.MatrixBase.solve`, it is also possible to supply a `callable`. This way it is possible to use a different solver routine. If the kinematic differential equations are not too complex it can be worth it to simplify the solution by using ``lambda A, b: simplify(Matrix.LUsolve(A, b))``. Another option solver one may use is :func:`sympy.solvers.solveset.linsolve`. This can be done using `lambda A, b: tuple(linsolve((A, b)))[0]`, where we select the first solution as our system should have only one unique solution. Examples ======== This is a simple example for a one degree of freedom translational spring-mass-damper. In this example, we first need to do the kinematics. This involves creating generalized speeds and coordinates and their derivatives. Then we create a point and set its velocity in a frame. >>> from sympy import symbols >>> from sympy.physics.mechanics import dynamicsymbols, ReferenceFrame >>> from sympy.physics.mechanics import Point, Particle, KanesMethod >>> q, u = dynamicsymbols('q u') >>> qd, ud = dynamicsymbols('q u', 1) >>> m, c, k = symbols('m c k') >>> N = ReferenceFrame('N') >>> P = Point('P') >>> P.set_vel(N, u * N.x) Next we need to arrange/store information in the way that KanesMethod requires. The kinematic differential equations should be an iterable of expressions. A list of forces/torques must be constructed, where each entry in the list is a (Point, Vector) or (ReferenceFrame, Vector) tuple, where the Vectors represent the Force or Torque. Next a particle needs to be created, and it needs to have a point and mass assigned to it. Finally, a list of all bodies and particles needs to be created. >>> kd = [qd - u] >>> FL = [(P, (-k * q - c * u) * N.x)] >>> pa = Particle('pa', P, m) >>> BL = [pa] Finally we can generate the equations of motion. First we create the KanesMethod object and supply an inertial frame, coordinates, generalized speeds, and the kinematic differential equations. Additional quantities such as configuration and motion constraints, dependent coordinates and speeds, and auxiliary speeds are also supplied here (see the online documentation). Next we form FR* and FR to complete: Fr + Fr* = 0. We have the equations of motion at this point. It makes sense to rearrange them though, so we calculate the mass matrix and the forcing terms, for E.o.M. in the form: [MM] udot = forcing, where MM is the mass matrix, udot is a vector of the time derivatives of the generalized speeds, and forcing is a vector representing "forcing" terms. >>> KM = KanesMethod(N, q_ind=[q], u_ind=[u], kd_eqs=kd) >>> (fr, frstar) = KM.kanes_equations(BL, FL) >>> MM = KM.mass_matrix >>> forcing = KM.forcing >>> rhs = MM.inv() * forcing >>> rhs Matrix([[(-c*u(t) - k*q(t))/m]]) >>> KM.linearize(A_and_B=True)[0] Matrix([ [ 0, 1], [-k/m, -c/m]]) Please look at the documentation pages for more information on how to perform linearization and how to deal with dependent coordinates & speeds, and how do deal with bringing non-contributing forces into evidence. NLUc|stdg}tdg}t|ts td||_d|_d|_| |_| |_| |_ ||_ |j||||| t|j|j|j|||j!||| |y)z&Please read the online documentation. dummy_qdummy_kdz+An inertial ReferenceFrame must be suppliedN)r isinstancer TypeError _inertial_fr_frstar _forcelist _bodylistexplicit_kinematics_constraint_solver_initialize_vectorsrqu_initialize_kindiffeq_matrices_initialize_constraint_matrices)selfframeq_indu_indkd_eqs q_dependentconfiguration_constraints u_dependentvelocity_constraintsacceleration_constraints u_auxiliarybodies forcelistr# kd_eqs_solverconstraint_solvers b/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/physics/mechanics/kane.py__init__zKanesMethod.__init__s#I./E$Z01F%0IJ J ##6 "3    UK dffdff- ++FMB ,, %'; $&7 9c<d}||}t|s tdt|s tdt|}||_t||g|_|j j tj|_ ||}t|s tdt|s tdt|}||_ t||g|_ |jj tj|_ |||_y)z,Initialize the coordinate and speed vectors.c0|r t|StSNrxs r9z1KanesMethod._initialize_vectors..aVXr;z,Generalized coordinates must be an iterable.z*Dependent coordinates must be an iterable.z'Generalized speeds must be an iterable.z%Dependent speeds must be an iterable.N)rrr_qdep_qr&rr _t_qdot_udep_ur'_udot_uaux)r*r,q_depr-u_depu_aux none_handlers r9r%zKanesMethod._initialize_vectorss> U#JK KHI Iu  %(VV[[!2!23 U#EF FCD Du  %(VV[[!2!23 !%( r;ct|}t|j}t|j}||z }d}||}t|jt|k7r t d|||_||}||}t||k7r t d|rt||k7r t d|rm|jt||j}t||jdd\|_ } | |_ |s|jjtj|jz|jjtjz} |jt| |j} | |_|j|_nK|jt||j}t||j"dd\|_} | |_|jddd|f} |jdd||f} || |  |_yt'|_ t'|_ t'|_t'|_t'|_y)z Initializes constraint matrices.c0|r t|StSr>r?r@s r9rBz=KanesMethod._initialize_constraint_matrices..rCr;zUThere must be an equal number of dependent coordinates and configuration constraints.zKThere must be an equal number of dependent speeds and velocity constraints.zOThere must be an equal number of dependent speeds and acceleration constraints.N)rlenr'rHrD ValueError_f_h _qdot_u_maprr_k_nh_f_nhrr rF_f_dnh_k_dnhrJ_Arsr)r*configvelacc linear_solveromprOf_nh_negrX f_dnh_negB_indB_deps r9r)z+KanesMethod._initialize_constraint_matrices s3,]; K  O E= f% tzz?c&k )JK K ( 33 s8q=@A A CHMDE E +C!1!12#6sDFF1I#F DJ"DJ**//.*;*;>!$DnnT*G..(11)Force pairs must be supplied in an non-empty iterable or None.c3RK|]}|j| ywr>)dot).0jf_listipartialss r9 z'KanesMethod._form_fr..s(H! A**6!95Hs$')rRrrSrrrrUr'rr rangesumrHrZTr!r) r*flNvel_listrr_bFRraFRtildeFRoldrrs ` @@r9_form_frzKanesMethod._form_frsZ >s2w!|8B<./ / NN)"a0&8@A1E!T--.AA6<=%4++,= K K 1a[#Hdffa8q IAHuQxHHBqE I ::C O#A!QiGqsAvJE tyy{{U* *GB +B=s E%,E*c  "#$t|s tdtj}j"t j jd$t j jd#jDcgc]}t||}}t j |d}jjDcic]?\}}|j||j|jjA}}}|jj"fd} |D cgc] } | |  } } tj} t!| | } t!| d}#fd}#$fd}t#|D]\}} t%| t&r|| j(}|| j*}|| j,j/"}|| j0j3"}|| j,j5"}|j||z||zz}||j7| j0j9|t;|j9| j0j="$z|j?|j9|z}tA| D]}|| |d|}||j9| |d|}tA| D]S}| ||fxx||j9| |d|zz cc<| ||fxx|j9| |d|z cc<U||xx|j9| |d|z cc<||xx|j9| |d|z cc<-|| j(}|| jBj/"}|| jBj5"}|j||z||zz}tA| D]r}|| |d|}tA| D],}| ||fxx||j9| |d|zz cc<.||xx|j9| |d|z cc<t|t;| |} t;t;||$|#}| t;tEj|z|z }jFr| tjFz }|d|df}||| df}|jHjJ|zz}| d|ddf} | || ddf}!| jHjJ|!zz} |d|ddfjHjJ||| ddfzz}|_&|_'| _(jR|z _*|Scc}wcc}}wcc} w)z#Form the generalized inertia force.z'Bodies must be supplied in an iterable.rct|tr7|jj|jj g}n8t|t r|jjg}n td|Dcgc]}t|j}}t|jScc}w)NzMThe body list may only contain either RigidBody or Particle as list elements.) rr masscenterr\r+ ang_vel_inr pointrrrUr r')bodyvlistr\vrr*s r9get_partial_velocityz6KanesMethod._form_frstar..get_partial_velocitys$ *,,Q/1F1Fq1IJD(+*,!JKK9>?#sD,,-?A?#Atvvq1 1@sB;rct|Sr>r)exprrws r9rBz*KanesMethod._form_frstar..stY!7r;c0tt|Sr>r)rrw udot_zeros r9rBz*KanesMethod._form_frstar..seE$ ,BI&Nr;N)+rrr rFrrgrhrJrKrrUitemsrjupdaterRr'r enumeraterrmasscentral_inertiarr\r+rr]dtrr ang_acc_incrossrrrrHrZrr"r _k_dr_f_d)%r*bltruauxdot uauxdot_zerokr q_ddot_u_maprrrr_MMnonMM zero_uauxzero_udot_uauxMIr\omegar]inertial_forceinertial_torquertmp_veltmp_angtempfr_starra fr_star_ind fr_star_depMMiMMdrrwrs%` @@@r9 _form_frstarzKanesMethod._form_frstars|EF F    NNMM$**a0 MM$**a0 '+zz2!41:22}}Wa0 -1,<,<,B,B,DF"(1aq 166!9#5#5   $F FD,,- 2<>>4(.>> K 1a[a 7 N } FGAt$ *dii(d223 3 3A 67!$**"7"7":;$T__%8%8%;<"#&&)c/AG";"+QTT$**-=-A-A%-H!%% 5 5a 899E-F[[u.-0#1q GA' Aq(9:G'hqk!nQ.?(@AG"1XC1a4Agkk(1+a.2C&D$DD1a4GKK Aq0A$BB C !H 2 28A;q>!3D EEH!H 3 3HQKN14E FFH Gdii( q 12$TZZ^^A%67"#&&)c/AG";qFA$Xa[^A%67D"1XB1a4Adhhx{1~a/@&A$AAB!H 2 28A;q>!3D EEH F5 F@uR. /eE<0<4vdjj1<@@5HI ::C O#A!"1"a%.K!!A#q&/K!TYY[[;%>?GRaRU)CQqS!V*C c)*B"1"a%LDIIKK%!Q-$?@E  hh&' m3F(?sW AW9W$c|j |j td|j}|jr<|j r0|j|j t |jzz}n t }|jr<|jr0|j|jt |jzz}n t }tj|jd}tj|jd}tj|jd}tjt |j|jgd}t|j||j t |jzz} t|j||j"t |jzz} t|j|} t|j||jz} t%t'| d} |j(}|j}|j*r|dt'|j* }n|}|j*}|j,r|dt'|j, }n|}|j,}|j.}|j1t2j4}tjt ||gd}t7t ||j||j||gt9fd|j |j"|j|j|j|j:fDr tdt=t?t|j@|}|jCtD|D])}t1|t2j4|vs tdtG| | | | | ||||||||||| S) aReturns an instance of the Linearizer class, initiated from the data in the KanesMethod class. This may be more desirable than using the linearize class method, as the Linearizer object will allow more efficient recalculation (i.e. about varying operating points). Parameters ========== linear_solver : str, callable Method used to solve the several symbolic linear systems of the form ``A*x=b`` in the linearization process. If a string is supplied, it should be a valid method that can be used with the :meth:`sympy.matrices.matrixbase.MatrixBase.solve`. If a callable is supplied, it should have the format ``x = f(A, b)``, where it solves the equations and returns the solution. The default is ``'LU'`` which corresponds to SymPy's ``A.LUsolve(b)``. ``LUsolve()`` is fast to compute but will often result in divide-by-zero and thus ``nan`` results. Returns ======= Linearizer An instantiated :class:`sympy.physics.mechanics.linearize.Linearizer`. NNeed to compute Fr, Fr* first.rrc36K|]}t|ywr>)r)rrsym_lists r9rz,KanesMethod.to_linearizer..dsMA"1h/MszWCannot have dynamicsymbols outside dynamic forcing vector.)keyzpCannot have derivatives of specified quantities when linearizing forcing terms.r^)$rr rSrTrWrVrr'rXrYrJrgrhrGrrqrsrrrrRr&rDrHrKrr rFsetanyrlistrrsortrr)r*r^f_cf_vf_arvud_zeroqd_zero qd_u_zerof_0f_1f_2f_3f_4r&r'q_iq_du_iu_duauxrrwrrrs @r9 to_linearizerzKanesMethod.to_linearizers36 HH $,,"6=> >ii ::$****tzz&.88C(C ;;4;;++ F4::,> >>C(Ctvvq)-- A.-- A.MM&$**dff)=">B DIIv&vdjj7I)IIDIIw'$**VDFF^*CCDLL),DLL'*TXX5CHa  FF FF ::%c$**o%&CCjj ::%c$**o%&CCjjzz))N--.MM&$"91= vq$**aT7KLM M$-- DIIt{{DKK:LM M./ / $U499i%@(K L #$ NAA~(()Q. "MNN N#sCc3S!QS#q ? ?r;) new_methodr^c j|j|}|jdi|}||jfzS)a Linearize the equations of motion about a symbolic operating point. Parameters ========== new_method Deprecated, does nothing and will be removed. linear_solver : str, callable Method used to solve the several symbolic linear systems of the form ``A*x=b`` in the linearization process. If a string is supplied, it should be a valid method that can be used with the :meth:`sympy.matrices.matrixbase.MatrixBase.solve`. If a callable is supplied, it should have the format ``x = f(A, b)``, where it solves the equations and returns the solution. The default is ``'LU'`` which corresponds to SymPy's ``A.LUsolve(b)``. ``LUsolve()`` is fast to compute but will often result in divide-by-zero and thus ``nan`` results. **kwargs Extra keyword arguments are passed to :meth:`sympy.physics.mechanics.linearize.Linearizer.linearize`. Explanation =========== If kwarg A_and_B is False (default), returns M, A, B, r for the linearized form, M*[q', u']^T = A*[q_ind, u_ind]^T + B*r. If kwarg A_and_B is True, returns A, B, r for the linearized form dx = A*x + B*r, where x = [q_ind, u_ind]^T. Note that this is computationally intensive if there are many symbolic parameters. For this reason, it may be more desirable to use the default A_and_B=False, returning M, A, and B. Values may then be substituted in to these matrices, and the state space form found as A = P.T*M.inv()*A, B = P.T*M.inv()*B, where P = Linearizer.perm_mat. In both cases, r is found as all dynamicsymbols in the equations of motion that are not part of q, u, q', or u'. They are sorted in canonical form. The operating points may be also entered using the ``op_point`` kwarg. This takes a dictionary of {symbol: value}, or a an iterable of such dictionaries. The values may be numeric or symbolic. The more values you can specify beforehand, the faster this computation will run. For more documentation, please see the ``Linearizer`` class. r)r linearizer)r*rr^kwargs linearizerresults r9rzKanesMethod.linearizews>`''m'D %%%//''r;c | |j}||j |j}|gk(rd}|js td|j |}|j |}|j rV|jsCt|j|j|j |j |j}nt|j|j|j |j |j|j|jz|jz|j|j z|j"z|j}|j$|_||_|j |}|j |}||z|_|j+||_|j+||_|j,|j.fS)a Method to form Kane's equations, Fr + Fr* = 0. Explanation =========== Returns (Fr, Fr*). In the case where auxiliary generalized speeds are present (say, s auxiliary speeds, o generalized speeds, and m motion constraints) the length of the returned vectors will be o - m + s in length. The first o - m equations will be the constrained Kane's equations, then the s auxiliary Kane's equations. These auxiliary equations can be accessed with the auxiliary_eqs property. Parameters ========== bodies : iterable An iterable of all RigidBody's and Particle's in the system. A system must have at least one body. loads : iterable Takes in an iterable of (Particle, Vector) or (ReferenceFrame, Vector) tuples which represent the force at a point or torque on a frame. Must be either a non-empty iterable of tuples or None which corresponds to a system with no constraints. N[Create an instance of KanesMethod with kinematic differential equations to use this method.)r4r8)r4r1r2r3r8)r5r!rsAttributeErrorrrrKrHrrr&r$rVr'rWrYrJrXrU_km_aux_eqcol_joinrr )r*r5loadsfrfrstarkmfraux frstarauxs r9kanes_equationszKanesMethod.kanes_equationss2 >[[F Mdoo9OOE B;E}} "KL L ]]5 !""6* :::: )-tG^G^`!$(JJDJJ.2jj466.A /#26++ 2J 3$*.*A*A "--BNDHKK&E/I 9,DL{{5)DH!??95DL$,,''r;c^|j|j|j\}}||zSr>)rbodylistr6)r*rrs r9 _form_eomszKanesMethod._form_eomss*))$--H FF{r;ctt|jt|jzd}|j }t |jD]\}}||j ||<|A|jj|j|t|jddf<|S|jj|d|jz|t|jddf<|S)aReturns the system's equations of motion in first order form. The output is the right hand side of:: x' = |q'| =: f(q, u, r, p, t) |u'| The right hand side is what is needed by most numerical ODE integrators. Parameters ========== inv_method : str The specific sympy inverse matrix calculation method to use. For a list of valid methods, see :meth:`~sympy.matrices.matrixbase.MatrixBase.inv` rNrT)try_block_diag) rrRr&r' kindiffdictrr mass_matrixLUsolveforcinginv)r* inv_methodrhskdesrrs r9rzKanesMethod.rhss&CK#dff+-q1!' &FAs#((*%CF &  #'#3#3#;#;DLL#ICDFF a  %)$4$4$8$8HL%9%N$(LL%1CDFF a  r;cH|js td|jS)z%Returns a dictionary mapping q' to u.r)rUrr*s r9rzKanesMethod.kindiffdict s, "KL Lr;c|jr |js td|js td|jS)z,A matrix containing the auxiliary equations.rz'No auxiliary speeds have been declared.)rr rSrKrrs r9 auxiliary_eqszKanesMethod.auxiliary_eqss:xxt||=> >zzFG G||r;cJ|jr |jS|jS)zBThe kinematic "mass matrix" $\mathbf{k_{k\dot{q}}}$ of the system.)r#rsrors r9mass_matrix_kinzKanesMethod.mass_matrix_kins!!% 8 8t}}Td>T>TTr;c|jr0|jt|jz|jz S|j t|jz|j z S)z-The kinematic "forcing vector" of the system.)r#rrrr'rqrnrmrs r9 forcing_kinzKanesMethod.forcing_kinsW  # #ZZ&.0499<= =((6$&&>9D >tyy$++.//r;c|jr |js tdt|j|j g S)z!The forcing vector of the system.r)rr rSrrrXrs r9rzKanesMethod.forcing.s8xxt||=> > 4;;/000r;cJ|jr |js tdt|jt|j }}|j jt||jt||j|jS)zvThe mass matrix of the system, augmented by the kinematic differential equations in explicit or implicit form.r) rr rSrRr'r&r rkrrr)r*r_ns r9mass_matrix_fullzKanesMethod.mass_matrix_full5szxxt||=> >466{CK1$$--eAqk:DD !QK !1!1 24 4r;cDt|j|jgS)zyThe forcing vector of the system, augmented by the kinematic differential equations in explicit or implicit form.)rr rrs r9 forcing_fullzKanesMethod.forcing_full?st''677r;c|jSr>)rErs r9r&z KanesMethod.qE wwr;c|jSr>)rIrs r9r'z KanesMethod.uIrr;c|jSr>r"rs r9rzKanesMethod.bodylistM ~~r;c|jSr>r!rs r9r6zKanesMethod.forcelistQ r;c|jSr>rrs r9r5zKanesMethod.bodiesUrr;c|jSr>rrs r9rzKanesMethod.loadsYrr;) NNNNNNNNNTrr)r)NNr>)__name__ __module__ __qualname____doc__r:r%r)r(rrrrrrrrpropertyrr r rrrrr&r'rr6r5rrr;r9rrsvzxFJ=AEI:>9=#' 9@)8?!BF>P@aF\?~'+$2(h8(tB UUPP00 11 4488 r;N)sympyrrrrrsympy.core.sortingrsympy.physics.vectorr r r sympy.physics.mechanics.methodr sympy.physics.mechanics.particler !sympy.physics.mechanics.rigidbodyr!sympy.physics.mechanics.functionsrrrrr!sympy.physics.mechanics.linearizersympy.utilities.iterablesr__all__rrr;r9r-sL??/44357EE9. /H (H r;