Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
one2onewiring.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __ONE2ONEWIRING_H
25 #define __ONE2ONEWIRING_H
26 
27 #include "abstractwiring.h"
28 
29 /** Implements one to one wiring of robot sensors to inputs of the controller
30  and controller outputs to robot motors.
31  */
33 public:
34  /** constructor
35  @param noise NoiseGenerator that is used for adding noise to sensor values
36  @param plotMode see AbstractWiring
37  @param blind number of blind channels
38  (additional sensors and motors coupled directly)
39  */
40  One2OneWiring(NoiseGenerator* noise, int plotMode=Controller, int blind=0, const std::string& name = "One2OneWiring");
41 
42  /** destructor
43  */
44  virtual ~One2OneWiring();
45 
46 protected:
47 
48  /** initializes the number of sensors and motors on robot side, calculate
49  number of sensors and motors on controller side
50  */
51  virtual bool initIntern();
52 
53  /** Realizes one to one wiring from robot sensors to controller sensors.
54  @param rsensors pointer to array of sensorvalues from robot
55  @param rsensornumber number of sensors from robot
56  @param csensors pointer to array of sensorvalues for controller
57  @param csensornumber number of sensors to controller
58  @param noise size of the noise added to the sensors
59  */
60  virtual bool wireSensorsIntern(const sensor* rsensors, int rsensornumber,
61  sensor* csensors, int csensornumber,
62  double noise);
63 
64  /** Realizes one to one wiring from controller motor outputs to robot motors.
65  @param rmotors pointer to array of motorvalues for robot
66  @param rmotornumber number of robot motors
67  @param cmotors pointer to array of motorvalues from controller
68  @param cmotornumber number of motorvalues from controller
69  */
70  virtual bool wireMotorsIntern(motor* rmotors, int rmotornumber,
71  const motor* cmotors, int cmotornumber);
72 
73 
74 protected:
75  int blind; /// number of blind channels
76  /// blind motor values
78 
79 };
80 
81 #endif
virtual ~One2OneWiring()
destructor
Definition: one2onewiring.cpp:35
Implements one to one wiring of robot sensors to inputs of the controller and controller outputs to r...
Definition: one2onewiring.h:32
int rmotornumber
number of motors at robot side
Definition: abstractwiring.h:182
virtual bool wireSensorsIntern(const sensor *rsensors, int rsensornumber, sensor *csensors, int csensornumber, double noise)
Realizes one to one wiring from robot sensors to controller sensors.
Definition: one2onewiring.cpp:61
int csensornumber
number of sensors at controller side
Definition: abstractwiring.h:187
virtual bool initIntern()
initializes the number of sensors and motors on robot side, calculate number of sensors and motors on...
Definition: one2onewiring.cpp:42
int plotMode
using plotTypes this variables defines what is plotted
Definition: abstractwiring.h:168
iparamkey name
Definition: inspectable.h:251
Abstract wiring-object between controller and robot.
Definition: abstractwiring.h:39
virtual bool wireMotorsIntern(motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber)
Realizes one to one wiring from controller motor outputs to robot motors.
Definition: one2onewiring.cpp:82
double motor
Definition: types.h:30
motor * blindmotors
number of blind channels
Definition: one2onewiring.h:77
Definition: abstractwiring.h:44
int cmotornumber
number of motors at controller side
Definition: abstractwiring.h:192
int rsensornumber
number of sensors at robot side
Definition: abstractwiring.h:177
double sensor
Definition: abstractwiring.h:41
One2OneWiring(NoiseGenerator *noise, int plotMode=Controller, int blind=0, const std::string &name="One2OneWiring")
constructor
Definition: one2onewiring.cpp:30
int blind
Definition: one2onewiring.h:75
Interface and basic class for noise generator.
Definition: noisegenerator.h:37