Skip to content
Snippets Groups Projects
Commit 2c6440bd authored by Mathieu Geisert (old)'s avatar Mathieu Geisert (old)
Browse files

Add function getDeviceNames in robot to get the names of robots and object in...

Add function getDeviceNames in robot to get the names of robots and object in the same order than in the configuration.
parent 5b9b39a5
No related branches found
No related tags found
No related merge requests found
......@@ -105,9 +105,25 @@ namespace hpp {
return it->second;
}
/// Get Device names in the same order than the compositeRobot has been
/// build
std::vector<std::string> getDeviceNames()
{
std::vector<std::string> deviceNames;
for ( Devices_t::iterator itDevice = robots_.begin() ; itDevice !=
robots_.end() ; itDevice++ ) {
deviceNames.push_back((*itDevice)->name());
}
for ( Objects_t::iterator itObject = objects_.begin() ; itObject !=
objects_.end() ; itObject++ ) {
deviceNames.push_back((*itObject)->name());
}
return deviceNames;
}
/// Print object in a stream
virtual std::ostream& print (std::ostream& os) const;
protected:
/// Constructor
/// \param name of the new instance,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment