bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
quadrotor_flight_controller.h
Go to the documentation of this file.
1#ifndef BITSIM_CONTROL_QUADROTOR_FLIGHT_CONTROLLER_H
2#define BITSIM_CONTROL_QUADROTOR_FLIGHT_CONTROLLER_H
3
7
8namespace bitsim
9{
10namespace control
11{
12
28RealVec quadrotor_mixer(const dynamics::QuadrotorDynamicsConfig &config, real_t thrust,
29 const RealColVec3d &tau, real_t max_rotor_speed);
30
52{
53 public:
63
66 const Parameters &parameters);
67
71 RealVec rotor_speeds(const RCCommand &command,
72 const dynamics::QuadrotorDynamics &quadrotor) const;
73
77 real_t hover_throttle() const noexcept { return 1.0 / p_.thrust_to_weight; }
78
82 real_t max_rotor_speed() const noexcept { return max_rotor_speed_; }
83
84 const Parameters &parameters() const noexcept { return p_; }
85
86 private:
88 Parameters p_;
89 real_t max_thrust_;
90 real_t max_rotor_speed_;
91};
92
93} // namespace control
94} // namespace bitsim
95
96#endif // BITSIM_CONTROL_QUADROTOR_FLIGHT_CONTROLLER_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
real_t max_rotor_speed() const noexcept
The fastest the rotors spin [rad/s], at full throttle.
Definition quadrotor_flight_controller.h:82
RealVec rotor_speeds(const RCCommand &command, const dynamics::QuadrotorDynamics &quadrotor) const
The rotor speeds [rad/s] for the command and the state of the quadrotor.
Definition quadrotor_flight_controller.cpp:55
const Parameters & parameters() const noexcept
Definition quadrotor_flight_controller.h:84
QuadrotorFlightController(const dynamics::QuadrotorDynamicsConfig &config)
Definition quadrotor_flight_controller.cpp:36
real_t hover_throttle() const noexcept
The throttle whose thrust carries the weight: 1 / thrust_to_weight.
Definition quadrotor_flight_controller.h:77
The QuadrotorDynamics class. Implements quadrotor dynamics The implementation of this class follows t...
Definition quadrotor_dynamics.h:134
RealVec quadrotor_mixer(const dynamics::QuadrotorDynamicsConfig &config, real_t thrust, const RealColVec3d &tau, real_t max_rotor_speed)
The rotor speeds [rad/s] of a plus quadrotor (see dynamics::QuadrotorDynamics) that give the thrust T...
Definition quadrotor_flight_controller.cpp:13
Controllers: PID controllers, line following, a quadrotor flight controller, a fixed wing autopilot,...
Definition control_module.h:18
Definition dc_motor_backend_base.h:9
DynVec< real_t > RealVec
double precision floating point vector
Definition bitsim_types.h:111
double real_t
real_t
Definition bitsim_types.h:20
Eigen::Vector3d RealColVec3d
3D column vector
Definition bitsim_types.h:137
Definition quadrotor_flight_controller.h:55
real_t thrust_to_weight
the most the rotors can lift, in weights
Definition quadrotor_flight_controller.h:58
real_t yaw_rate_gain
of the yaw rate loop [1/s]
Definition quadrotor_flight_controller.h:61
real_t max_tilt
[rad] at full roll or pitch stick, 25 degrees
Definition quadrotor_flight_controller.h:56
real_t max_yaw_rate
[rad/s] at full yaw stick, 120 deg/s
Definition quadrotor_flight_controller.h:57
real_t attitude_frequency
of the angle loops [rad/s]
Definition quadrotor_flight_controller.h:59
real_t attitude_damping
of the angle loops
Definition quadrotor_flight_controller.h:60
What the sticks of a radio transmitter for a quadrotor say, as a toy drone's transmitter sends them: ...
Definition rc_command.h:20
Definition quadrotor_dynamics.h:13