58 std::vector<std::string> msgList;
59 for(
const auto& elem : topicList)
60 msgList.push_back(elem.first);
66 std::string paramValue=
"";
70 ROS_INFO_STREAM(
"Using "<< paramValue <<
" for parameter " <<paramName);
74 ROS_WARN_STREAM(
"ParamName "<< paramName <<
" not found in YAML file. Replaced with empty string");
114 return(str1.find(str2) != std::string::npos ?
true:
false);
130 size_t last_slash = hierarchical_topic.find_last_of(
"/");
131 return hierarchical_topic.substr(last_slash+1);
136 bool withinRange=
false;
137 if (value < lowerRange || value > upperRange)
141 std_msgs::String errorMsg;
142 std::ostringstream ss;
143 if (value < lowerRange)
145 ss << msg_name <<
" msg undercut lower range. value: " << value <<
" < " << lowerRange;
147 else if (value > upperRange)
149 ss << msg_name <<
" msg exceeds upper range. value: " << value <<
" > " << upperRange;
151 errorMsg.data=ss.str();
166 std::map<std::string,std::string> paramResults;
167 std::vector<std::string> keys;
169 for(std::size_t i = 0; i < keys.size(); ++i)
175 std::string returnValue;
177 if (!returnValue.empty())
179 paramResults[keys[i]]=returnValue;
184 ROS_INFO_STREAM(paramName <<
" has no parameter, please check the config YAML");
189 for(
const auto& elem : paramResults)
191 ROS_INFO_STREAM(
" - parameter: "<<elem.first <<
" value: " << elem.second);
193 return(paramResults);
198 std::string errorTopic;
207 std::string isoTimeStr = boost::posix_time::to_iso_extended_string(posixTime);
void createTopicStructurePrefix()
std::vector< std::string > GetMsgList(std::map< std::string, std::string > topicList)
std::string mqttTopicStructurePrefix
std::map< std::string, std::string > GetTopicPublisherList()
bool CheckRange(double lowerRange, double upperRange, double value, std::string msg_name)
std::string getTopicStructurePrefix()
std::string GetTopic(std::string hierarchical_topic)
#define DEFAULT_ERROR_TOPIC
std::map< std::string, std::string > ReadTopicParams(ros::NodeHandle *nh, std::string paramTopicName)
std::map< std::string, std::string > topicSubscriberList
bool CompareStrings(std::string str1, std::string str2)
void publish(const boost::shared_ptr< M > &message) const
vda5050_msgs::Header GetHeader()
std::map< std::string, std::string > topicPublisherList
ROSCPP_DECL bool get(const std::string &key, std::string &s)
bool CheckTopic(std::string str1, std::string str2)
ros::Publisher errorPublisher
bool getParamNames(std::vector< std::string > &keys) const
ROSCPP_DECL bool has(const std::string &key)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
#define ROS_WARN_STREAM(args)
std::string GetParameter(std::string param)
#define ROS_INFO_STREAM(args)
void LinkErrorTopics(ros::NodeHandle *nh)
std::string CreateTimestamp()
std::map< std::string, std::string > GetTopicSubscriberList()
vda5050_msgs::Header messageHeader
boost::posix_time::ptime toBoost() const