YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#include "Module.h"
7
8#include <yarp/os/LogStream.h>
9#include <yarp/os/Network.h>
10#include <yarp/os/Time.h>
11
12#include <yarp/dev/Drivers.h>
13
14int main(int argc, char* argv[])
15{
16 yarp::os::Network yarp; //initialize network, this goes before everything
17
18 if (!yarp.checkNetwork()) {
19 yFatal() << "Sorry YARP network does not seem to be available, is the yarp server available?";
20 }
21
23 rf.setDefaultConfigFile("yarprobotinterface.ini");
24 rf.configure(argc, argv);
25
26 // Create and run our module
28 return module.runModule(rf);
29}
#define yFatal(...)
Definition Log.h:382
Utilities for manipulating the YARP network, including initialization and shutdown.
Definition Network.h:706
Helper class for finding config files and other external resources.
bool configure(int argc, char *argv[], bool skipFirstArgument=true)
Sets up the ResourceFinder.
static ResourceFinder & getResourceFinderSingleton()
Access a ResourceFinder singleton whose lifetime will match that of the YARP library.
bool setDefaultConfigFile(const std::string &fname)
Provide a default value for the configuration file (can be overridden from command line with the –fro...
int main(int argc, char *argv[])
Definition main.cpp:385
The main, catch-all namespace for YARP.
Definition dirs.h:16