RobWorkProject
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
Object Class Referenceabstract

The object class represents a physical thing in the scene which has geometry. An object has a base frame (similar to a Device) and may have a number of associated frames. More...

#include <Object.hpp>

Inherits Stateless.

Inherited by DeformableObject, and RigidObject.

Public Types

typedef rw::common::Ptr< ObjectPtr
 smart pointer
 
typedef rw::common::Ptr< const ObjectCPtr
 const smart pointer
 
- Public Types inherited from Stateless
typedef rw::common::Ptr< StatelessPtr
 Smart pointer type for Stateless.
 

Public Member Functions

virtual ~Object ()
 destructor
 
const std::string & getName ()
 get name of this object. Name is always the same as the name of the base frame. More...
 
rw::kinematics::FramegetBase ()
 get base frame of this object More...
 
const rw::kinematics::FramegetBase () const
 
const std::vector< rw::kinematics::Frame * > & getFrames ()
 get all associated frames of this object More...
 
void addFrame (rw::kinematics::Frame *frame)
 associate a frame to this Object. More...
 
const std::vector< rw::geometry::Geometry::Ptr > & getGeometry () const
 get default geometries More...
 
const std::vector< rw::graphics::Model3D::Ptr > & getModels () const
 get the default models More...
 
const std::vector< rw::geometry::Geometry::Ptr > & getGeometry (const rw::kinematics::State &state) const
 get geometry of this object More...
 
const std::vector< rw::graphics::Model3D::Ptr > & getModels (const rw::kinematics::State &state) const
 get visualization models of this object More...
 
virtual double getMass (rw::kinematics::State &state) const =0
 get mass in Kg of this object More...
 
virtual rw::math::Vector3D getCOM (rw::kinematics::State &state) const =0
 get center of mass of this object More...
 
virtual rw::math::InertiaMatrix getInertia (rw::kinematics::State &state) const =0
 returns the inertia matrix of this body calculated around COM with the orientation of the base frame.
 
- Public Member Functions inherited from Stateless
virtual ~Stateless ()
 destructor
 
virtual void registerIn (State &state)
 initialize this stateless data to a specific state More...
 
virtual void registerIn (StateStructure::Ptr state)
 register this stateless object in a statestructure.
 
virtual void unregister ()
 unregisters all state data of this stateless object
 
StateStructure::Ptr getStateStructure ()
 Get the state structure. More...
 
const StateStructure::Ptr getStateStructure () const
 Get the state structure. More...
 
bool isRegistered ()
 Check if object has registered its state. More...
 

Protected Member Functions

 Object (rw::kinematics::Frame *baseframe)
 constructor
 
 Object (std::vector< rw::kinematics::Frame *> frames)
 constructor - first frame is base
 
virtual const std::vector< rw::geometry::Geometry::Ptr > & doGetGeometry (const rw::kinematics::State &state) const =0
 get geometry of this object More...
 
virtual const std::vector< rw::graphics::Model3D::Ptr > & doGetModels (const rw::kinematics::State &state) const =0
 get visualization models of this object More...
 
- Protected Member Functions inherited from Stateless
 Stateless ()
 constructor
 
template<class T >
void add (StatelessData< T > &data)
 implementations of sensor should add all their stateless data on initialization
 
void add (StateData *data)
 Add data. More...
 
void add (boost::shared_ptr< StateData > data)
 implementations of sensor should add all their state data on initialization
 

Friends

class WorkCell
 WorkCell keeps track of devices, obstacles and objects in the scene. More...
 

Additional Inherited Members

- Protected Attributes inherited from Stateless
bool _registered
 True if object has registered its state.
 
std::vector< boost::shared_ptr< StateData > > _datas
 Data.
 
StateStructure::Ptr _stateStruct
 The state structure.
 

Detailed Description

The object class represents a physical thing in the scene which has geometry. An object has a base frame (similar to a Device) and may have a number of associated frames.

Member Function Documentation

◆ addFrame()

void addFrame ( rw::kinematics::Frame frame)

associate a frame to this Object.

Parameters
frame[in] frame to associate to object

◆ doGetGeometry()

virtual const std::vector<rw::geometry::Geometry::Ptr>& doGetGeometry ( const rw::kinematics::State state) const
protectedpure virtual

get geometry of this object

Returns
geometry for collision detection.

Implemented in DeformableObject, and RigidObject.

◆ doGetModels()

virtual const std::vector<rw::graphics::Model3D::Ptr>& doGetModels ( const rw::kinematics::State state) const
protectedpure virtual

get visualization models of this object

Returns
models for visualization

Implemented in DeformableObject, and RigidObject.

◆ getBase()

rw::kinematics::Frame* getBase ( )

get base frame of this object

Returns
base frame of object

◆ getCOM()

virtual rw::math::Vector3D getCOM ( rw::kinematics::State state) const
pure virtual

get center of mass of this object

Parameters
state[in] the state in which to get center of mass
Returns

Implemented in DeformableObject, and RigidObject.

◆ getFrames()

const std::vector<rw::kinematics::Frame*>& getFrames ( )

get all associated frames of this object

Returns
a vector of frames

◆ getGeometry() [1/2]

const std::vector<rw::geometry::Geometry::Ptr>& getGeometry ( ) const
inline

get default geometries

Returns
geometry for collision detection

◆ getGeometry() [2/2]

const std::vector<rw::geometry::Geometry::Ptr>& getGeometry ( const rw::kinematics::State state) const
inline

get geometry of this object

Returns
geometry for collision detection.

◆ getMass()

virtual double getMass ( rw::kinematics::State state) const
pure virtual

get mass in Kg of this object

Returns
mass in kilo grams

Implemented in DeformableObject, and RigidObject.

◆ getModels() [1/2]

const std::vector<rw::graphics::Model3D::Ptr>& getModels ( ) const
inline

get the default models

Returns
models for vizualization

◆ getModels() [2/2]

const std::vector<rw::graphics::Model3D::Ptr>& getModels ( const rw::kinematics::State state) const
inline

get visualization models of this object

Returns
models for visualization

◆ getName()

const std::string& getName ( )
inline

get name of this object. Name is always the same as the name of the base frame.

Returns
name of object.

Friends And Related Function Documentation

◆ WorkCell

friend class WorkCell
friend

WorkCell keeps track of devices, obstacles and objects in the scene.

WorkCell is a pretty dumb container to which you can add your devices and the frames you your GUI to show as objects or camera views.

WorkCell is responsible for keeping track of everything including all devices, object and obstacles in the environment. WorkCell contains the World Frame, which represents the root and the only frame without a parent.


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