Skip to content

Commit 680718e

Browse files
committed
Fix linting
1 parent 2874249 commit 680718e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

drone_models/so_rpy/model.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import logging
56
from typing import TYPE_CHECKING
67

78
import 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]

drone_models/utils/rotation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ def create_cs_rpy_rates_deriv2ang_vel_deriv() -> cs.Function:
494494

495495

496496
def 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

509510
def 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")

0 commit comments

Comments
 (0)