Fixed a few bugs with C++ due to the merge.

Change-Id: I6c5120ff502b40ecba0884f5a3631fa91822cfd4
This commit is contained in:
Alex Henning
2014-08-11 19:52:43 -04:00
parent 1301d76d61
commit 66e1f2a184
11 changed files with 84 additions and 121 deletions

View File

@@ -10,9 +10,11 @@ SimGyro::SimGyro(std::string topic) {
velSub = MainNode::Subscribe("~/simulator/"+topic+"/velocity",
&SimGyro::velocityCallback, this);
commandPub->WaitForConnection();
std::cout << "Initialized ~/simulator/"+topic << std::endl;
if (commandPub->WaitForConnection(gazebo::common::Time(5.0))) { // Wait up to five seconds.
std::cout << "Initialized ~/simulator/" + topic << std::endl;
} else {
std::cerr << "Failed to initialize ~/simulator/" + topic + ": does the gyro exist?" << std::endl;
}
}
void SimGyro::Reset() {