You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
External projects may want to be able to use the gzyarp::DeviceRegistry class, mainly for:
Get a pointer to the YARP devices created by gz-sim-yarp-plugins
Add new YARP devices to the gzyarp::DeviceRegistry singleton, so that devices added by plugins written in the style of gz-sim-yarp-plugins but mantained in downstream repos can create devices that then can be accessed by gz-sim-yarp-robotinterface-system .
#include<iostream>
#include<gzyarp/DeviceRegistry.h>intmain()
{
std::vector<std::string> modelScopedNames;
// This functions does no exist at the momentgzyarp::DeviceRegistry::getHandler()->getModelScopedNames(modelScopedNames);
// Perform some operations with gzyarp::DeviceRegistry// For example, print the number of devices
std::cout << "Number of models for which registered devices exist: " << modelScopedNames.size() << std::endl;
return0;
}
The text was updated successfully, but these errors were encountered:
External projects may want to be able to use the
gzyarp::DeviceRegistry
class, mainly for:gz-sim-yarp-plugins
gzyarp::DeviceRegistry
singleton, so that devices added by plugins written in the style ofgz-sim-yarp-plugins
but mantained in downstream repos can create devices that then can be accessed bygz-sim-yarp-robotinterface-system
.The example can be something like:
CMakeLists.txt
example.cpp:
The text was updated successfully, but these errors were encountered: