Public Member Functions | Private Attributes
rail::spatial_temporal_learning::worldlib::world::Object Class Reference

Object configuration information. More...

#include <Object.h>

Inheritance diagram for rail::spatial_temporal_learning::worldlib::world::Object:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addAlias (const std::string &alias)
 Alias adder.
bool checkName (const std::string &name) const
 Name check.
geometry::Position fromParentFrame (const geometry::Position &position) const
 Position transform.
geometry::Pose fromParentFrame (const geometry::Pose &pose) const
 Pose transform.
const std::string & getAlias (const size_t index) const
 Alias value accessor.
const std::vector< std::string > & getAliases () const
 Aliases value accessor.
double getDepth () const
 Depth value accessor.
const std::string & getFrameID () const
 Frame ID value accessor.
double getHeight () const
 Height value accessor.
const std::string & getName () const
 Name value accessor.
size_t getNumAliases () const
 Aliases size accessor.
const geometry::PosegetPose () const
 Pose value accessor (immutable).
geometry::PosegetPose ()
 Pose value accessor.
double getWidth () const
 Width value accessor.
 Object (const std::string &name="", const std::string &frame_id="", const geometry::Pose &pose=geometry::Pose(), const double width=0, const double depth=0, const double height=0)
 Create a new Object.
void removeAlias (const size_t index)
 Alias remover.
void setDepth (const double depth)
 Depth value mutator.
void setFrameID (const std::string &frame_id)
 Frame ID value mutator.
void setHeight (const double height)
 Height value mutator.
void setName (const std::string &name)
 Name value mutator.
void setPose (geometry::Pose &pose)
 Pose value mutator.
void setWidth (const double width)
 Width value mutator.

Private Attributes

std::vector< std::string > aliases_
double depth_
std::string frame_id_
double height_
std::string name_
geometry::Pose pose_
double width_

Detailed Description

Object configuration information.

An object is an abstract entity in the world. Objects can be mutable entities (e.g., manipulable items) or immutable entities (e.g., surfaces and furniture). Objects can have an array of associated aliases associated with their main name.

Definition at line 40 of file Object.h.


Constructor & Destructor Documentation

Object::Object ( const std::string &  name = "",
const std::string &  frame_id = "",
const geometry::Pose pose = geometry::Pose(),
const double  width = 0,
const double  depth = 0,
const double  height = 0 
)

Create a new Object.

