Implements a wiring where the motors are copied to several motors and the sensors are fusioned. More...
#include <copywiring.h>
Inherits AbstractWiring, and Configurable.

Public Types | |
| typedef std::vector< std::list < int > > | Assignment |
Public Member Functions | |
| CopyWiring (const Assignment &sensor_assignment, const Assignment &motor_assignment, NoiseGenerator *noise, int plotMode=Controller|Robot, const std::string &name="CopyWiring") | |
| constructor | |
| virtual | ~CopyWiring () |
| destructor | |
| virtual void | reset () |
| reset internal state | |
Static Public Member Functions | |
| static Assignment | motorFromSensorAssignment (const Assignment &sensor_assignment) |
| returns the inverse Assignment of the given sensor assignemnt (typically the right thing) | |
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 | |
| Assignment | s_assign |
| Assignment | m_assign |
Implements a wiring where the motors are copied to several motors and the sensors are fusioned.
| typedef std::vector< std::list<int> > Assignment |
| CopyWiring | ( | const Assignment & | sensor_assignment, | |
| const Assignment & | motor_assignment, | |||
| NoiseGenerator * | noise, | |||
| int | plotMode = Controller|Robot, |
|||
| const std::string & | name = "CopyWiring" | |||
| ) |
constructor
| sensor_assignment | for each controller sensor a list of robot sensor it is averaged over | |
| motor_assignment | for each robot motor a list of controller motors it is averaged over | |
| noise | NoiseGenerator that is used for adding noise to sensor values | |
| plotMode | see AbstractWiring |
| ~CopyWiring | ( | ) | [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.
| CopyWiring::Assignment motorFromSensorAssignment | ( | const Assignment & | sensor_assignment | ) | [static] |
returns the inverse Assignment of the given sensor assignemnt (typically the right thing)
| 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.
Assignment m_assign [protected] |
Assignment s_assign [protected] |
1.6.3