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 <yarp/os/Network.h>
7#include <yarp/os/RFModule.h>
8#include <yarp/os/Bottle.h>
11#include <yarp/os/Os.h>
12#include <yarp/os/Log.h>
13#include <yarp/os/LogStream.h>
14#include <yarp/os/Time.h>
15#include <yarp/sig/Vector.h>
16
17#include <QApplication>
18#include <QMainWindow>
19#include <iostream>
20#include <iomanip>
21#include <string>
22#include <cstdlib>
23#include <ctime>
24
25#include "display.h"
26#include "ui_display.h"
27
28
29using namespace yarp::os;
30using namespace yarp::dev;
31
32int main(int argc, char *argv[])
33{
34 // Guis shall run always on system clock. No need to have it in synch with network clock
36
37 if (!yarp.checkNetwork())
38 {
39 yError("Error initializing yarp network (is yarpserver running?)");
40 return 0;
41 }
42
44 rf.configure(argc,argv);
45
46 QApplication a(argc, argv);
47
48 if (rf.check("help"))
49 {
50 yInfo() << "Options:";
51 yInfo() << "--port <name> the full name of the output port";
52 yInfo() << "--step_lin_vel the increase step of linear velocity (m/s)";
53 yInfo() << "--step_ang_vel the increase step of angular velocity (deg/s)";
54 yInfo() << "--default_lin_vel the default value for max linear velocity (m/s)";
55 yInfo() << "--default_ang_vel the default value for max angular velocity (deg/s)";
56 return 0;
57 }
58
59 MainWindow w(rf, nullptr);
60 w.show();
61 int ret = a.exec();
62
63 return ret;
64
65}
bool ret
#define yInfo(...)
Definition Log.h:319
#define yError(...)
Definition Log.h:361
contains the definition of a Vector type
MainWindow class.
Definition display.h:22
A mini-server for performing network communication in the background.
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 check(const std::string &key) const override
Check if there exists a property of the given name.
bool configure(int argc, char *argv[], bool skipFirstArgument=true)
Sets up the ResourceFinder.
int main(int argc, char *argv[])
Definition main.cpp:32
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
@ YARP_CLOCK_SYSTEM
Definition Time.h:28
The main, catch-all namespace for YARP.
Definition dirs.h:16