addtogroup gazebo_util More...
#include <util/util.hh>
Inherits SingletonT< IntrospectionManager >.
Public Member Functions | |
void | Clear () |
Unregister all items. More... | |
std::string | Id () const |
Get the unique ID of this manager. More... | |
std::set< std::string > | Items () const |
Get a copy of the items already registered in this manager. More... | |
void | NotifyUpdates () |
If there are changes in the items list since the last update, a new message is published under the topic "/introspection/<manager_id>/items_update". More... | |
template<typename T > | |
bool | Register (const std::string &_item, const std::function< T()> &_cb) |
Register a new item in the introspection manager. More... | |
bool | Unregister (const std::string &_item) |
Unregister an existing item from the introspection manager. More... | |
void | Update () |
Update all the items under observation and publish updates through all the topics. More... | |
Static Public Member Functions | |
static IntrospectionManager * | Instance () |
Get an instance of the singleton. More... | |
addtogroup gazebo_util
void Clear | ( | ) |
Unregister all items.
std::string Id | ( | ) | const |
Get the unique ID of this manager.
|
inlinestaticinherited |
Get an instance of the singleton.
std::set<std::string> Items | ( | ) | const |
Get a copy of the items already registered in this manager.
void NotifyUpdates | ( | ) |
If there are changes in the items list since the last update, a new message is published under the topic "/introspection/<manager_id>/items_update".
|
inline |
Register a new item in the introspection manager.
[in] | _item | New item. E.g.: /default/world/model1/pose |
[in] | _cb | Callback used to get the last update for this item. |
References gazebo::msgs::ConvertAny().
bool Unregister | ( | const std::string & | _item | ) |
Unregister an existing item from the introspection manager.
[in] | _item | Item to remove. |
void Update | ( | ) |
Update all the items under observation and publish updates through all the topics.
The message received in the update will contain the name and latest values of all the items specified in the filter. If there are changes in the items list since the last update, a new message is published under the topic "/introspection/<manager_id>/items_update".