|
bitsim
Model, simulate, estimate and control robots in C++
|
Classes | |
| struct | Path |
| struct | Drone |
| struct | Options |
| class | QuadrotorFlightController |
| The flight controller of a toy quadrotor in angle mode: it turns the sticks of an RCCommand into rotor speeds. More... | |
| struct | RCCommand |
| What the sticks of a radio transmitter for a quadrotor say, as a toy drone's transmitter sends them: the throttle and three sticks, and whether the motors are armed. More... | |
| class | QuadrotorDynamics |
| The QuadrotorDynamics class. Implements quadrotor dynamics The implementation of this class follows the System Modeling section at https://wilselby.com/research/arducopter/modeling/ and https://scholarsarchive.byu.edu/cgi/viewcontent.cgi?article=2324&context=facpub The quadrotor is assumed to have four rotors Each rotor consists of a brushless DC motor and rotor with a fixed pitch. It is assumed that the quadrotor can move in 6 degrees of freedom; 3-translational and 3-rotational, The motion of the quadrotor is controlled via 4 inputs namely the speeds of the 4 motors. The quadrotor model that this class implements assumes the following: More... | |
| struct | QuadrotorDynamicsConfig |
| class | SysState |
| SysState utility class describing the state of a system. More... | |
Typedefs | |
| using | index_t |
| The type Eigen indexes and sizes matrices and vectors with. | |
| using | real_t |
| real_t | |
| using | RealColVec3d |
| 3D column vector | |
| using | RealMat3d |
| 3×3 matrix of type double. | |
| using | RealVec |
| double precision floating point vector | |
| using | uint_t |
| uint_t | |
| using | Matrix |
| The matrices of the linear models and the controllers. | |
| using | Vector |
| The vectors of the linear models and the controllers: states, inputs. | |
Functions | |
| QuadrotorDynamicsConfig | quadrotor_config () |
| SysState< 12 > | to_state (const Vector &x) |
| Vector | to_vector (const SysState< 12 > &state) |
| RealVec | mix (const QuadrotorDynamicsConfig &config, const Vector &u, real_t max_rotor_speed) |
| Vector | step (const QuadrotorDynamicsConfig &config, const Vector &x, const Vector &u, real_t max_rotor_speed) |
| bitsim::control::DiscreteLinearModel | linearise (const QuadrotorDynamicsConfig &config, const Vector &hover, const Vector &u_hover, real_t max_rotor_speed) |
| RealMat3d | body_to_world (real_t yaw, real_t pitch, real_t roll) |
| RCCommand | position_loop (const Drone &drone, const RealColVec3d &target, const RealColVec3d &target_velocity, const QuadrotorFlightController &controller) |
| int | run (const Options &options) |
Variables | |
| const real_t | G = bitsim::consts::maths::G |
| const real_t | STEP_SIZE = 0.001 |
| const real_t | CONTROL_PERIOD = 0.01 |
| const uint_t | SUB_STEPS = 10 |
| const real_t | SPEED = 1.0 |
| const real_t | START = 2.0 |
| const real_t | PUSH_AT = 22.0 |
| const real_t | PUSH = 2.0 |
| const real_t | DURATION = 28.0 |
| const real_t | SEPARATION = 2.5 |
| const real_t | PRINT_PERIOD = 2.0 |
| const real_t | RENDER_RATE = 30.0 |
| const real_t | RECORD_RATE = 10.0 |
| const std::array< const char *, 12 > | NAMES |
| using bitsim::index_t |
The type Eigen indexes and sizes matrices and vectors with.
| using bitsim::control::Matrix |
The matrices of the linear models and the controllers.
| using bitsim::real_t |
| using bitsim::RealColVec3d |
3D column vector
| using bitsim::RealMat3d |
3×3 matrix of type double.
| using bitsim::RealVec |
double precision floating point vector
| using bitsim::uint_t |
| using bitsim::control::Vector |
The vectors of the linear models and the controllers: states, inputs.
| bitsim::control::DiscreteLinearModel quadrotor_lqr::linearise | ( | const QuadrotorDynamicsConfig & | config, |
| const Vector & | hover, | ||
| const Vector & | u_hover, | ||
| real_t | max_rotor_speed ) |
| RealVec quadrotor_lqr::mix | ( | const QuadrotorDynamicsConfig & | config, |
| const Vector & | u, | ||
| real_t | max_rotor_speed ) |
| RCCommand quadrotor_lqr::position_loop | ( | const Drone & | drone, |
| const RealColVec3d & | target, | ||
| const RealColVec3d & | target_velocity, | ||
| const QuadrotorFlightController & | controller ) |
| QuadrotorDynamicsConfig quadrotor_lqr::quadrotor_config | ( | ) |
| int quadrotor_lqr::run | ( | const Options & | options | ) |
| Vector quadrotor_lqr::step | ( | const QuadrotorDynamicsConfig & | config, |
| const Vector & | x, | ||
| const Vector & | u, | ||
| real_t | max_rotor_speed ) |
| const real_t quadrotor_lqr::CONTROL_PERIOD = 0.01 |
| const real_t quadrotor_lqr::DURATION = 28.0 |
| const real_t quadrotor_lqr::G = bitsim::consts::maths::G |
| const std::array<const char *, 12> quadrotor_lqr::NAMES |
| const real_t quadrotor_lqr::PRINT_PERIOD = 2.0 |
| const real_t quadrotor_lqr::PUSH = 2.0 |
| const real_t quadrotor_lqr::PUSH_AT = 22.0 |
| const real_t quadrotor_lqr::RECORD_RATE = 10.0 |
| const real_t quadrotor_lqr::RENDER_RATE = 30.0 |
| const real_t quadrotor_lqr::SEPARATION = 2.5 |
| const real_t quadrotor_lqr::SPEED = 1.0 |
| const real_t quadrotor_lqr::START = 2.0 |
| const real_t quadrotor_lqr::STEP_SIZE = 0.001 |
| const uint_t quadrotor_lqr::SUB_STEPS = 10 |