fix: add reconnect attempt logging for Kobuki communication

This commit is contained in:
ishak jmilou.ishak
2025-01-09 15:36:28 +01:00
parent 82363d393c
commit 3bca04053a

View File

@@ -43,6 +43,7 @@ int main() {
std::cout << "Kobuki is not connected anymore. Reconnecting..." << std::endl;
robot.startCommunication("/dev/ttyUSB0", true, nullptr);
while (!robot.isConnected()) {
std::cout << "Attempting to reconnect..." << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(1));
}
std::cout << "Reconnected to Kobuki." << std::endl;