DUNE: Uniform Navigational Environment  2.5.1
Simulators::VSIM::Object Class Reference

Detailed Description

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]
 

Member Enumeration Documentation

Vehicle type.

Enumerator
OBJECT 
VEHICLE 
UUV 
UAV 
USV 
UGV 

Constructor & Destructor Documentation

Simulators::VSIM::Object::Object ( void  )
virtual Simulators::VSIM::Object::~Object ( void  )
inlinevirtual

Destructor.

Member Function Documentation

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.

Parameters
[in]Xforce along the x-axis.
[in]Yforce along the y-axis.
[in]Zforce along the z-axis.
[in]Ptorque along the x-axis.
[in]Qtorque along the y-axis.
[in]Rtorque 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  )
void Simulators::VSIM::Object::applyForces ( void  )
virtual

Apply all object's forces.

Reimplemented in Simulators::VSIM::UUV, Simulators::VSIM::Vehicle, and Simulators::VSIM::ASV.

References applyDragForces().

double* Simulators::VSIM::Object::getAngularVelocity ( void  )
inline

Retrieve object's angular velocity (world referencial 3x1 vector).

Returns
pointer to object angular velocity.

References m_angular_velocity.

Referenced by Simulators::VSIM::Task::task().

double* Simulators::VSIM::Object::getLinearVelocity ( void  )
inline

Retrieve object's linear velocity (vehicle referencial 3x1 vector).

Returns
pointer to object linear velocity.

References m_linear_velocity.

Referenced by Simulators::VSIM::Task::task().

double* Simulators::VSIM::Object::getOrientation ( void  )
inline

Returns orientation vector [roll, pitch, yaw].

Returns
pointer to object orientation

References m_orientation.

Referenced by Simulators::VSIM::Task::task().

double* Simulators::VSIM::Object::getPosition ( void  )
inline

Returns position vector [X,Y,Z].

Returns
pointer to object position.

References m_position.

Referenced by Simulators::VSIM::Task::task().

void Simulators::VSIM::Object::insertInWorld ( void  )
virtual
void Simulators::VSIM::Object::resetForces ( void  )

Reset Forces applied to Object for the next iteration.

Referenced by Simulators::VSIM::Factory::produceVehicle(), and update().

void Simulators::VSIM::Object::setIntegrationMethod ( bool  method)
inline

Define integration method to be applied in update() function.

Parameters
[in]methodintegration method.

Referenced by Simulators::VSIM::Factory::produceVehicle().

void Simulators::VSIM::Object::setLinearDragCoef ( double  coefs[10])

Set linear drag coefficients.

Parameters
[in]coefslinear 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).

Parameters
[in]mmass.
[in]inertiainertia matrix diagonal values.

References m_inertia, and m_mass.

Referenced by Simulators::VSIM::Factory::produceVehicle().

void Simulators::VSIM::Object::setOrientation ( double  roll,
double  pitch,
double  yaw 
)
virtual

Define object inertial orientation.

Parameters
[in]rollobject roll orientation.
[in]pitchobject pitch orientation.
[in]yawobject yaw orientation.

References m_orientation.

Referenced by Simulators::VSIM::Task::consume(), and insertInWorld().

void Simulators::VSIM::Object::setPosition ( double  x,
double  y,
double  z 
)
virtual

Define object inertial position.

Parameters
[in]xobject position in the x-axis.
[in]yobject position in the y-axis.
[in]zobject 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.

Parameters
[in]coefsquadratic drag coefficients.

Referenced by Simulators::VSIM::Factory::produceVehicle().

void Simulators::VSIM::Object::update ( double  timestep)

Fetch object position, orientation & velocity from physics engine.

Parameters
[in]timestepintegration timestep.

References m_angular_velocity, m_inertia, m_linear_velocity, m_orientation, m_position, and resetForces().

Member Data Documentation

double Simulators::VSIM::Object::m_angular_velocity[3]
protected

Object angular velocity (body-fixed reference frame).

Referenced by Simulators::VSIM::UUV::applyCoriolisForce(), applyDragForces(), getAngularVelocity(), Object(), and update().

double Simulators::VSIM::Object::m_inertia[6]
protected
double Simulators::VSIM::Object::m_linear_velocity[3]
protected
double Simulators::VSIM::Object::m_mass
protected
double Simulators::VSIM::Object::m_orientation[3]
protected
double Simulators::VSIM::Object::m_position[3]
protected
Collaboration diagram for Simulators::VSIM::Object:
Collaboration graph