Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.

Make the program quit and print an Error message when the provided 'imuTopic' does match any in rosbag #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Quit the program and print an Error message when the provided 'imuTop…
…ic' does not match any in rosbag
  • Loading branch information
Tal-seven committed Jun 20, 2020
commit 9193fb2e3a94a32fee05ba9651dc43079dc38f3f
9 changes: 9 additions & 0 deletions bagconvert/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ int main(int argc, char **argv) {
dataIMU.push_back(s1->angular_velocity.y);
dataIMU.push_back(s1->angular_velocity.z);
}
else if(imuTopic != m.getTopic())
{
ROS_INFO("Imu topic %s, Does not match any in rosbag: %s\n"
"Please provide the correct topic name,"
"qualified by appropriate namespaces\n"
"eg: /<my-namespace>/<my-sub-namespace>/<my-imu-topic>\n",
imuTopic.c_str(),pathBag.c_str());
exit(EXIT_FAILURE);
}

}

Expand Down