sim.physics
crazyflow.sim.physics
¶
Physics models for the simulation.
Classes¶
FirstPrinciplesData
¶
Attributes¶
J
instance-attribute
¶
Inertia matrix of the drone.
J_inv
instance-attribute
¶
Inverse of the inertia matrix of the drone.
L
instance-attribute
¶
Arm length of the drone.
drag_matrix
instance-attribute
¶
Drag matrix of the drone.
gravity_vec
instance-attribute
¶
Gravity vector of the drone.
mass
instance-attribute
¶
Mass of the drone.
mixing_matrix
instance-attribute
¶
Mixing matrix of the drone.
prop_inertia
instance-attribute
¶
Inertia of the propeller.
rotor_dyn_coef
instance-attribute
¶
Rotor speed dynamics time constant of the drone.
rpm2thrust
instance-attribute
¶
Force constant of the drone.
rpm2torque
instance-attribute
¶
Torque constant of the drone.
Functions¶
create(n_worlds, n_drones, drone_model, device)
staticmethod
¶
Create a default set of parameters for the simulation.
Source code in crazyflow/sim/physics.py
Physics
¶
Bases: str, Enum
Physics mode for the simulation.
SoRpyData
¶
Attributes¶
J
instance-attribute
¶
Inertia matrix of the drone.
J_inv
instance-attribute
¶
Inverse of the inertia matrix of the drone.
acc_coef
instance-attribute
¶
Coefficient for the acceleration.
cmd_f_coef
instance-attribute
¶
Coefficient for the collective thrust.
cmd_rpy_coef
instance-attribute
¶
Coefficient for the roll pitch yaw command dynamics.
gravity_vec
instance-attribute
¶
Gravity vector of the drone.
mass
instance-attribute
¶
Mass of the drone.
rpy_coef
instance-attribute
¶
Coefficient for the roll pitch yaw dynamics.
rpy_rates_coef
instance-attribute
¶
Coefficient for the roll pitch yaw rates dynamics.
Functions¶
create(n_worlds, n_drones, drone_model, device)
staticmethod
¶
Create a default set of parameters for the simulation.
Source code in crazyflow/sim/physics.py
SoRpyRotorData
¶
Attributes¶
J
instance-attribute
¶
Inertia matrix of the drone.
J_inv
instance-attribute
¶
Inverse of the inertia matrix of the drone.
acc_coef
instance-attribute
¶
Acceleration coefficient of the drone.
cmd_f_coef
instance-attribute
¶
Collective thrust coefficient of the drone.
cmd_rpy_coef
instance-attribute
¶
Roll pitch yaw command coefficient of the drone.
gravity_vec
instance-attribute
¶
Gravity vector of the drone.
mass
instance-attribute
¶
Mass of the drone.
rpy_coef
instance-attribute
¶
Roll pitch yaw coefficient of the drone.
rpy_rates_coef
instance-attribute
¶
Roll pitch yaw rates coefficient of the drone.
thrust_time_coef
instance-attribute
¶
Rotor coefficient of the drone.
Functions¶
create(n_worlds, n_drones, drone_model, device)
staticmethod
¶
Create a default set of parameters for the simulation.
Source code in crazyflow/sim/physics.py
SoRpyRotorDragData
¶
Attributes¶
J
instance-attribute
¶
Inertia matrix of the drone.
J_inv
instance-attribute
¶
Inverse of the inertia matrix of the drone.
acc_coef
instance-attribute
¶
Acceleration coefficient of the drone.
cmd_f_coef
instance-attribute
¶
Collective thrust coefficient of the drone.
cmd_rpy_coef
instance-attribute
¶
Roll pitch yaw command coefficient of the drone.
drag_matrix
instance-attribute
¶
Linear drag coefficient matrix of the drone.
gravity_vec
instance-attribute
¶
Gravity vector of the drone.
mass
instance-attribute
¶
Mass of the drone.
rpy_coef
instance-attribute
¶
Roll pitch yaw coefficient of the drone.
rpy_rates_coef
instance-attribute
¶
Roll pitch yaw rates coefficient of the drone.
thrust_time_coef
instance-attribute
¶
Rotor coefficient of the drone.
Functions¶
create(n_worlds, n_drones, drone_model, device)
staticmethod
¶
Create a default set of parameters for the simulation.
Source code in crazyflow/sim/physics.py
Functions¶
first_principles_physics(data)
¶
Compute the forces and torques from the first principle physics model.
Source code in crazyflow/sim/physics.py
so_rpy_physics(data)
¶
Compute the forces and torques from the so_rpy physics model.
Source code in crazyflow/sim/physics.py
so_rpy_rotor_drag_physics(data)
¶
Compute the forces and torques from the so_rpy_rotor_drag physics model.
Source code in crazyflow/sim/physics.py
so_rpy_rotor_physics(data)
¶
Compute the forces and torques from the so_rpy_rotor physics model.