Skip to content

Commit c99c97e

Browse files
committed
Fix docs
1 parent 970deb3 commit c99c97e

8 files changed

Lines changed: 29 additions & 38 deletions

File tree

crazyflow/drones/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
(``params.toml`` with mass, inertia, thrust and torque curves, …). These describe the *hardware* and
66
are independent of the dynamics formulation used to simulate it (see [crazyflow.dynamics][]).
77
8-
Use [available_drones][crazyflow.drones.available_drones] to enumerate the supported configurations.
8+
Use ``available_drones`` to enumerate the supported configurations.
99
"""
1010

1111
# Currently supported platforms:

crazyflow/dynamics/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
estimation or control design.
1010
1111
Use [parametrize][crazyflow.dynamics.parametrize] to bind a dynamics function to a named drone
12-
configuration, and [available_dynamics][crazyflow.dynamics.available_dynamics] to enumerate all
13-
registered dynamics.
12+
configuration, and ``available_dynamics`` to enumerate all registered dynamics.
1413
"""
1514

1615
import os

crazyflow/dynamics/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def load_params(dynamics: str, drone: str, xp: ModuleType | None = None) -> dict
113113
114114
Raises:
115115
KeyError: If ``drone`` is not found in either TOML file, or if ``dynamics`` does not
116-
correspond to a known sub-package.
116+
correspond to a known sub-package.
117117
"""
118118
xp = np if xp is None else xp
119119
with open(Path(__file__).parents[1] / "drones/params.toml", "rb") as f:

crazyflow/dynamics/first_principles/dynamics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ def symbolic_dynamics(
211211
Tuple ``(X_dot, X, U, Y)`` of CasADi ``MX`` expressions:
212212
213213
* ``X_dot``: State derivative, length 17 when ``model_rotor_vel=True`` (13 otherwise), plus
214-
3 per enabled disturbance.
214+
3 per enabled disturbance.
215215
* ``X``: State vector ``[pos(3), quat(4), vel(3), ang_vel(3)]``, with ``rotor_vel(4)``
216-
appended if ``model_rotor_vel=True``.
216+
appended if ``model_rotor_vel=True``.
217217
* ``U``: Input vector ``[rpm_1, rpm_2, rpm_3, rpm_4]``.
218218
* ``Y``: Output ``[pos(3), quat(4)]``.
219219
"""

