|
bitsim
Model, simulate, estimate and control robots in C++
|
A double pendulum in Chrono: two uniform rods, the upper one hanging from a pivot at the origin and the lower one from the end of the upper one, swinging in the x-z plane under gravity, -z. More...
#include <double_pendulum_system.h>
Public Member Functions | |
| DoublePendulumSystem (const DoublePendulumProperties &props={}, real_t theta1=0.0, real_t theta2=0.0) | |
| void | step (real_t dt) |
| Advance the simulation by dt [s]. | |
| std::array< real_t, 2 > | angles () const |
| std::array< real_t, 2 > | angular_velocities () const |
| real_t | energy () const |
| real_t | time () const |
| const DoublePendulumProperties & | properties () const noexcept |
| chrono::ChSystemNSC & | system () noexcept |
| The Chrono system, to draw it. | |
A double pendulum in Chrono: two uniform rods, the upper one hanging from a pivot at the origin and the lower one from the end of the upper one, swinging in the x-z plane under gravity, -z.
The angles are those of the links from the downward vertical, positive towards +x: \(\theta = 0\) hangs straight down. There is no friction in the joints.
|
explicit |
| props | The links |
| theta1 | The angle of the upper link to start from [rad] |
| theta2 | The angle of the lower link to start from [rad] |
| std::array< real_t, 2 > bitsim::systems::DoublePendulumSystem::angles | ( | ) | const |
| std::array< real_t, 2 > bitsim::systems::DoublePendulumSystem::angular_velocities | ( | ) | const |
| real_t bitsim::systems::DoublePendulumSystem::energy | ( | ) | const |
|
inlinenoexcept |
| void bitsim::systems::DoublePendulumSystem::step | ( | real_t | dt | ) |
Advance the simulation by dt [s].
|
inlinenoexcept |
The Chrono system, to draw it.
|
inline |