Robotsystem from Robot Group Leipzig: AbstractRobot Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# AbstractRobot Class Reference

`#include <abstractrobot.h>`

Inheritance diagram for AbstractRobot:

[legend]
Collaboration diagram for AbstractRobot:

[legend]
List of all members.

## Detailed Description

Abstract class (interface) for robot in general.

Definition at line 78 of file abstractrobot.h.

## Public Member Functions
| AbstractRobot (const char *name="abstractRobot")
| Constructor.
virtual | ~AbstractRobot ()
string | getName () const
| returns the name of the robot
virtual int | getSensors (sensor *sensors, int sensornumber)=0
| returns actual sensorvalues
virtual void | setMotors (const motor *motors, int motornumber)=0
| sets actual motorcommands
virtual int | getSensorNumber ()=0
| returns number of sensors
virtual int | getMotorNumber ()=0
| returns number of motors
## Protected Member Functions
void | setName (const char *name)
| sets the name of the robot (only for child classes)
## Protected Attributes
string | name

## Constructor & Destructor Documentation

AbstractRobot | ( | const char * | name = `"abstractRobot"` | ) | `[inline]`

  | Constructor. Parameters:
  | name | name of the robot
Definition at line 85 of file abstractrobot.h.

virtual ~AbstractRobot | ( |  | ) | `[inline, virtual]`

| Definition at line 89 of file abstractrobot.h.

## Member Function Documentation

virtual int getMotorNumber | ( |  | ) | `[pure virtual]`

| returns number of motors Implemented in ComponentToRobot, Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, SchlangeForce, SchlangeServo, SchlangeServo2, SchlangeVelocity, ShortCircuit, Sphererobot, and Sphererobot3Masses.

string getName | ( |  | ) | const`[inline]`

| returns the name of the robot Reimplemented in ComponentToRobot, Arm2Segm, HurlingSnake, MuscledArm, and Schlange. Definition at line 92 of file abstractrobot.h.

virtual int getSensorNumber | ( |  | ) | `[pure virtual]`

| returns number of sensors Implemented in ComponentToRobot, Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, SchlangeForce, SchlangeServo, SchlangeServo2, SchlangeVelocity, ShortCircuit, Sphererobot, and Sphererobot3Masses.

virtual int getSensors | ( | sensor * | sensors,
|  | int | sensornumber
| ) | `[pure virtual]`

  | returns actual sensorvalues Parameters:
  | sensors | sensors scaled to [-1,1]
  | sensornumber | length of the sensor array
Returns: number of actually written sensors Implemented in ComponentToRobot, Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, SchlangeForce, SchlangeServo, SchlangeServo2, SchlangeVelocity, ShortCircuit, Sphererobot, and Sphererobot3Masses.

virtual void setMotors | ( | const motor * | motors,
|  | int | motornumber
| ) | `[pure virtual]`

  | sets actual motorcommands Parameters:
  | motors | motors scaled to [-1,1]
  | motornumber | length of the motor array
Implemented in ComponentToRobot, Arm2Segm, ForcedSphere, Formel1, HurlingSnake, MuscledArm, Nimm2, Nimm4, Schlange, SchlangeForce, SchlangeServo, SchlangeServo2, SchlangeVelocity, ShortCircuit, Sphererobot, and Sphererobot3Masses.

void setName | ( | const char * | name | ) | `[inline, protected]`

| sets the name of the robot (only for child classes) Definition at line 118 of file abstractrobot.h.

## Member Data Documentation

string name`[protected]`

| Reimplemented in Arm2Segm, and MuscledArm. Definition at line 121 of file abstractrobot.h.