int main( int argc, char **argv ) { std::string hostname = "172.26.1.1"; // set our local hostname of our microcontroller if( argc > 1 ) // boiler plate stuff { hostname = argv[1]; } try // try to run our functions { init( hostname ); // these functions explained above drive(); destroy(); } // below we catch any errors that cropped up catch( const rec::robotino::api2::RobotinoException& e ) { std::cerr << "Com Error: " << e.what() << std::endl; } catch( const std::exception& e ) { std::cerr << "Error: " << e.what() << std::endl; } catch( ... ) { std::cerr << "Unknow Error" << std::endl; } rec::robotino::api2::shutdown(); // shut down API2 }