Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
uuv_plume_model.plume.Plume Class Reference
Inheritance diagram for uuv_plume_model.plume.Plume:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, source_pos, n_points, start_time)
 
def apply_constraints (self)
 
def get_contraints_filter (self)
 
def get_markers (self)
 
def get_point_cloud_as_msg (self)
 
def n_points (self)
 
def num_particles (self)
 
def points (self)
 
def reset_plume (self)
 
def set_n_points (self, n_points)
 
def set_plume_particles (self, t, x, y, z, time_creation)
 
def set_x_lim (self, min_value, max_value)
 
def set_y_lim (self, min_value, max_value)
 
def set_z_lim (self, min_value, max_value)
 
def source_pos (self)
 
def source_pos (self, new_pos)
 
def time_of_creation (self)
 
def update (self, t=0.0)
 
def update_current_vel (self, vel)
 
def x (self)
 
def x_lim (self)
 
def y (self)
 
def y_lim (self)
 
def z (self)
 
def z_lim (self)
 

Static Public Member Functions

def create_plume_model (tag, args)
 

Static Public Attributes

string LABEL = ''
 

Private Attributes

 _current_vel
 
 _dt
 
 _n_points
 
 _pnts
 
 _source_pos
 
 _start_time
 
 _t
 
 _time_creation
 
 _x_lim
 
 _y_lim
 
 _z_lim
 

Detailed Description

Base class for plume model classes. Plume models should inherit this class
and implement the update function to maintain a standard interface with the
plume server. Each new inherited plume model must have an unique *LABEL*
tag, since it will be used by the factory method to create plume models
without the need to import all the plume model class files.

Definition at line 24 of file plume.py.

Constructor & Destructor Documentation

def uuv_plume_model.plume.Plume.__init__ (   self,
  source_pos,
  n_points,
  start_time 
)
Plume class constructor, abstract class for plume model classes.

> **Parameters**

* `source_pos` (*type:* `list`): 3D position of the plume source
wrt ENU frame
* `n_points` (*type:* `int`): maximum number of plume particles to
be generated
* `start_time (*type:* `float): time stamp of time of the creation of 
the plume model in seconds. This will be used to compute the relative
time of creation of each particle

Definition at line 34 of file plume.py.

Member Function Documentation

def uuv_plume_model.plume.Plume.apply_constraints (   self)
Truncate the position of the particle to the closest bounding box limit
if the particle is positioned outside of the limits.

Definition at line 328 of file plume.py.

def uuv_plume_model.plume.Plume.create_plume_model (   tag,
  args 
)
static
Factory function to create the plume model using the LABEL 
attribute as identifier.

> **Parameters**

* `tag` (*type:* `str`): label of the plume model to be created
* `args`: list of input arguments for the specific plume model to be created

Definition at line 80 of file plume.py.

def uuv_plume_model.plume.Plume.get_contraints_filter (   self)
Return a binary vector of $N$ elements, $N$ being current number of
particles created. The $i$-th element is set to False if the $i$-th
particle finds itself outside of the bounding box limits.

> **Returns**

Logical vector with elements set to *True* if they fulfill the constraints.

Definition at line 297 of file plume.py.

def uuv_plume_model.plume.Plume.get_markers (   self)
Return a ROS marker array message structure with an sphere marker to
represent the plume source, the bounding box and an arrow marker to
show the direction of the current velocity if it's norm is greater
than zero.

> **Returns**

`visualizaton_msgs/MarkerArray` message with markers for the current 
velocity arrow and source position or `None` if no plume particles are
found.

Definition at line 396 of file plume.py.

def uuv_plume_model.plume.Plume.get_point_cloud_as_msg (   self)
Return a ROS point cloud sensor message with the points representing
the plume's particles and one channel containing the time of creation
for each particle.

> **Returns**

The plume particles as a `sensor_msgs/PointCloud` message or `None` 
if no particles are found.

Definition at line 367 of file plume.py.

def uuv_plume_model.plume.Plume.n_points (   self)
Return the maximum number of points to be created by the plume model.

Definition at line 183 of file plume.py.

def uuv_plume_model.plume.Plume.num_particles (   self)
Return the current number of particles.

Definition at line 189 of file plume.py.

def uuv_plume_model.plume.Plume.points (   self)
Return list of `[N x 3]` position vectors for particles created.

Definition at line 177 of file plume.py.

def uuv_plume_model.plume.Plume.reset_plume (   self)
Reset point cloud and time of creating vectors.

Definition at line 292 of file plume.py.

def uuv_plume_model.plume.Plume.set_n_points (   self,
  n_points 
)
Set the maximum number of points to be created by the plume model.

> **Parameters**

* n_points (*type: `int`): number maximum of particles (must be greater 
than zero).

Definition at line 196 of file plume.py.

def uuv_plume_model.plume.Plume.set_plume_particles (   self,
  t,
  x,
  y,
  z,
  time_creation 
)
Set the plume particles with the input coordinates wrt ENU frame
and time of creation vector in seconds.

> **Parameters**

