openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
OpenRAVE::KinBody::KinBodyStateSaver Class Reference

Helper class to save and restore the entire kinbody state. More...

#include <kinbody.h>

Collaboration diagram for OpenRAVE::KinBody::KinBodyStateSaver:
Collaboration graph
[legend]

Public Member Functions

 KinBodyStateSaver (KinBodyPtr pbody, int options=Save_LinkTransformation|Save_LinkEnable)
 
virtual ~KinBodyStateSaver ()
 
KinBodyPtr GetBody () const
 
virtual void Restore (boost::shared_ptr< KinBody > body=boost::shared_ptr< KinBody >())
 restore the state
 
virtual void Release ()
 release the body state. _pbody will not get restored on destruction
 

Protected Attributes

int _options
 saved options
 
std::vector< Transform_vLinkTransforms
 
std::vector< uint8_t > _vEnabledLinks
 
std::vector< std::pair< Vector,
Vector > > 
_vLinkVelocities
 
std::vector< int > _vdofbranches
 
std::vector< dReal_vMaxVelocities
 
std::vector< dReal_vMaxAccelerations
 
KinBodyPtr _pbody
 

Detailed Description

Helper class to save and restore the entire kinbody state.

Options can be passed to the constructor in order to choose which parameters to save (see SaveParameters)

Examples:
orplanning_door.cpp.

Definition at line 1194 of file kinbody.h.

Constructor & Destructor Documentation

OpenRAVE::KinBody::KinBodyStateSaver::KinBodyStateSaver ( KinBodyPtr  pbody,
int  options = Save_LinkTransformation|Save_LinkEnable 
)

Definition at line 48 of file kinbody.cpp.

OpenRAVE::KinBody::KinBodyStateSaver::~KinBodyStateSaver ( )
virtual

Definition at line 68 of file kinbody.cpp.

Member Function Documentation

KinBodyPtr OpenRAVE::KinBody::KinBodyStateSaver::GetBody ( ) const
inline

Definition at line 1199 of file kinbody.h.

void OpenRAVE::KinBody::KinBodyStateSaver::Release ( )
virtual

release the body state. _pbody will not get restored on destruction

After this call, it will still be possible to use Restore.

Definition at line 78 of file kinbody.cpp.

void OpenRAVE::KinBody::KinBodyStateSaver::Restore ( boost::shared_ptr< KinBody body = boost::shared_ptr<KinBody>())
virtual

restore the state

Parameters
bodyif set, will attempt to restore the stored state to the passed in body, otherwise will restore it for the original body.
Exceptions
openrave_exceptionif the passed in body is not compatible with the saved state, will throw

Definition at line 73 of file kinbody.cpp.

Member Data Documentation

int OpenRAVE::KinBody::KinBodyStateSaver::_options
protected

saved options

Definition at line 1214 of file kinbody.h.

KinBodyPtr OpenRAVE::KinBody::KinBodyStateSaver::_pbody
protected

Definition at line 1220 of file kinbody.h.

std::vector<int> OpenRAVE::KinBody::KinBodyStateSaver::_vdofbranches
protected

Definition at line 1218 of file kinbody.h.

std::vector<uint8_t> OpenRAVE::KinBody::KinBodyStateSaver::_vEnabledLinks
protected

Definition at line 1216 of file kinbody.h.

std::vector<Transform> OpenRAVE::KinBody::KinBodyStateSaver::_vLinkTransforms
protected

Definition at line 1215 of file kinbody.h.

std::vector<std::pair<Vector,Vector> > OpenRAVE::KinBody::KinBodyStateSaver::_vLinkVelocities
protected

Definition at line 1217 of file kinbody.h.

std::vector<dReal> OpenRAVE::KinBody::KinBodyStateSaver::_vMaxAccelerations
protected

Definition at line 1219 of file kinbody.h.

std::vector<dReal> OpenRAVE::KinBody::KinBodyStateSaver::_vMaxVelocities
protected

Definition at line 1219 of file kinbody.h.


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