#include <GenericObjectContainer.h>
Definition at line 13 of file GenericObjectContainer.h.
Constructor.
Definition at line 10 of file GenericObjectContainer.cpp.
GenericObjectContainer::~GenericObjectContainer | ( | ) | [virtual] |
Destroy the container after removing all objects inside.
Definition at line 33 of file GenericObjectContainer.cpp.
This is called every time the scene content in V-REP might have changed (e.g. object added/removed/etc.). The method synchronizes the container with the current V-REP's scene content: we need to make sure that every object in V-REP's scene has exactly one element in this container.
Definition at line 115 of file GenericObjectContainer.cpp.
This is called at the end of simulation.
Definition at line 95 of file GenericObjectContainer.cpp.
int GenericObjectContainer::getCount | ( | ) |
Get the number of elements in the container.
Definition at line 86 of file GenericObjectContainer.cpp.
boost::shared_ptr< GenericObjectHandler > GenericObjectContainer::getFromAssociatedObject | ( | int | theAssociatedObjectID | ) |
Get the container of an object.
theAssociatedObjectID | The unique ID of the object. |
Definition at line 77 of file GenericObjectContainer.cpp.
boost::shared_ptr< GenericObjectHandler > GenericObjectContainer::getFromID | ( | int | theID | ) |
Returns the object corresponding to a given unique ID.
theID | The unique ID of the object to be returned. |
Definition at line 62 of file GenericObjectContainer.cpp.
boost::shared_ptr< GenericObjectHandler > GenericObjectContainer::getFromIndex | ( | int | ind | ) |
Returns the object correspImuonding to a container index.
ind | The container index of the object to be returned. |
Definition at line 71 of file GenericObjectContainer.cpp.
This is called at each simulation step, i.e. when the main script calls: simHandleModule.
Definition at line 106 of file GenericObjectContainer.cpp.
int GenericObjectContainer::insert | ( | boost::shared_ptr< GenericObjectHandler > | objectHandler | ) |
Insert an object in the container.
objectHandler | A pointer to the object to be inserted. |
Definition at line 53 of file GenericObjectContainer.cpp.
void GenericObjectContainer::removeAll | ( | ) |
Remove all objects from the container.
Definition at line 37 of file GenericObjectContainer.cpp.
void GenericObjectContainer::removeFromID | ( | int | theID | ) |
Remove the object corresponding to the given ID from the container.
theID | The unique ID of the object to be removed. |
Definition at line 42 of file GenericObjectContainer.cpp.
void GenericObjectContainer::simExtGetAllCustomData | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that retrieves all custom data from an object and print it in the format described in CAccess
class documentation.
p | Lua callback parameter. See V-REP main documentation for details. |
Definition at line 209 of file GenericObjectContainer.cpp.
void GenericObjectContainer::simExtGetCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that retrieves the custom data corresponding to a certain header (among those defined in CustomDataHeaders
) from an object.
p | Lua callback parameter. See V-REP main documentation for details. |
Definition at line 281 of file GenericObjectContainer.cpp.
simVoid GenericObjectContainer::simExtSetFloatArrayCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that sets the floating point vector custom data corresponding to a certain header (among those defined in CustomDataHeaders
) from an object. TODO: use binding to pass the object container so that the object can be initialized each time the custom data are modified.
p | Lua callback parameter. See V-REP main documentation for details. |
TODO: add output bool to indicate success
Definition at line 414 of file GenericObjectContainer.cpp.
simVoid GenericObjectContainer::simExtSetFloatCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that sets the floating point custom data corresponding to a certain header (among those defined in CustomDataHeaders
) from an object. TODO: use binding to pass the object container so that the object can be initialized each time the custom data are modified.
p | Lua callback parameter. See V-REP main documentation for details. |
TODO: add output bool to indicate success
Definition at line 342 of file GenericObjectContainer.cpp.
simVoid GenericObjectContainer::simExtSetIntCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that sets the integer point custom data corresponding to a certain header (among those defined in CustomDataHeaders
) from an object. TODO: use binding to pass the object container so that the object can be initialized each time the custom data are modified.
p | Lua callback parameter. See V-REP main documentation for details. |
TODO: add output bool to indicate success
Definition at line 488 of file GenericObjectContainer.cpp.
This is called at the start of simulation.
Definition at line 90 of file GenericObjectContainer.cpp.
std::map<std::string, boost::shared_ptr<GenericObjectHandler> > GenericObjectContainer::_allExistingPlugins [protected] |
Definition at line 132 of file GenericObjectContainer.h.
std::vector<boost::shared_ptr<GenericObjectHandler> > GenericObjectContainer::_allObjects [protected] |
Definition at line 129 of file GenericObjectContainer.h.
rosgraph_msgs::Clock GenericObjectContainer::_clock_msg [protected] |
Definition at line 136 of file GenericObjectContainer.h.
ros::NodeHandle GenericObjectContainer::_nh [protected] |
Definition at line 134 of file GenericObjectContainer.h.
pluginlib::ClassLoader<GenericObjectHandler> GenericObjectContainer::_object_handler_loader [protected] |
Definition at line 131 of file GenericObjectContainer.h.
ros::Publisher GenericObjectContainer::_pubClock [protected] |
Definition at line 135 of file GenericObjectContainer.h.