DUNE: Uniform Navigational Environment
2017.01.0
|
Object properties.
Public Types | |
enum | Type { OBJECT, VEHICLE, UUV, UAV, USV, UGV } |
Public Member Functions | |
Object (void) | |
virtual | ~Object (void) |
void | setMassProp (double m, double inertia[6]) |
void | setLinearDragCoef (double coefs[10]) |
void | setQuadraticDragCoef (double coefs[10]) |
void | setIntegrationMethod (bool method) |
virtual void | insertInWorld (void) |
virtual void | setPosition (double x, double y, double z) |
virtual void | setOrientation (double roll, double pitch, double yaw) |
double * | getPosition (void) |
double * | getOrientation (void) |
double * | getLinearVelocity (void) |
double * | getAngularVelocity (void) |
void | applyDragForces (void) |
virtual void | applyForces (void) |
void | addForces (double X, double Y, double Z, double P, double Q, double R) |
void | resetForces (void) |
void | update (double timestep) |
Protected Attributes | |
double | m_mass |
double | m_inertia [6] |
double | m_position [3] |
double | m_orientation [3] |
double | m_linear_velocity [3] |
double | m_angular_velocity [3] |
Vehicle type.
Enumerator | |
---|---|
OBJECT | |
VEHICLE | |
UUV | |
UAV | |
USV | |
UGV |
Simulators::VSIM::Object::Object | ( | void | ) |
Constructor.
References m_angular_velocity, m_inertia, m_linear_velocity, m_mass, m_orientation, and m_position.
|
inlinevirtual |
Destructor.
void Simulators::VSIM::Object::addForces | ( | double | X, |
double | Y, | ||
double | Z, | ||
double | P, | ||
double | Q, | ||
double | R | ||
) |
Add Forces to be applied to the Object.
[in] | X | force along the x-axis. |
[in] | Y | force along the y-axis. |
[in] | Z | force along the z-axis. |
[in] | P | torque along the x-axis. |
[in] | Q | torque along the y-axis. |
[in] | R | torque along the z-axis. |
Referenced by Simulators::VSIM::ASV::applyAsvActuation(), Simulators::VSIM::Vehicle::applyControlForces(), Simulators::VSIM::UUV::applyCoriolisForce(), and applyDragForces().
void Simulators::VSIM::Object::applyDragForces | ( | void | ) |
Applies drag forces actuacting on the object.
References addForces(), m_angular_velocity, and m_linear_velocity.
Referenced by Simulators::VSIM::ASV::applyForces(), Simulators::VSIM::Vehicle::applyForces(), Simulators::VSIM::UUV::applyForces(), and applyForces().
|
virtual |
Apply all object's forces.
Reimplemented in Simulators::VSIM::UUV, Simulators::VSIM::Vehicle, and Simulators::VSIM::ASV.
References applyDragForces().
|
inline |
Retrieve object's angular velocity (world referencial 3x1 vector).
References m_angular_velocity.
Referenced by Simulators::VSIM::Task::task().
|
inline |
Retrieve object's linear velocity (vehicle referencial 3x1 vector).
References m_linear_velocity.
Referenced by Simulators::VSIM::Task::task().
|
inline |
Returns orientation vector [roll, pitch, yaw].
References m_orientation.
Referenced by Simulators::VSIM::Task::task().
|
inline |
Returns position vector [X,Y,Z].
References m_position.
Referenced by Simulators::VSIM::Task::task().
|
virtual |
Insert object in virtual World.
References m_orientation, m_position, setOrientation(), and setPosition().
Referenced by Simulators::VSIM::World::addObject(), and Simulators::VSIM::World::addVehicle().
void Simulators::VSIM::Object::resetForces | ( | void | ) |
Reset Forces applied to Object for the next iteration.
Referenced by Simulators::VSIM::Factory::produceVehicle(), and update().
|
inline |
Define integration method to be applied in update() function.
[in] | method | integration method. |
Referenced by Simulators::VSIM::Factory::produceVehicle().
void Simulators::VSIM::Object::setLinearDragCoef | ( | double | coefs[10] | ) |
Set linear drag coefficients.
[in] | coefs | linear drag coefficients. |
Referenced by Simulators::VSIM::Factory::produceVehicle().
void Simulators::VSIM::Object::setMassProp | ( | double | m, |
double | inertia[6] | ||
) |
Sets Mass and Inertial and Added Mass Matrix (diagonal).
[in] | m | mass. |
[in] | inertia | inertia matrix diagonal values. |
References m_inertia, and m_mass.
Referenced by Simulators::VSIM::Factory::produceVehicle().
|
virtual |
Define object inertial orientation.
[in] | roll | object roll orientation. |
[in] | pitch | object pitch orientation. |
[in] | yaw | object yaw orientation. |
References m_orientation.
Referenced by Simulators::VSIM::Task::consume(), and insertInWorld().
|
virtual |
Define object inertial position.
[in] | x | object position in the x-axis. |
[in] | y | object position in the y-axis. |
[in] | z | object position in the z-axis. |
References m_position.
Referenced by Simulators::VSIM::Task::consume(), and insertInWorld().
void Simulators::VSIM::Object::setQuadraticDragCoef | ( | double | coefs[10] | ) |
Set quadratic drag coefficients.
[in] | coefs | quadratic drag coefficients. |
Referenced by Simulators::VSIM::Factory::produceVehicle().
void Simulators::VSIM::Object::update | ( | double | timestep | ) |
Fetch object position, orientation & velocity from physics engine.
[in] | timestep | integration timestep. |
References m_angular_velocity, m_inertia, m_linear_velocity, m_orientation, m_position, and resetForces().
|
protected |
Object angular velocity (body-fixed reference frame).
Referenced by Simulators::VSIM::UUV::applyCoriolisForce(), applyDragForces(), getAngularVelocity(), Object(), and update().
|
protected |
Inertia matrix.
Referenced by Simulators::VSIM::UUV::applyCoriolisForce(), Object(), setMassProp(), and update().
|
protected |
Object linear velocity (body-fixed reference frame).
Referenced by Simulators::VSIM::Vehicle::applyControlForces(), Simulators::VSIM::UUV::applyCoriolisForce(), applyDragForces(), getLinearVelocity(), Object(), and update().
|
protected |
Object's mass.
Referenced by Simulators::VSIM::UUV::applyCoriolisForce(), Object(), and setMassProp().
|
protected |
Object orientation.
Referenced by getOrientation(), insertInWorld(), Object(), setOrientation(), and update().
|
protected |
Object position.
Referenced by Simulators::VSIM::Vehicle::applyControlForces(), getPosition(), insertInWorld(), Object(), setPosition(), and update().