iCub-main
Simulation.h
Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 /*
4 * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
5 * Author: Vadim Tikhanoff, Paul Fitzpatrick
6 * email: vadim.tikhanoff@iit.it, paulfitz@alum.mit.edu
7 * website: www.robotcub.org
8 * Permission is granted to copy, distribute, and/or modify this program
9 * under the terms of the GNU General Public License, version 2 or any
10 * later version published by the Free Software Foundation.
11 *
12 * A copy of the license can be found at
13 * http://www.robotcub.org/icub/license/gpl.txt
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18 * Public License for more details
19 */
20 
21 #ifndef ICUBSIMULATION_SIMULATION_INC
22 #define ICUBSIMULATION_SIMULATION_INC
23 
24 #include "RobotStreamer.h"
25 #include "RobotConfig.h"
26 #include <yarp/sig/Image.h>
27 
28 class Simulation {
29 public:
37  virtual void init(RobotStreamer *streamer, RobotConfig *config) = 0;
38 
44  virtual ~Simulation() {}
45 
51  virtual void drawView(bool left, bool right, bool wide) = 0;
52 
53 
54  virtual bool getImage(yarp::sig::ImageOf<yarp::sig::PixelRgb>& img) = 0;
55 
61  virtual void clearBuffer() = 0;
62 
71  virtual void simLoop(int h,int w) = 0;
72 
73  virtual bool checkSync(bool reset = false) = 0;
74 
75  virtual bool getTrqData(yarp::os::Bottle data) = 0;
76 };
77 
78 #endif
h
h
Definition: compute_ekf_sym.m:23
Simulation::init
virtual void init(RobotStreamer *streamer, RobotConfig *config)=0
Initialization.
RobotConfig
Definition: RobotConfig.h:55
Simulation::checkSync
virtual bool checkSync(bool reset=false)=0
Simulation::getImage
virtual bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &img)=0
Simulation::clearBuffer
virtual void clearBuffer()=0
Signal that we're done with a view.
Simulation::simLoop
virtual void simLoop(int h, int w)=0
Run the simulation.
data
@ data
Definition: ST_M1_dataType.h:64
RobotStreamer
Definition: RobotStreamer.h:29
Simulation::~Simulation
virtual ~Simulation()
Destructor.
Definition: Simulation.h:44
RobotStreamer.h
Simulation::drawView
virtual void drawView(bool left, bool right, bool wide)=0
Render the requested view.
RobotConfig.h
Simulation
Definition: Simulation.h:28
Simulation::getTrqData
virtual bool getTrqData(yarp::os::Bottle data)=0