19 double imuStatic = 0.1,
20 double imuDynamic = 0.9,
21 double itimestep = 0.01);
38 double step(
double itorque);
52 std::function<
double(
double angle,
double mass,
double linkLength)> itorqueFunc);
double getMaxTorque() const
Returns the maximum torque input.
double step()
Step the simulation by the timestep.
void setMass(double imass)
Sets the mass (kg).
void setTorque(double itorque)
Sets the input torque.
double getOmega() const
Returns the current omgea (angular velocity in rad / sec).
void setExternalTorqueFunction(std::function< double(double angle, double mass, double linkLength)> itorqueFunc)
Sets the torque function used to calculate the torque due to external forces.
void setMaxTorque(double imaxTorque)
Sets the max torque.
virtual ~FlywheelSimulator()
double getAngle() const
Returns the current angle (angle in rad).
void setLinkLength(double ilinkLen)
Sets the link length (m).
double step(double itorque)
Step the simulation by the timestep.
void setStaticFriction(double imuStatic)
Sets the static friction (N*m).
virtual double stepImpl()
std::function< double(double, double, double)> torqueFunc
FlywheelSimulator(double imass=0.01, double ilinkLen=1, double imuStatic=0.1, double imuDynamic=0.9, double itimestep=0.01)
A simulator for an inverted pendulum.
void setTimestep(double itimestep)
Sets the timestep (sec).
void setDynamicFriction(double imuDynamic)
Sets the dynamic friction (N*m).
void setAngle(double iangle)
Sets the current angle.
double getAcceleration() const
Returns the current acceleration (angular acceleration in rad / sec^2).