File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5+ import logging
56from typing import TYPE_CHECKING
67
78import casadi as cs
@@ -146,18 +147,14 @@ def symbolic_dynamics(
146147 # States and Inputs
147148 X = cs .vertcat (symbols .pos , symbols .quat , symbols .vel , symbols .ang_vel )
148149 if model_rotor_vel :
149- print ( "[WARNING]: The so_rpy model does not support thrust dynamics" )
150+ logging . getLogger ( __name__ ). warning ( " The so_rpy model does not support thrust dynamics" )
150151 X = cs .vertcat (X , symbols .rotor_vel )
151152 if model_dist_f :
152153 X = cs .vertcat (X , symbols .dist_f )
153154 if model_dist_t :
154155 X = cs .vertcat (X , symbols .dist_t )
155156 U = U_euler
156157
157- # Defining the dynamics function
158- # Creating force vector
159- forces_motor_vec = cs .vertcat (0 , 0 , acc_coef + cmd_f_coef * symbols .cmd_thrust )
160-
161158 # Linear equation of motion
162159 pos_dot = X_dot_euler [0 :3 ]
163160 vel_dot = X_dot_euler [6 :9 ]
Original file line number Diff line number Diff line change @@ -494,6 +494,7 @@ def create_cs_rpy_rates_deriv2ang_vel_deriv() -> cs.Function:
494494
495495
496496def create_cs_quat2matrix () -> cs .Function :
497+ """Generates a casadi numeric function from the cs_quat2matrix function."""
497498 qw = cs .MX .sym ("qw" )
498499 qx = cs .MX .sym ("qx" )
499500 qy = cs .MX .sym ("qy" )
@@ -507,6 +508,7 @@ def create_cs_quat2matrix() -> cs.Function:
507508
508509
509510def create_cs_rpy2matrix () -> cs .Function :
511+ """Generates a casadi numeric function from the cs_rpy2matrix function."""
510512 roll = cs .MX .sym ("roll" )
511513 pitch = cs .MX .sym ("pitch" )
512514 yaw = cs .MX .sym ("yaw" )
You can’t perform that action at this time.
0 commit comments