Implements one to one wiring that integrates the mismatch between motor commands (understood as target values) and sensor values and adds them to the controller output If more sensors than motors are used it uses just the first m sensors. More...
#include <forceboostwiring.h>
Inherits AbstractWiring, and Configurable.
Public Member Functions | |
ForceBoostWiring (NoiseGenerator *noise, double boost=0, bool exportBoostError=false, int plotMode=Controller, const std::string &name="ForceBoostWiring") | |
constructor | |
virtual | ~ForceBoostWiring () |
destructor | |
virtual void | reset () |
reset internal state | |
Protected Member Functions | |
virtual bool | initIntern () |
initializes the number of sensors and motors on robot side, calculate number of sensors and motors on controller side | |
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. | |
virtual bool | wireMotorsIntern (motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber) |
Realizes one to one wiring from controller motor outputs to robot motors. | |
Protected Attributes | |
double | boost |
matrix::Matrix | error |
matrix::Matrix | sens |
Implements one to one wiring that integrates the mismatch between motor commands (understood as target values) and sensor values and adds them to the controller output If more sensors than motors are used it uses just the first m sensors.
ForceBoostWiring | ( | NoiseGenerator * | noise, | |
double | boost = 0 , |
|||
bool | exportBoostError = false , |
|||
int | plotMode = Controller , |
|||
const std::string & | name = "ForceBoostWiring" | |||
) |
constructor
noise | NoiseGenerator that is used for adding noise to sensor values | |
plotMode | see AbstractWiring | |
boost | factor for mismatch integration | |
exportBoostError | whether to export force boost error to inspectables (guilogger) |
~ForceBoostWiring | ( | ) | [virtual] |
destructor
bool initIntern | ( | ) | [protected, virtual] |
initializes the number of sensors and motors on robot side, calculate number of sensors and motors on controller side
Implements AbstractWiring.
void reset | ( | ) | [virtual] |
reset internal state
Reimplemented from AbstractWiring.
bool wireMotorsIntern | ( | motor * | rmotors, | |
int | rmotornumber, | |||
const motor * | cmotors, | |||
int | cmotornumber | |||
) | [protected, virtual] |
Realizes one to one wiring from controller motor outputs to robot motors.
rmotors | pointer to array of motorvalues for robot | |
rmotornumber | number of robot motors | |
cmotors | pointer to array of motorvalues from controller | |
cmotornumber | number of motorvalues from controller |
Implements AbstractWiring.
bool wireSensorsIntern | ( | const sensor * | rsensors, | |
int | rsensornumber, | |||
sensor * | csensors, | |||
int | csensornumber, | |||
double | noise | |||
) | [protected, virtual] |
Realizes one to one wiring from robot sensors to controller sensors.
rsensors | pointer to array of sensorvalues from robot | |
rsensornumber | number of sensors from robot | |
csensors | pointer to array of sensorvalues for controller | |
csensornumber | number of sensors to controller | |
noise | size of the noise added to the sensors |
Implements AbstractWiring.
double boost [protected] |
matrix::Matrix error [protected] |
matrix::Matrix sens [protected] |