Robotsystem from Robot Group Leipzig: AngularMotor2Axis Class Reference

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

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

# AngularMotor2Axis Class Reference

`#include <angularmotor.h>`

Inheritance diagram for AngularMotor2Axis:

[legend]
Collaboration diagram for AngularMotor2Axis:

[legend]
List of all members.

## Detailed Description

Angular motor for TwoAxisJoints.

Definition at line 126 of file angularmotor.h.

## Public Member Functions
| AngularMotor2Axis (const OdeHandle &odeHandle, TwoAxisJoint *joint, double power1, double power2)
| Constuct a motor attached to a TwoAxisJoint.
virtual | ~AngularMotor2Axis ()
virtual int | getNumberOfAxes ()
| returns the number of Axis of this Motor
virtual void | set (int axisNumber, double velocity)
| sets the desired speed of the motor at the given axis.
virtual double | get (int axisNumber)
| returns the speed (PositionRate) at the given axis, or zero if the axis is out of range
virtual void | setPower (double power)
| sets the maximal force the motor has
## Protected Attributes
TwoAxisJoint * | joint

## Constructor & Destructor Documentation

AngularMotor2Axis | ( | const OdeHandle & | odeHandle,
|  | TwoAxisJoint * | joint,
|  | double | power1,
|  | double | power2
| ) |

  | Constuct a motor attached to a TwoAxisJoint. It will its two axis of course. Parameters:
  | power | The maximum force or torque that the motor will use to achieve the desired velocity. This must always be greater than or equal to zero. Setting this to zero (the default value) turns off the motor.
Definition at line 126 of file angularmotor.cpp.

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

| Definition at line 134 of file angularmotor.h.

## Member Function Documentation

double get | ( | int | axisNumber | ) | `[virtual]`

| returns the speed (PositionRate) at the given axis, or zero if the axis is out of range Implements AngularMotor. Definition at line 162 of file angularmotor.cpp.

virtual int getNumberOfAxes | ( |  | ) | `[inline, virtual]`

| returns the number of Axis of this Motor Implements AngularMotor. Definition at line 137 of file angularmotor.h.

void set | ( | int | axisNumber,
|  | double | velocity
| ) | `[virtual]`

  | sets the desired speed of the motor at the given axis. Parameters:
  | axisNumber | either 0 or 1
  | velocity | Desired motor velocity (this will be an angular or linear velocity).
Implements AngularMotor. Definition at line 148 of file angularmotor.cpp.

void setPower | ( | double | power | ) | `[virtual]`

| sets the maximal force the motor has Implements AngularMotor. Definition at line 175 of file angularmotor.cpp.

## Member Data Documentation

TwoAxisJoint* joint`[protected]`

| Definition at line 152 of file angularmotor.h.