Skip to content

Commit

Permalink
fixed topic check
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Jan 19, 2024
1 parent b6b0036 commit e5c3406
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/automatic_start.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ bool AutomaticStart::topicCheck(void) {

for (int i = 0; i < int(topic_check_topics_.size()); i++) {

if (topic_check_topics_[i].getTime() != ros::Time::UNINITIALIZED &&
if (topic_check_topics_[i].getTime() == ros::Time::UNINITIALIZED ||
(ros::Time::now() - topic_check_topics_[i].getTime()) > ros::Duration(_topic_check_timeout_)) {

missing_topics << std::endl << "\t" << topic_check_topics_[i].getTopicName();
Expand Down
2 changes: 1 addition & 1 deletion test/topic_check/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bool Tester::test() {
if (!success) {
return true;
} else {
ROS_ERROR("[%s]: takeoff initiated, this should not be possible", ros::this_node::getName().c_str());
ROS_ERROR("[%s]: takeoff initiated, this should not be possible: '%s'", ros::this_node::getName().c_str(), message.c_str());
return false;
}
}
Expand Down

0 comments on commit e5c3406

Please sign in to comment.