Cheetah Software
1.0
|
#include <ImuSimulator.h>
Public Member Functions | |
ImuSimulator (SimulatorControlParameters &simSettings, u64 seed=0) | |
void | updateVectornav (const FBModelState< T > &robotState, const FBModelStateDerivative< T > &robotStateD, VectorNavData *data) |
void | computeAcceleration (const FBModelState< T > &robotState, const FBModelStateDerivative< T > &robotStateD, Vec3< float > &acc, std::uniform_real_distribution< float > &dist, const RotMat< float > &R_body) |
void | updateCheaterState (const FBModelState< T > &robotState, const FBModelStateDerivative< T > &robotStateD, CheaterState< T > &state) |
Private Attributes | |
SimulatorControlParameters & | _simSettings |
std::mt19937 | _mt |
std::uniform_real_distribution< float > | _vectornavGyroDistribution |
std::uniform_real_distribution< float > | _vectornavAccelerometerDistribution |
std::uniform_real_distribution< float > | _vectornavQuatDistribution |
bool | _vectorNavOrientationNoise = false |
Definition at line 16 of file ImuSimulator.h.
|
inlineexplicit |
Definition at line 18 of file ImuSimulator.h.
void ImuSimulator< T >::computeAcceleration | ( | const FBModelState< T > & | robotState, |
const FBModelStateDerivative< T > & | robotStateD, | ||
Vec3< float > & | acc, | ||
std::uniform_real_distribution< float > & | dist, | ||
const RotMat< float > & | R_body | ||
) |
Definition at line 10 of file ImuSimulator.cpp.
References FBModelState< T >::bodyVelocity, FBModelStateDerivative< T >::dBodyVelocity, fillEigenWithRandom(), and spatial::spatialToLinearAcceleration().
void ImuSimulator< T >::updateCheaterState | ( | const FBModelState< T > & | robotState, |
const FBModelStateDerivative< T > & | robotStateD, | ||
CheaterState< T > & | state | ||
) |
Definition at line 74 of file ImuSimulator.cpp.
References CheaterState< T >::acceleration, FBModelState< T >::bodyOrientation, FBModelState< T >::bodyPosition, FBModelState< T >::bodyVelocity, FBModelStateDerivative< T >::dBodyVelocity, CheaterState< T >::omegaBody, CheaterState< T >::orientation, CheaterState< T >::position, ori::quaternionToRotationMatrix(), spatial::spatialToLinearAcceleration(), and CheaterState< T >::vBody.
void ImuSimulator< T >::updateVectornav | ( | const FBModelState< T > & | robotState, |
const FBModelStateDerivative< T > & | robotStateD, | ||
VectorNavData * | data | ||
) |
Definition at line 28 of file ImuSimulator.cpp.
References VectorNavData::accelerometer, FBModelState< T >::bodyOrientation, FBModelState< T >::bodyVelocity, f(), fillEigenWithRandom(), VectorNavData::gyro, ori::integrateQuat(), VectorNavData::quat, and ori::quaternionToRotationMatrix().
|
private |
Definition at line 50 of file ImuSimulator.h.
|
private |
Definition at line 49 of file ImuSimulator.h.
|
private |
Definition at line 52 of file ImuSimulator.h.
|
private |
Definition at line 51 of file ImuSimulator.h.
|
private |
Definition at line 54 of file ImuSimulator.h.
|
private |
Definition at line 53 of file ImuSimulator.h.