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
14
int
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
22
yarp::os::ResourceFinder
& rf(
yarp::os::ResourceFinder::getResourceFinderSingleton
());
23
rf.
setDefaultConfigFile
(
"yarprobotinterface.ini"
);
24
rf.
configure
(argc, argv);
25
26
// Create and run our module
27
yarprobotinterface::Module
module
;
28
return
module
.runModule(rf);
29
}
Drivers.h
LogStream.h
yFatal
#define yFatal(...)
Definition
Log.h:382
Module.h
Network.h
Time.h
yarp::os::Network
Utilities for manipulating the YARP network, including initialization and shutdown.
Definition
Network.h:706
yarp::os::ResourceFinder
Helper class for finding config files and other external resources.
Definition
ResourceFinder.h:29
yarp::os::ResourceFinder::configure
bool configure(int argc, char *argv[], bool skipFirstArgument=true)
Sets up the ResourceFinder.
Definition
ResourceFinder.cpp:786
yarp::os::ResourceFinder::getResourceFinderSingleton
static ResourceFinder & getResourceFinderSingleton()
Access a ResourceFinder singleton whose lifetime will match that of the YARP library.
Definition
ResourceFinder.cpp:959
yarp::os::ResourceFinder::setDefaultConfigFile
bool setDefaultConfigFile(const std::string &fname)
Provide a default value for the configuration file (can be overridden from command line with the –fro...
Definition
ResourceFinder.h:103
yarprobotinterface::Module
Definition
Module.h:17
main
int main(int argc, char *argv[])
Definition
main.cpp:385
yarp
The main, catch-all namespace for YARP.
Definition
dirs.h:16
YARP
3.11.100+20250603.4+gitaa77f8b5c
src
commands
yarprobotinterface
main.cpp
Generated on Wed Jun 4 2025 02:40:10 for YARP by
1.9.8