A rigid body holding all its collision and rendering data. More...
#include <kinbody.h>
Classes | |
class | Geometry |
geometry object holding a link parent and wrapping access to a protected geometry info More... | |
Public Types | |
typedef KinBody::GeometryInfo GeometryInfo | RAVE_DEPRECATED |
typedef boost::shared_ptr < KinBody::GeometryInfo > GeometryInfoPtr | RAVE_DEPRECATED |
typedef TriMesh TRIMESH | RAVE_DEPRECATED |
typedef GeometryType GeomType | RAVE_DEPRECATED |
typedef boost::shared_ptr < Geometry > | GeometryPtr |
typedef boost::shared_ptr < Geometry const > | GeometryConstPtr |
typedef Geometry GEOMPROPERTIES | RAVE_DEPRECATED |
Public Member Functions | |
Link (KinBodyPtr parent) | |
pass in a ODE world | |
virtual | ~Link () |
const std::string & | GetName () const |
bool | IsStatic () const |
Indicates a static body that does not move with respect to the root link. | |
virtual void | Enable (bool enable) |
Enables a Link. An enabled link takes part in collision detection and physics simulations. | |
virtual bool | IsEnabled () const |
returns true if the link is enabled. | |
virtual bool | SetVisible (bool visible) |
Sets all the geometries of the link as visible or non visible. | |
virtual bool | IsVisible () const |
KinBodyPtr | GetParent () const |
parent body that link belong to. | |
int | GetIndex () const |
unique index into parent KinBody::GetLinks vector | |
const TriMesh & | GetCollisionData () const |
virtual AABB | ComputeLocalAABB () const |
Compute the aabb of all the geometries of the link in the link coordinate system. | |
virtual AABB | ComputeAABB () const |
Compute the aabb of all the geometries of the link in the world coordinate system. | |
Transform | GetTransform () const |
Return the current transformation of the link in the world coordinate system. | |
virtual void | GetParentLinks (std::vector< boost::shared_ptr< Link > > &vParentLinks) const |
Return all the direct parent links in the kinematics hierarchy of this link. | |
virtual bool | IsParentLink (boost::shared_ptr< Link const > plink) const |
Tests if a link is a direct parent. | |
Vector | GetLocalCOM () const |
return center of mass offset in the link's local coordinate frame | |
Vector | GetGlobalCOM () const |
return center of mass of the link in the global coordinate system | |
Vector | GetCOMOffset () const |
virtual TransformMatrix | GetLocalInertia () const |
return inertia in link's local coordinate frame. The translation component is the the COM in the link's frame. | |
virtual TransformMatrix | GetGlobalInertia () const |
TransformMatrix | GetInertia () const RAVE_DEPRECATED |
virtual void | SetLocalMassFrame (const Transform &massframe) |
sets a new mass frame with respect to the link coordinate system | |
virtual void | SetPrincipalMomentsOfInertia (const Vector &inertiamoments) |
sets new principal moments of inertia (with respect to the mass frame) | |
virtual void | SetMass (dReal mass) |
set a new mass | |
const Transform & | GetLocalMassFrame () const |
return the mass frame in the link's local coordinate system that holds the center of mass and principal axes for inertia. | |
Transform | GetGlobalMassFrame () const |
return the mass frame in the global coordinate system that holds the center of mass and principal axes for inertia. | |
const Vector & | GetPrincipalMomentsOfInertia () const |
return the principal moments of inertia inside the mass frame | |
dReal | GetMass () const |
virtual void | SetStatic (bool bStatic) |
sets a link to be static. | |
virtual void | SetTransform (const Transform &transform) |
Sets the transform of the link regardless of kinematics. | |
virtual void | SetForce (const Vector &force, const Vector &pos, bool add) |
virtual void | SetTorque (const Vector &torque, bool add) |
virtual void | SetVelocity (const Vector &linearvel, const Vector &angularvel) |
virtual void | GetVelocity (Vector &linearvel, Vector &angularvel) const |
get the velocity of the link | |
virtual std::pair< Vector, Vector > | GetVelocity () const |
return the linear/angular velocity of the link | |
const std::vector< GeometryPtr > & | GetGeometries () const |
returns a list of all the geometry objects. | |
virtual GeometryPtr | GetGeometry (int index) |
virtual void | InitGeometries (std::vector< KinBody::GeometryInfoConstPtr > &geometries) |
inits the current geometries with the new geometry info. | |
virtual void | InitGeometries (std::list< KinBody::GeometryInfo > &geometries) |
virtual void | SwapGeometries (boost::shared_ptr< Link > &link) |
swaps the geometries with the link | |
virtual bool | ValidateContactNormal (const Vector &position, Vector &normal) const |
virtual bool | IsRigidlyAttached (boost::shared_ptr< Link const > plink) const |
returns true if plink is rigidily attahced to this link. | |
virtual void | GetRigidlyAttachedLinks (std::vector< boost::shared_ptr< Link > > &vattachedlinks) const |
Gets all the rigidly attached links to linkindex, also adds the link to the list. | |
virtual void | serialize (std::ostream &o, int options) const |
const std::map< std::string, std::vector< dReal > > & | GetFloatParameters () const |
return a map of custom float parameters | |
virtual void | SetFloatParameters (const std::string &key, const std::vector< dReal > ¶meters) |
set custom float parameters | |
const std::map< std::string, std::vector< int > > & | GetIntParameters () const |
return a map of custom integer parameters | |
virtual void | SetIntParameters (const std::string &key, const std::vector< int > ¶meters) |
set custom int parameters | |
virtual void | UpdateInfo () |
Updates several fields in _info depending on the current state of the link. | |
const KinBody::LinkInfo & | GetInfo () const |
returns the current info structure of the link. | |
const KinBody::LinkInfo & | UpdateAndGetInfo () |
Calls UpdateInfo and returns the link structure. | |
Static Public Attributes | |
static const GeometryType GeomNone | RAVE_DEPRECATED = OpenRAVE::GT_None |
static const GeometryType GeomBox | RAVE_DEPRECATED = OpenRAVE::GT_Box |
static const GeometryType GeomSphere | RAVE_DEPRECATED = OpenRAVE::GT_Sphere |
static const GeometryType GeomCylinder | RAVE_DEPRECATED = OpenRAVE::GT_Cylinder |
static const GeometryType GeomTrimesh | RAVE_DEPRECATED = OpenRAVE::GT_TriMesh |
Protected Member Functions | |
virtual void | _Update () |
Updates the cached information due to changes in the collision data. | |
Protected Attributes | |
std::vector< GeometryPtr > | _vGeometries |
LinkInfo | _info |
parameter information of the link | |
A rigid body holding all its collision and rendering data.
typedef boost::shared_ptr<Geometry const> OpenRAVE::KinBody::Link::GeometryConstPtr |
typedef boost::shared_ptr<Geometry> OpenRAVE::KinBody::Link::GeometryPtr |
typedef boost::shared_ptr<KinBody::GeometryInfo> GeometryInfoPtr OpenRAVE::KinBody::Link::RAVE_DEPRECATED |
typedef TriMesh TRIMESH OpenRAVE::KinBody::Link::RAVE_DEPRECATED |
typedef GeometryType GeomType OpenRAVE::KinBody::Link::RAVE_DEPRECATED |
typedef Geometry GEOMPROPERTIES OpenRAVE::KinBody::Link::RAVE_DEPRECATED |
OpenRAVE::KinBody::Link::Link | ( | KinBodyPtr | parent | ) |
pass in a ODE world
Definition at line 25 of file kinbodylink.cpp.
|
virtual |
Definition at line 31 of file kinbodylink.cpp.
|
protectedvirtual |
Updates the cached information due to changes in the collision data.
Definition at line 420 of file kinbodylink.cpp.
|
virtual |
Compute the aabb of all the geometries of the link in the world coordinate system.
Definition at line 203 of file kinbodylink.cpp.
|
virtual |
Compute the aabb of all the geometries of the link in the link coordinate system.
Definition at line 148 of file kinbodylink.cpp.
|
virtual |
Enables a Link. An enabled link takes part in collision detection and physics simulations.
Definition at line 36 of file kinbodylink.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Definition at line 317 of file kinbodylink.cpp.
|
inline |
|
virtual |
Definition at line 125 of file kinbodylink.cpp.
|
inline |
|
inline |
unique index into parent KinBody::GetLinks vector
|
inline |
|
inline |
returns the current info structure of the link.
The LinkInfo::_vgeometryinfos do not reflect geometry changes that happened since the robot was created. User will need to call Geometry::GetInfo on each individual geometry.
|
inline |
|
inline |
|
virtual |
return inertia in link's local coordinate frame. The translation component is the the COM in the link's frame.
Definition at line 120 of file kinbodylink.cpp.
|
inline |
|
inline |
|
inline |
|
virtual |
Return all the direct parent links in the kinematics hierarchy of this link.
A parent link is is immediately connected to this link by a joint and has a path to the root joint so that it is possible to compute this link's transformation from its parent.
[out] | filled | with the parent links |
Definition at line 77 of file kinbodylink.cpp.
|
inline |
|
virtual |
Gets all the rigidly attached links to linkindex, also adds the link to the list.
vattachedlinks | the array to insert all links attached to linkindex with the link itself. |
Definition at line 370 of file kinbodylink.cpp.
|
inline |
get the velocity of the link
[out] | linearvel | the translational velocity |
[out] | angularvel | is the rotation axis * angular speed |
Definition at line 304 of file kinbodylink.cpp.
return the linear/angular velocity of the link
Definition at line 310 of file kinbodylink.cpp.
|
virtual |
inits the current geometries with the new geometry info.
This gives a user control for dynamically changing the object geometry. Note that the kinbody/robot hash could change.
geometries | a list of geometry infos to be initialized into new geometry objects, note that the geometry info data is copied |
Definition at line 322 of file kinbodylink.cpp.
|
virtual |
Definition at line 332 of file kinbodylink.cpp.
|
virtual |
|
virtual |
Tests if a link is a direct parent.
link | The link to test if it is one of the parents of this link. |
Definition at line 86 of file kinbodylink.cpp.
|
virtual |
returns true if plink is rigidily attahced to this link.
Definition at line 401 of file kinbodylink.cpp.
|
inline |
|
virtual |
Definition at line 67 of file kinbodylink.cpp.
|
virtual |
Definition at line 259 of file kinbodylink.cpp.
|
virtual |
set custom float parameters
parameters | if empty, then removes the parameter |
Definition at line 379 of file kinbodylink.cpp.
|
virtual |
adds an external force at pos (absolute coords)
[in] | force | the direction and magnitude of the force |
[in] | pos | in the world where the force is getting applied |
[in] | add | if true, force is added to previous forces, otherwise it is set |
Definition at line 289 of file kinbodylink.cpp.
|
virtual |
set custom int parameters
parameters | if empty, then removes the parameter |
Definition at line 390 of file kinbodylink.cpp.
|
virtual |
sets a new mass frame with respect to the link coordinate system
Definition at line 130 of file kinbodylink.cpp.
|
virtual |
set a new mass
Definition at line 142 of file kinbodylink.cpp.
|
virtual |
sets new principal moments of inertia (with respect to the mass frame)
Definition at line 136 of file kinbodylink.cpp.
|
virtual |
sets a link to be static.
Because this can affect the kinematics, it requires the body's internal structures to be recomputed
Definition at line 275 of file kinbodylink.cpp.
|
virtual |
adds torque to a body (absolute coords)
add | if true, torque is added to previous torques, otherwise it is set |
Definition at line 294 of file kinbodylink.cpp.
|
virtual |
Sets the transform of the link regardless of kinematics.
[in] | t | the new transformation |
Definition at line 283 of file kinbodylink.cpp.
|
virtual |
forces the velocity of the link
[in] | linearvel | the translational velocity |
[in] | angularvel | is the rotation axis * angular speed |
Definition at line 299 of file kinbodylink.cpp.
|
virtual |
Sets all the geometries of the link as visible or non visible.
Definition at line 51 of file kinbodylink.cpp.
|
virtual |
swaps the geometries with the link
Definition at line 344 of file kinbodylink.cpp.
|
inline |
Calls UpdateInfo and returns the link structure.
|
virtual |
Updates several fields in _info depending on the current state of the link.
Definition at line 406 of file kinbodylink.cpp.
|
virtual |
validates the contact normal on link and makes sure the normal faces "outside" of the geometry shape it lies on. An exception can be thrown if position is not on a geometry surface
position | the position of the contact point specified in the link's coordinate system, assumes it is on a particular geometry |
normal | the unit normal of the contact point specified in the link's coordinate system |
Definition at line 359 of file kinbodylink.cpp.
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
static |