crazyflow/dynamics/so_rpy_rotor/dynamics.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ def symbolic_dynamics(
184184
Tuple ``(X_dot, X, U, Y)`` of CasADi ``MX`` expressions:
185185
186186
* ``X_dot``: State derivative, length 14 when ``model_rotor_vel=True`` (13 otherwise), plus
187-
3 per enabled disturbance.
187+
3 per enabled disturbance.
188188
* ``X``: State vector ``[pos(3), quat(4), vel(3), ang_vel(3)]``, with ``rotor_vel(1)``
189-
appended if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust
190-
state in Newtons.
189+
appended if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust
190+
state in Newtons.
191191
* ``U``: Input vector ``[roll_rad, pitch_rad, yaw_rad, thrust_N]``.
192192
* ``Y``: Output ``[pos(3), quat(4)]``.
193193
"""
@@ -296,8 +296,8 @@ def symbolic_dynamics_euler(
296296
297297
* ``X_dot``: State derivative, length 13 when ``model_rotor_vel=True`` (12 otherwise).
298298
* ``X``: State vector ``[pos(3), rpy(3), vel(3), drpy(3)]``, with ``rotor_vel(1)`` appended
299-
if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust state in
300-
Newtons.
299+
if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust state in
300+
Newtons.
301301
* ``U``: Input vector ``[roll_rad, pitch_rad, yaw_rad, thrust_N]``.
302302
* ``Y``: Output ``[pos(3), rpy(3)]``.
303303
"""

crazyflow/dynamics/so_rpy_rotor_drag/dynamics.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ def symbolic_dynamics(
203203
Tuple ``(X_dot, X, U, Y)`` of CasADi ``MX`` expressions:
204204
205205
* ``X_dot``: State derivative, length 14 when ``model_rotor_vel=True`` (13 otherwise), plus
206-
3 per enabled disturbance.
206+
3 per enabled disturbance.
207207
* ``X``: State vector ``[pos(3), quat(4), vel(3), ang_vel(3)]``, with ``rotor_vel(1)``
208-
appended if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust
209-
state in Newtons.
208+
appended if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust
209+
state in Newtons.
210210
* ``U``: Input vector ``[roll_rad, pitch_rad, yaw_rad, thrust_N]``.
211211
* ``Y``: Output ``[pos(3), quat(4)]``.
212212
"""
@@ -321,8 +321,8 @@ def symbolic_dynamics_euler(
321321
322322
* ``X_dot``: State derivative, length 13 when ``model_rotor_vel=True`` (12 otherwise).
323323
* ``X``: State vector ``[pos(3), rpy(3), vel(3), drpy(3)]``, with ``rotor_vel(1)`` appended
324-
if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust state in
325-
Newtons.
324+
if ``model_rotor_vel=True``. Note that ``rotor_vel`` here represents the thrust state in
325+
Newtons.
326326
* ``U``: Input vector ``[roll_rad, pitch_rad, yaw_rad, thrust_N]``.
327327
* ``Y``: Output ``[pos(3), rpy(3)]``.
328328
"""

crazyflow/dynamics/utils/data_utils.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,11 @@
2222
def preprocessing(data: dict[str, Array]) -> dict[str, Array]:
2323
"""Applies preprocessing to collected data.
2424
25-
The preprocessing includes
26-
outlier detection and interpolation,
27-
normalizing orientation (assuming hover at start),
28-
calculating rpy from quaternions,
29-
and calculating rotational error
25+
The preprocessing includes outlier detection and interpolation, normalizing orientation
26+
(assuming hover at start), calculating rpy from quaternions, and calculating rotational error.
3027
3128
Args:
32-
data: The raw data dictionary containing
33-
time [s], pos [m], quat, cmd_rpy [rad], cmd_f [N].
29+
data: The raw data dictionary containing time [s], pos [m], quat, cmd_rpy [rad], cmd_f [N].
3430
3531
Returns:
3632
The same dict with the following keys added or modified:
@@ -40,8 +36,7 @@ def preprocessing(data: dict[str, Array]) -> dict[str, Array]:
4036
* ``"quat"``: Quaternions corrected so the initial attitude is identity.
4137
* ``"rpy"``: Roll/pitch/yaw in radians, shape ``(N, 3)``.
4238
* ``"z_axis"``: Body z-axis in world frame, shape ``(N, 3)``.
43-
* ``"eR"``: Rotation error vector (vee of skew-symmetric error matrix),
44-
shape ``(N, 3)``.
39+
* ``"eR"``: Rotation error vector (vee of skew-symmetric error matrix), shape ``(N, 3)``.
4540
* ``"eR_vec"``: Rotation error as rotation vector, shape ``(N, 3)``.
4641
"""
4742
data["dt"] = np.diff(data["time"])
@@ -94,10 +89,9 @@ def preprocessing(data: dict[str, Array]) -> dict[str, Array]:
9489
def derivatives_svf(data: dict[str, Array]) -> dict[str, Array]:
9590
"""Apply a State Variable Filter (SVF) to compute smoothed signals and their time derivatives.
9691
97-
Filters position, attitude (RPY), and command signals with separate
98-
corner frequencies (6 Hz for translation, 8 Hz for rotation) and computes
99-
up to third-order time derivatives. All output keys are prefixed with
100-
``"SVF_"``.
92+
Filters position, attitude (RPY), and command signals with separate corner frequencies (6 Hz for
93+
translation, 8 Hz for rotation) and computes up to third-order time derivatives. All output
94+
keys are prefixed with ``"SVF_"``.
10195
10296
Args:
10397
data: Dict produced by [preprocessing][crazyflow.dynamics.utils.data_utils.preprocessing].
@@ -106,18 +100,17 @@ def derivatives_svf(data: dict[str, Array]) -> dict[str, Array]:
106100
Returns:
107101
The same dict with the following ``"SVF_"`` keys added:
108102
109-
* ``"SVF_pos"``, ``"SVF_vel"``, ``"SVF_acc"``, ``"SVF_jerk"``:
110-
Filtered position and its first three derivatives.
111-
* ``"SVF_rpy"``, ``"SVF_drpy"``, ``"SVF_ddrpy"``, ``"SVF_dddrpy"``:
112-
Filtered roll/pitch/yaw and its first three derivatives.
103+
* ``"SVF_pos"``, ``"SVF_vel"``, ``"SVF_acc"``, ``"SVF_jerk"``: Filtered position and its
104+
first three derivatives.
105+
* ``"SVF_rpy"``, ``"SVF_drpy"``, ``"SVF_ddrpy"``, ``"SVF_dddrpy"``: Filtered roll/pitch/yaw
106+
and its first three derivatives.
113107
* ``"SVF_quat"``: Quaternion computed from ``SVF_rpy``.
114108
* ``"SVF_z_axis"``: Body z-axis in world frame computed from ``SVF_rpy``.
115-
* ``"SVF_ang_vel"``, ``"SVF_ang_acc"``, ``"SVF_ang_jerk"``:
116-
Angular velocity/acceleration/jerk in body frame.
109+
* ``"SVF_ang_vel"``, ``"SVF_ang_acc"``, ``"SVF_ang_jerk"``: Angular
110+
velocity/acceleration/jerk in body frame.
117111
* ``"SVF_cmd_f"``: Filtered collective thrust command.
118112
* ``"SVF_cmd_rpy"``: Filtered roll/pitch/yaw command.
119-
* ``"SVF_eR"``, ``"SVF_eR_vec"``: Rotation error between actual and
120-
commanded attitude.
113+
* ``"SVF_eR"``, ``"SVF_eR_vec"``: Rotation error between actual and commanded attitude.
121114
"""
122115
# Important: Don't mix with unfiltered signals (also for input!)
123116
if data is None:

properdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ theme:
1616
- content.code.annotate
1717
- navigation.footer
1818
- navigation.indexes
19-
- navigation.sections
2019
- navigation.tabs
2120
- navigation.top
2221
- navigation.tracking

0 commit comments

Comments
 (0)