iCub-main
FakeSimulation.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: Paul Fitzpatrick
6 * email: 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_FAKESIMULATION_INC
22 #define ICUBSIMULATION_FAKESIMULATION_INC
23 
24 #include "Simulation.h"
25 
26 #include <yarp/os/Time.h>
27 
28 class FakeSimulation : public Simulation {
29 private:
30  RobotStreamer *streamer;
31  int at;
32 public:
33  virtual void init(RobotStreamer *streamer, RobotConfig *config) {
34  this->streamer = streamer;
35  at = 0;
36  }
37 
38  virtual void drawView(bool left, bool right, bool wide) {}
39 
40  virtual bool getImage(yarp::sig::ImageOf<yarp::sig::PixelRgb>& img);
41 
42  virtual bool getTrqData(yarp::os::Bottle data);
43 
44  virtual void clearBuffer() {
45  }
46 
47  virtual void simLoop(int h,int w);
48 
49  virtual bool checkSync(bool reset) {
50  return true;
51  }
52 };
53 
54 #endif
h
h
Definition: compute_ekf_sym.m:23
FakeSimulation
Definition: FakeSimulation.h:28
Simulation.h
RobotConfig
Definition: RobotConfig.h:55
FakeSimulation::clearBuffer
virtual void clearBuffer()
Signal that we're done with a view.
Definition: FakeSimulation.h:44
FakeSimulation::init
virtual void init(RobotStreamer *streamer, RobotConfig *config)
Initialization.
Definition: FakeSimulation.h:33
FakeSimulation::getImage
virtual bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &img)
Definition: FakeSimulation.cpp:43
FakeSimulation::drawView
virtual void drawView(bool left, bool right, bool wide)
Render the requested view.
Definition: FakeSimulation.h:38
data
@ data
Definition: ST_M1_dataType.h:64
RobotStreamer
Definition: RobotStreamer.h:29
FakeSimulation::getTrqData
virtual bool getTrqData(yarp::os::Bottle data)
Definition: FakeSimulation.cpp:37
Simulation
Definition: Simulation.h:28
FakeSimulation::checkSync
virtual bool checkSync(bool reset)
Definition: FakeSimulation.h:49
FakeSimulation::simLoop
virtual void simLoop(int h, int w)
Run the simulation.
Definition: FakeSimulation.cpp:26