* `t` (*type:* `float`): Current time stamp in seconds
* `x` (*type:* `list`): List of X coordinates for the plume particles' positions
* `y` (*type:* `list`): List of Y coordinates for the plume particles' positions
* `z` (*type:* `list`): List of Z coordinates for the plume particles' positions
* `time_creation`(*type:* `list`): List of the relative time of creation for 
each particle in seconds

Definition at line 343 of file plume.py.

def uuv_plume_model.plume.Plume.set_x_lim (   self,
  min_value,
  max_value 
)
Set the X limits for the plume bounding box. The bounding box is
defined with respect to the ENU inertial frame.

> **Parameters**

* `min_value` (*type:* `float`): lower limit for the bounding box over the X axis.
* `max_value` (*type:* `float`): upper limit for the bounding box over the X axis.

> **Returns**

`True` if limits are valid.

Definition at line 221 of file plume.py.

def uuv_plume_model.plume.Plume.set_y_lim (   self,
  min_value,
  max_value 
)
Set the Y limits for the plume bounding box. The bounding box is
defined with respect to the ENU inertial frame.

> **Parameters**

* `min_value` (*type:* `float`): lower limit for the bounding box over the Y axis.
* `max_value` (*type:* `float`): upper limit for the bounding box over the Y axis.

> **Returns**

`True` if limits are valid.

Definition at line 244 of file plume.py.

def uuv_plume_model.plume.Plume.set_z_lim (   self,
  min_value,
  max_value 
)
Set the Z limits for the plume bounding box. The bounding box is
defined with respect to the ENU inertial frame.

> **Parameters**

* `min_value` (*type:* `float`): lower limit for the bounding box over the Z axis.
* `max_value` (*type:* `float`): upper limit for the bounding box over the Z axis.

> **Returns**

`True` if limits are valid.

Definition at line 267 of file plume.py.

def uuv_plume_model.plume.Plume.source_pos (   self)
Return the position vector with the Cartesian coordinates 
for the plume source

Definition at line 95 of file plume.py.

def uuv_plume_model.plume.Plume.source_pos (   self,
  new_pos 
)
Set new plume source position.

> **Parameters**

* `new_pos`(*type:* `list`): 3D coordinates of the plume
source wrt ENU frame

Definition at line 102 of file plume.py.

def uuv_plume_model.plume.Plume.time_of_creation (   self)
Return the time of creation vector.

Definition at line 150 of file plume.py.

def uuv_plume_model.plume.Plume.update (   self,
  t = 0.0 
)
Plume dynamics update function. It must be implemented by the child
class and will be used by the plume server to update the position of
the plume particles at each iteration.

Definition at line 511 of file plume.py.

def uuv_plume_model.plume.Plume.update_current_vel (   self,
  vel 
)
Update the current velocity vector.

> **Parameters**

* `vel` (*type:* `list` or `numpy.array`): current velocity vector 
containing three elements $(u, v, w)$.

Definition at line 211 of file plume.py.

def uuv_plume_model.plume.Plume.x (   self)
Return only the X coordinates for the particle positions.

Definition at line 128 of file plume.py.

def uuv_plume_model.plume.Plume.x_lim (   self)
Return the lower and upper limit for the bounding box on the X axis.

Definition at line 136 of file plume.py.

def uuv_plume_model.plume.Plume.y (   self)
Return only the Y coordinates for the particle positions.

Definition at line 142 of file plume.py.

def uuv_plume_model.plume.Plume.y_lim (   self)
Return the lower and upper limit for the bounding box on the Y axis.

Definition at line 157 of file plume.py.

def uuv_plume_model.plume.Plume.z (   self)
Return only the Z coordinates for the particle positions.

Definition at line 163 of file plume.py.

def uuv_plume_model.plume.Plume.z_lim (   self)
Return the lower and upper limit for the bounding box on the Z axis.

Definition at line 171 of file plume.py.

Member Data Documentation

uuv_plume_model.plume.Plume._current_vel
private

Definition at line 77 of file plume.py.

uuv_plume_model.plume.Plume._dt
private

Definition at line 75 of file plume.py.

uuv_plume_model.plume.Plume._n_points
private

Definition at line 69 of file plume.py.

uuv_plume_model.plume.Plume._pnts
private

Definition at line 55 of file plume.py.

uuv_plume_model.plume.Plume._source_pos
private

Definition at line 67 of file plume.py.

uuv_plume_model.plume.Plume._start_time
private

Definition at line 73 of file plume.py.

uuv_plume_model.plume.Plume._t
private

Definition at line 71 of file plume.py.

uuv_plume_model.plume.Plume._time_creation
private

Definition at line 58 of file plume.py.

uuv_plume_model.plume.Plume._x_lim
private

Definition at line 62 of file plume.py.

uuv_plume_model.plume.Plume._y_lim
private

Definition at line 63 of file plume.py.

uuv_plume_model.plume.Plume._z_lim
private

Definition at line 64 of file plume.py.

string uuv_plume_model.plume.Plume.LABEL = ''
static

Definition at line 32 of file plume.py.


The documentation for this class was generated from the following file:


uuv_plume_simulator
Author(s): Musa Morena Marcusso Manhaes
autogenerated on Mon Jun 10 2019 15:41:28