Simox
2.3.74.0
|
Data Structures | |
struct | Configuration |
Public Member Functions | |
RobotConfig (RobotWeakPtr robot, const std::string &name) | |
RobotConfig (RobotWeakPtr robot, const std::string &name, const std::map< RobotNodePtr, float > &configs) | |
RobotConfig (RobotWeakPtr robot, const std::string &name, const std::vector< Configuration > &configs) | |
RobotConfig (RobotWeakPtr robot, const std::string &name, const std::vector< std::string > &robotNodes, const std::vector< float > &values) | |
RobotConfig (RobotWeakPtr robot, const std::string &name, const std::vector< RobotNodePtr > &robotNodes, const std::vector< float > &values) | |
RobotConfigPtr | clone (RobotPtr newRobot=RobotPtr()) |
std::string | getName () const |
void | print () const |
RobotPtr | getRobot () |
bool | setConfig (const Configuration &c) |
bool | setConfig (RobotNodePtr node, float value) |
bool | setConfig (const std::string &node, float value) |
bool | setTCP (const std::string &tcpName) |
bool | setTCP (RobotNodePtr tcp) |
bool | hasTCP () const |
RobotNodePtr | getTCP () |
bool | setJointValues () |
bool | setJointValues (RobotPtr r) |
bool | hasConfig (const std::string &name) const |
float | getConfig (const std::string &name) const |
std::vector< RobotNodePtr > | getNodes () const |
std::map< std::string, float > | getRobotNodeJointValueMap () |
std::string | toXML (int tabs=0) |
Static Public Member Functions | |
static std::string | createXMLString (const std::map< std::string, float > &config, const std::string &name, const std::string &tcpName=std::string(), int tabs=0) |
Protected Attributes | |
std::string | name |
std::map< RobotNodePtr, float > | configs |
RobotWeakPtr | robot |
RobotNodePtr | tcpNode |
A RobotConfig is a set of joint values, associated with a robot.
VirtualRobot::RobotConfig::RobotConfig | ( | RobotWeakPtr | robot, |
const std::string & | name | ||
) |
Constructor
robot | The associated robot. |
name | A name, which identifies this object. |
VirtualRobot::RobotConfig::RobotConfig | ( | RobotWeakPtr | robot, |
const std::string & | name, | ||
const std::map< RobotNodePtr, float > & | configs | ||
) |
VirtualRobot::RobotConfig::RobotConfig | ( | RobotWeakPtr | robot, |
const std::string & | name, | ||
const std::vector< Configuration > & | configs | ||
) |
VirtualRobot::RobotConfig::RobotConfig | ( | RobotWeakPtr | robot, |
const std::string & | name, | ||
const std::vector< std::string > & | robotNodes, | ||
const std::vector< float > & | values | ||
) |
VirtualRobot::RobotConfig::RobotConfig | ( | RobotWeakPtr | robot, |
const std::string & | name, | ||
const std::vector< RobotNodePtr > & | robotNodes, | ||
const std::vector< float > & | values | ||
) |
RobotConfigPtr VirtualRobot::RobotConfig::clone | ( | RobotPtr | newRobot = RobotPtr() | ) |
Creates a copy of this object with the given robot
newRobot | If not given, the current robot is used. otherwise the newRobot is used. |
|
static |
float VirtualRobot::RobotConfig::getConfig | ( | const std::string & | name | ) | const |
Return the corresponding stored value. If no RobotNode with name is stored, 0.0f is returned.
std::string VirtualRobot::RobotConfig::getName | ( | ) | const |
Returns name of this RobotConfig.
std::vector< RobotNodePtr > VirtualRobot::RobotConfig::getNodes | ( | ) | const |
Return vector of all nodes that are covered by this RobotConfig.
VirtualRobot::RobotPtr VirtualRobot::RobotConfig::getRobot | ( | ) |
The robot.
std::map< std::string, float > VirtualRobot::RobotConfig::getRobotNodeJointValueMap | ( | ) |
Returns map of RobotNodeNames with corresponding joint values.
RobotNodePtr VirtualRobot::RobotConfig::getTCP | ( | ) |
bool VirtualRobot::RobotConfig::hasConfig | ( | const std::string & | name | ) | const |
Check if a configuration for a RobotNode with name is stored.
bool VirtualRobot::RobotConfig::hasTCP | ( | ) | const |
void VirtualRobot::RobotConfig::print | ( | ) | const |
bool VirtualRobot::RobotConfig::setConfig | ( | const Configuration & | c | ) |
Appends a configuration to this instance.
bool VirtualRobot::RobotConfig::setConfig | ( | RobotNodePtr | node, |
float | value | ||
) |
bool VirtualRobot::RobotConfig::setConfig | ( | const std::string & | node, |
float | value | ||
) |
bool VirtualRobot::RobotConfig::setJointValues | ( | ) |
Apply the stored configurations to the corresponding robot. RobotNodes that are not stored in this RobotConfig are not affected.
bool VirtualRobot::RobotConfig::setJointValues | ( | RobotPtr | r | ) |
Usually setJointValues() is sufficient for applying the joint values. But in some cases one might want to apply the joint values to a cloned robot. Therefore this method can be used.
bool VirtualRobot::RobotConfig::setTCP | ( | const std::string & | tcpName | ) |
bool VirtualRobot::RobotConfig::setTCP | ( | RobotNodePtr | tcp | ) |
std::string VirtualRobot::RobotConfig::toXML | ( | int | tabs = 0 | ) |
Create an XML string that defines this object.
|
protected |
|
protected |
|
protected |
|
protected |