Create a new Object with the given name, frame ID, Pose (in reference to the parent's frame ID), and dimensions.

Parameters:
nameThe name of the Object (defaults to the empty string).
frame_idThe frame ID of the Object (defaults to the empty string).
poseThe Pose of the Object with respect to the parent frame (defaults to 0 Pose).
widthThe width of the Object (along the x-axis) (defaults to 0).
depthThe width of the Object (along the y-axis) (defaults to 0).
heightThe height of the Object (along the z-axis) (defaults to 0).

Definition at line 23 of file Object.cpp.


Member Function Documentation

void Object::addAlias ( const std::string &  alias)

Alias adder.

Add the alias to this Object.

Parameters:
aliasThe new alias to add to this Object.

Definition at line 118 of file Object.cpp.

bool Object::checkName ( const std::string &  name) const

Name check.

Check if this object goes by the given name by checking both the default name and aliases. Case is not important.

Parameters:
nameThe name to check,
Returns:
Returns true if the name or any of the aliases of this object match the given name.

Definition at line 135 of file Object.cpp.

Position transform.

Transform the given Position from the parent's frame to this Object's frame. For example, the parent of a Surface is a Room. Passing in a Position in the Room frame will return that Position in the Surface frame.

Parameters:
positionThe Position to transform,
Returns:
Returns a new Position object in relation to this Object.

Definition at line 159 of file Object.cpp.

Pose Object::fromParentFrame ( const geometry::Pose pose) const

Pose transform.

Transform the given Pose from the parent's frame to this Object's frame. For example, the parent of a Surface is a Room. Passing in a Pose in the Room frame will return that Pose in the Surface frame.

Parameters:
poseThe Pose to transform,
Returns:
Returns a new Pose object in relation to this Object.

Definition at line 167 of file Object.cpp.

const string & Object::getAlias ( const size_t  index) const

Alias value accessor.

Get the alias of this Object at the given index.

Parameters:
iThe index of the alias to get.
Returns:
The alias at the given index.
Exceptions:
std::out_of_rangeThrown if the alias at the given index does not exist.

Definition at line 106 of file Object.cpp.

const vector< string > & Object::getAliases ( ) const

Aliases value accessor.

Get the aliases of this Object.

Returns:
The aliases of this Object.

Definition at line 96 of file Object.cpp.

double Object::getDepth ( ) const

Depth value accessor.

Get the depth value of this Object.

Returns:
The depth value of this Object.

Definition at line 76 of file Object.cpp.

const string & Object::getFrameID ( ) const

Frame ID value accessor.

Get the frame ID value of this Object.

Returns:
The frame ID value of this Object.

Definition at line 41 of file Object.cpp.

double Object::getHeight ( ) const

Height value accessor.

Get the height value of this Object.

Returns:
The height value of this Object.

Definition at line 86 of file Object.cpp.

const string & Object::getName ( ) const

Name value accessor.

Get the name value of this Object.

Returns:
The name value of this Object.

Definition at line 31 of file Object.cpp.

size_t Object::getNumAliases ( ) const

Aliases size accessor.

Get the number of aliases of this Object.

Returns:
The number of aliases of this Object.

Definition at line 101 of file Object.cpp.

const Pose & Object::getPose ( ) const

Pose value accessor (immutable).

Get the Pose value of this Object (with respect to its parents frame).

Returns:
The Pose value of this Object.

Definition at line 51 of file Object.cpp.

Pose value accessor.

Get the Pose value of this Object (with respect to its parents frame).

Returns:
The Pose value of this Object.

Definition at line 56 of file Object.cpp.

double Object::getWidth ( ) const

Width value accessor.

Get the width value of this Object.

Returns:
The width value of this Object.

Definition at line 66 of file Object.cpp.

void Object::removeAlias ( const size_t  index)

Alias remover.

Remove the alias at the given index. An invalid index results in no effect.

Parameters:
iThe index of the alias to remove.
Exceptions:
std::out_of_rangeThrown if the alias at the given index does not exist.

Definition at line 123 of file Object.cpp.

void Object::setDepth ( const double  depth)

Depth value mutator.

Set the depth value of this Object.

Parameters:
depthThe new depth value of this Object.

Definition at line 81 of file Object.cpp.

void Object::setFrameID ( const std::string &  frame_id)

Frame ID value mutator.

Set the frame ID value of this Object.

Parameters:
frame_idThe new frame ID value of this Object.

Definition at line 46 of file Object.cpp.

void Object::setHeight ( const double  height)

Height value mutator.

Set the height value of this Object.

Parameters:
heightThe new height value of this Object.

Definition at line 91 of file Object.cpp.

void Object::setName ( const std::string &  name)

Name value mutator.

Set the name value of this Object.

Parameters:
nameThe new name value of this Object.

Definition at line 36 of file Object.cpp.

void Object::setPose ( geometry::Pose pose)

Pose value mutator.

Set the Pose value of this Object.

Parameters:
poseThe new Pose value of this Object.

Definition at line 61 of file Object.cpp.

void Object::setWidth ( const double  width)

Width value mutator.

Set the width value of this Object.

Parameters:
widthThe new width value of this Object.

Definition at line 71 of file Object.cpp.


Member Data Documentation

List of name aliases.

Definition at line 264 of file Object.h.

Definition at line 262 of file Object.h.

Definition at line 258 of file Object.h.

Definition at line 262 of file Object.h.

Name of the object and frame ID.

Definition at line 258 of file Object.h.

The pose of the object with respect to the parent's frame

Definition at line 260 of file Object.h.

Size of the object.

Definition at line 262 of file Object.h.


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


worldlib
Author(s): Russell Toris
autogenerated on Fri Feb 12 2016 00:24:19