mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Fixed a few bugs with C++ due to the merge.
Change-Id: I6c5120ff502b40ecba0884f5a3631fa91822cfd4
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user