#include <derivativewiring.h>
Inheritance diagram for DerivativeWiring:
Definition at line 69 of file derivativewiring.h.
Public Member Functions | |
DerivativeWiring (const DerivativeWiringConf &conf, NoiseGenerator *noise) | |
constructor | |
virtual | ~DerivativeWiring () |
destructor | |
virtual bool | init (int robotsensornumber, int robotmotornumber) |
initializes the internal numbers of sensors and motors on robot side, calculate number of sensors and motors on controller side | |
virtual bool | wireSensors (const sensor *rsensors, int rsensornumber, sensor *csensors, int csensornumber, double noise) |
Realizes derivative wiring from robot sensors to controller sensors. | |
virtual bool | wireMotors (motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber) |
Realizes wiring from controller motor outputs to robot motors. | |
Static Public Member Functions | |
static DerivativeWiringConf | getDefaultConf () |
Providing default configuration for DerivativeWiring as static method. | |
Protected Member Functions | |
void | calcFirstDerivative () |
Calculate the first derivative of the sensorvalues given by the robot f'(x) = (f(x+1) - f(x-1)) / 2 since we do not have f(x+1) we go one timestep in the past. | |
void | calcSecondDerivative () |
Calculate the secound derivative of the sensorvalues given by the robot f'(x) = f(x) - 2f(x-1) + f(x-2). | |
Protected Attributes | |
DerivativeWiringConf | conf |
used configuration | |
int | time |
int | delay |
number timesteps the sensor values are delayed for calculation of the derivative | |
sensor * | sensorbuffer [buffersize] |
current and old smoothed sensor values of robot | |
sensor * | id |
current sensors (with noise) | |
sensor * | first |
current first derivative | |
sensor * | second |
current second derivative | |
motor * | blindMotors |
array that stored the values of the blind motors | |
unsigned int | blindMotorNumber |
number of blind motors used | |
Static Protected Attributes | |
static const int | buffersize = 40 |
|
constructor
Definition at line 62 of file derivativewiring.cpp. |
|
destructor
Definition at line 73 of file derivativewiring.cpp. |
|
Calculate the first derivative of the sensorvalues given by the robot f'(x) = (f(x+1) - f(x-1)) / 2 since we do not have f(x+1) we go one timestep in the past.
Definition at line 198 of file derivativewiring.cpp. |
|
Calculate the secound derivative of the sensorvalues given by the robot f'(x) = f(x) - 2f(x-1) + f(x-2).
Definition at line 207 of file derivativewiring.cpp. |
|
Providing default configuration for DerivativeWiring as static method.
Definition at line 110 of file derivativewiring.h. |
|
initializes the internal numbers of sensors and motors on robot side, calculate number of sensors and motors on controller side
Implements AbstractWiring. Definition at line 84 of file derivativewiring.cpp. |
|
Realizes wiring from controller motor outputs to robot motors.
Implements AbstractWiring. Definition at line 182 of file derivativewiring.cpp. |
|
Realizes derivative wiring from robot sensors to controller sensors.
Implements AbstractWiring. Definition at line 119 of file derivativewiring.cpp. |
|
number of blind motors used
Definition at line 157 of file derivativewiring.h. |
|
array that stored the values of the blind motors
Definition at line 154 of file derivativewiring.h. |
|
Definition at line 135 of file derivativewiring.h. |
|
used configuration
Definition at line 134 of file derivativewiring.h. |
|
number timesteps the sensor values are delayed for calculation of the derivative
Definition at line 138 of file derivativewiring.h. |
|
current first derivative
Definition at line 148 of file derivativewiring.h. |
|
current sensors (with noise)
Definition at line 145 of file derivativewiring.h. |
|
current second derivative
Definition at line 151 of file derivativewiring.h. |
|
current and old smoothed sensor values of robot
Definition at line 142 of file derivativewiring.h. |
|
Definition at line 136 of file derivativewiring.h. |