RobWorkProject
24.12.4-
|
the RigidObject defines a physical object in the workcell that is rigid in the sence that the geometry does not change. The rigid object also have basic properties such as Inertia and mass. These are default 1.0 kg and inertia of solid sphere with mass 1.0kg and radius of 10cm. The center of mass defaults to origin of the base frame. More...
#include <RigidObject.hpp>
Inherits Object.
Public Types | |
typedef rw::core::Ptr< RigidObject > | Ptr |
smart pointer | |
typedef rw::core::Ptr< const RigidObject > | CPtr |
const smart pointer | |
Public Types inherited from Object | |
typedef rw::core::Ptr< Object > | Ptr |
smart pointer | |
typedef rw::core::Ptr< const Object > | CPtr |
const smart pointer | |
Public Types inherited from Stateless | |
typedef rw::core::Ptr< Stateless > | Ptr |
Smart pointer type for Stateless. | |
Public Member Functions | |
RigidObject (rw::core::Ptr< rw::kinematics::Frame > baseframe) | |
constructor More... | |
RigidObject (rw::core::Ptr< rw::kinematics::Frame > baseframe, rw::geometry::Geometry::Ptr geom) | |
constructor More... | |
RigidObject (rw::core::Ptr< rw::kinematics::Frame > baseframe, std::vector< rw::geometry::Geometry::Ptr > geom) | |
constructor More... | |
RigidObject (std::vector< rw::kinematics::Frame * > frames) | |
constructor More... | |
RigidObject (std::vector< rw::kinematics::Frame * > frames, rw::geometry::Geometry::Ptr geom) | |
constructor More... | |
RigidObject (std::vector< rw::kinematics::Frame * > frames, std::vector< rw::geometry::Geometry::Ptr > geom) | |
constructor More... | |
virtual | ~RigidObject () |
destructor | |
void | addGeometry (rw::geometry::Geometry::Ptr geom) |
add collision geometry from this object More... | |
void | removeGeometry (rw::geometry::Geometry::Ptr geom) |
remove collision geometry from this object More... | |
void | addModel (rw::geometry::Model3D::Ptr model) |
add visualization model to this object More... | |
void | removeModel (rw::geometry::Model3D::Ptr model) |
remove visualization model to this rigid object More... | |
double | getMass () const |
returns the mass of this RigidObject More... | |
void | setMass (double mass) |
set mass of this RigidObject More... | |
rw::math::InertiaMatrix | getInertia () const |
get the inertia matrix of this rigid body seen in the base frame More... | |
void | setInertia (const rw::math::InertiaMatrix<> &inertia) |
set inertia of this rigid object More... | |
rw::math::Vector3D< double > | getCOM () const |
get the center of mass of this rigid body seen in the base frame More... | |
void | setCOM (const rw::math::Vector3D< double > &com) |
set the center of mass of this rigid body seen in the base frame | |
void | approximateInertia () |
approximates inertia based on geometry, mass and center of mass properties | |
void | approximateInertiaCOM () |
approximates inertia and center of mass based on geometry and mass properties | |
const std::vector< rw::geometry::Geometry::Ptr > & | getGeometry () const |
get geometry of this rigid object More... | |
const std::vector< rw::geometry::Model3D::Ptr > & | getModels () const |
get visualization models for this rigid object More... | |
double | getMass (const rw::kinematics::State &state) const |
get mass in Kg of this object More... | |
rw::math::InertiaMatrix | getInertia (const rw::kinematics::State &state) const |
returns the inertia matrix of this body calculated around COM with the orientation of the base frame. More... | |
rw::math::Vector3D< double > | getCOM (const rw::kinematics::State &state) const |
get center of mass of this object More... | |
Public Member Functions inherited from Object | |
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::Frame * | getBase () |
get base frame of this object More... | |
const rw::kinematics::Frame * | getBase () const |
get base frame of this object More... | |
const std::vector< rw::kinematics::Frame * > & | getFrames () |
get all associated frames of this object More... | |
void | addFrame (rw::core::Ptr< 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::geometry::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::geometry::Model3D::Ptr > & | getModels (const rw::kinematics::State &state) const |
get visualization models of this object More... | |
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 | |
const std::vector< rw::geometry::Geometry::Ptr > & | doGetGeometry (const rw::kinematics::State &state) const |
get default geometries More... | |
const std::vector< rw::geometry::Model3D::Ptr > & | doGetModels (const rw::kinematics::State &state) const |
get the default models More... | |
Protected Member Functions inherited from Object | |
Object (rw::core::Ptr< rw::kinematics::Frame > baseframe) | |
constructor | |
Object (std::vector< rw::kinematics::Frame * > frames) | |
constructor - first frame is base | |
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 (rw::core::Ptr< StateData > data) |
implementations of sensor should add all their state data on initialization | |
Friends | |
class | WorkCell |
Additional Inherited Members | |
Protected Attributes inherited from Stateless | |
bool | _registered |
True if object has registered its state. | |
std::vector< rw::core::Ptr< StateData > > | _datas |
Data. | |
StateStructure::Ptr | _stateStruct |
The state structure. | |
the RigidObject defines a physical object in the workcell that is rigid in the sence that the geometry does not change. The rigid object also have basic properties such as Inertia and mass. These are default 1.0 kg and inertia of solid sphere with mass 1.0kg and radius of 10cm. The center of mass defaults to origin of the base frame.
RigidObject | ( | rw::core::Ptr< rw::kinematics::Frame > | baseframe | ) |
constructor
baseframe | [in] base frame of the object |
RigidObject | ( | rw::core::Ptr< rw::kinematics::Frame > | baseframe, |
rw::geometry::Geometry::Ptr | geom | ||
) |
constructor
baseframe | [in] base frame of the object |
geom | [in] the Geometry Forming the object |
RigidObject | ( | rw::core::Ptr< rw::kinematics::Frame > | baseframe, |
std::vector< rw::geometry::Geometry::Ptr > | geom | ||
) |
constructor
baseframe | [in] base frame of the object |
geom | [in] the Geometry Forming the object |
RigidObject | ( | std::vector< rw::kinematics::Frame * > | frames | ) |
constructor
frames | [in] first frame is base frame of the object |
RigidObject | ( | std::vector< rw::kinematics::Frame * > | frames, |
rw::geometry::Geometry::Ptr | geom | ||
) |
constructor
frames | [in] first frame is base frame of the object |
geom | [in] the Geometry Forming the object |
RigidObject | ( | std::vector< rw::kinematics::Frame * > | frames, |
std::vector< rw::geometry::Geometry::Ptr > | geom | ||
) |
constructor
frames | [in] first frame is base frame of the object |
geom | [in] a list of geometries to form the object |
void addGeometry | ( | rw::geometry::Geometry::Ptr | geom | ) |
add collision geometry from this object
geom | [in] the geometry to add |
void addModel | ( | rw::geometry::Model3D::Ptr | model | ) |
add visualization model to this object
model | [in] the model to be added |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
get the center of mass of this rigid body seen in the base frame
|
inlinevirtual |
get center of mass of this object
state | [in] the state in which to get center of mass |
Implements Object.
const std::vector<rw::geometry::Geometry::Ptr>& getGeometry | ( | ) | const |
get geometry of this rigid object
|
inline |
get the inertia matrix of this rigid body seen in the base frame
|
inlinevirtual |
returns the inertia matrix of this body calculated around COM with the orientation of the base frame.
Implements Object.
|
inline |
returns the mass of this RigidObject
|
inlinevirtual |
get mass in Kg of this object
state | [in] the state in which the mass should be gotten from |
Implements Object.
const std::vector<rw::geometry::Model3D::Ptr>& getModels | ( | ) | const |
get visualization models for this rigid object
void removeGeometry | ( | rw::geometry::Geometry::Ptr | geom | ) |
remove collision geometry from this object
geom | [in] the geometry to remove |
void removeModel | ( | rw::geometry::Model3D::Ptr | model | ) |
remove visualization model to this rigid object
model | [in] the model to be removed |
|
inline |
set inertia of this rigid object
inertia | [in] the inertia of this object |
|
inline |
set mass of this RigidObject
mass | [in] the mass of this object |