diff --git a/VirtualRobot/Robot.cpp b/VirtualRobot/Robot.cpp index 67b8b73c95d12f8619029f6dfdf7e8e0e52cf5af..82213a9cd0b3065f82441764ed9ab22982ad7b5e 100644 --- a/VirtualRobot/Robot.cpp +++ b/VirtualRobot/Robot.cpp @@ -535,6 +535,17 @@ namespace VirtualRobot return res; } + std::vector<std::string> VirtualRobot::Robot::Robot::getRobotNodeSetNames() const + { + std::vector<std::string> res; + const auto sets = getRobotNodeSets(); + res.reserve(sets.size()); + for(const auto& set:sets) + { + res.emplace_back(set->getName()); + } + return res; + } void Robot::highlight(VisualizationPtr visualization, bool enable) { diff --git a/VirtualRobot/Robot.h b/VirtualRobot/Robot.h index f1abba9c39f96452502d1d2653835af4db01d310..e0372986e9cb02841a51dd846f03b0b97684a83c 100644 --- a/VirtualRobot/Robot.h +++ b/VirtualRobot/Robot.h @@ -166,6 +166,7 @@ namespace VirtualRobot virtual bool hasRobotNodeSet(const std::string& name) = 0; virtual RobotNodeSetPtr getRobotNodeSet(const std::string& nodeSetName) const = 0; virtual std::vector<RobotNodeSetPtr> getRobotNodeSets() const; + virtual std::vector<std::string> getRobotNodeSetNames() const; virtual void getRobotNodeSets(std::vector<RobotNodeSetPtr>& storeNodeSet) const = 0; /**