#include <GenericObjectHandler.h>
Public Member Functions | |
virtual bool | endOfSimulation () |
GenericObjectHandler () | |
int | getAssociatedObject () |
int | getAssociatedObjectUniqueId () |
void | getDeveloperCustomData (std::vector< unsigned char > &developerCustomData) |
int | getID () |
virtual unsigned int | getObjectType () const =0 |
virtual void | handleSimulation ()=0 |
void | setAssociatedObject (int objID, int objUniqueID) |
void | setID (int newID) |
void | startOfSimulation () |
virtual void | synchronize () |
void | synchronizeSceneObject () |
virtual | ~GenericObjectHandler () |
Protected Member Functions | |
virtual void | _initialize ()=0 |
Protected Attributes | |
int | _associatedObjectID |
std::string | _associatedObjectName |
int | _associatedObjectUniqueID |
int | _id |
bool | _initialized |
ros::NodeHandle | _nh |
Handler of a generic V-REP scene object. This should never be used directly but always inherited by specific handlers.
Definition at line 12 of file GenericObjectHandler.h.
Definition at line 7 of file GenericObjectHandler.cpp.
GenericObjectHandler::~GenericObjectHandler | ( | ) | [virtual] |
Definition at line 15 of file GenericObjectHandler.cpp.
virtual void GenericObjectHandler::_initialize | ( | ) | [protected, pure virtual] |
This method is called to initialize the object handler. In particular this is also called from GenericObjectHandler::startOfSimulation() at the beginning of the simulation.
bool GenericObjectHandler::endOfSimulation | ( | ) | [virtual] |
This method is called (indirectly) from a Lua-script at the end of the simulation.
Definition at line 58 of file GenericObjectHandler.cpp.
Get the scene object associated to this GenericObjectHandler.
Definition at line 31 of file GenericObjectHandler.cpp.
Get the unique ID of scene object associated to this GenericObjectHandler.
Definition at line 35 of file GenericObjectHandler.cpp.
void GenericObjectHandler::getDeveloperCustomData | ( | std::vector< unsigned char > & | developerCustomData | ) |
Get all the developer data attached to the associated scene object (this is custom data added by the developer).
Definition at line 47 of file GenericObjectHandler.cpp.
int GenericObjectHandler::getID | ( | ) |
Get the ID of this GenericObjectHandler.
Unique ID to identify individual GenericObjectHandlers within the container.
Definition at line 22 of file GenericObjectHandler.cpp.
virtual unsigned int GenericObjectHandler::getObjectType | ( | ) | const [pure virtual] |
Get the specific object type for derived classes (i.e. XXXX_DATA_MAIN).
virtual void GenericObjectHandler::handleSimulation | ( | ) | [pure virtual] |
This method is called (indirectly) from a Lua-script at each simulation step.
void GenericObjectHandler::setAssociatedObject | ( | int | objID, |
int | objUniqueID | ||
) |
Set the object associated with this GenericObjectHandler.
objID | The handle of the scene object associated with this GenericObjectHandler. |
objUniqueID | The unique ID of the scene object associated with this GenericObjectHandler. |
Definition at line 26 of file GenericObjectHandler.cpp.
void GenericObjectHandler::setID | ( | int | newID | ) |
Set the ID of this GenericObjectHandler.
newID | Unique ID to identify individual GenericObjectHandlers within the container. |
Definition at line 18 of file GenericObjectHandler.cpp.
This method is called (indirectly) from a Lua-script at the beginning of the simulation.
Definition at line 54 of file GenericObjectHandler.cpp.
void GenericObjectHandler::synchronize | ( | ) | [virtual] |
Update GenericObjectHandler's data from its associated scene object custom data.
Definition at line 44 of file GenericObjectHandler.cpp.
Synchronizes the GenericObjectHandler with the scene. This method is called each time this latter changes.
Definition at line 39 of file GenericObjectHandler.cpp.
int GenericObjectHandler::_associatedObjectID [protected] |
The handle of the scene object associated with this GenericObjectHandler.
Definition at line 105 of file GenericObjectHandler.h.
std::string GenericObjectHandler::_associatedObjectName [protected] |
The unique name of the scene object associated with this GenericObjectHandler.
Definition at line 110 of file GenericObjectHandler.h.
int GenericObjectHandler::_associatedObjectUniqueID [protected] |
The unique ID of the scene object associated with this GenericObjectHandler.
Definition at line 100 of file GenericObjectHandler.h.
int GenericObjectHandler::_id [protected] |
Unique ID to identify individual GenericObjectHandlers within the container.
Definition at line 95 of file GenericObjectHandler.h.
bool GenericObjectHandler::_initialized [protected] |
Set to true when the GenericObjectHandler is initialized.
Definition at line 115 of file GenericObjectHandler.h.
ros::NodeHandle GenericObjectHandler::_nh [protected] |
Handle of the ros node.
Definition at line 120 of file GenericObjectHandler.h.