Functions | |
bool | isWithinRange (const std::vector< double > &lhs, const std::vector< double > &rhs, double full_range) |
Checks to see if members are within the same range. Specifically, Each item in abs(lhs[i] - rhs[i]) < abs(range/2.0). Empty vectors always return true. The behavior of this function around large values (near double limits) is uncertain. This function is not optimized, do not use for large vectors or loops. | |
bool | isWithinRange (const std::vector< std::string > &keys, const std::map< std::string, double > &lhs, const std::map< std::string, double > &rhs, double full_range) |
Map version of. | |
bool | isWithinRange (const std::vector< std::string > &lhs_keys, const std::vector< double > &lhs_values, const std::vector< std::string > &rhs_keys, const std::vector< double > &rhs_values, double full_range) |
Key/Values vector version of. | |
bool | mapInsert (const std::string &key, double value, std::map< std::string, double > &mappings) |
Convenience function for inserting a value into an std::map, assuming a string key and a double value. | |
bool | toMap (const std::vector< std::string > &keys, const std::vector< double > &values, std::map< std::string, double > &mappings) |
Convenience function for taking two separate key,value vectors and creating the more convenient map. This is helpful for some ROS message types where maps are defined as two separate vectors (ROS messages do not support maps). |
bool industrial_robot_client::utils::isWithinRange | ( | const std::vector< double > & | lhs, |
const std::vector< double > & | rhs, | ||
double | full_range | ||
) |
Checks to see if members are within the same range. Specifically, Each item in abs(lhs[i] - rhs[i]) < abs(range/2.0). Empty vectors always return true. The behavior of this function around large values (near double limits) is uncertain. This function is not optimized, do not use for large vectors or loops.
lhs | first vector |
rhs | second vector |
full_range |
bool industrial_robot_client::utils::isWithinRange | ( | const std::vector< std::string > & | keys, |
const std::map< std::string, double > & | lhs, | ||
const std::map< std::string, double > & | rhs, | ||
double | full_range | ||
) |
Map version of.
keys | vector of key values |
lhs | first map |
rhs | second map |
full_range |
bool industrial_robot_client::utils::isWithinRange | ( | const std::vector< std::string > & | lhs_keys, |
const std::vector< double > & | lhs_values, | ||
const std::vector< std::string > & | rhs_keys, | ||
const std::vector< double > & | rhs_values, | ||
double | full_range | ||
) |
Key/Values vector version of.
lhs_keys | vector of lhs keys |
lhs_values | vector of lhs_values |
rhs_keys | vector of rhs keys |
rhs_values | vector of rhs_values |
full_range |
bool industrial_robot_client::utils::mapInsert | ( | const std::string & | key, |
double | value, | ||
std::map< std::string, double > & | mappings | ||
) |
bool industrial_robot_client::utils::toMap | ( | const std::vector< std::string > & | keys, |
const std::vector< double > & | values, | ||
std::map< std::string, double > & | mappings | ||
) |
Convenience function for taking two separate key,value vectors and creating the more convenient map. This is helpful for some ROS message types where maps are defined as two separate vectors (ROS messages do not support maps).
keys | vector of key values |
values | vector of values |
mappings | of key values. |